Commit 50756dbd authored by 黄卓's avatar 黄卓

readonly

parent 5d38fd12
......@@ -14,13 +14,13 @@
:key="index" v-model="dataList[index]"
:index="index" :attr-list="attrList"
@handle-delete="handleDelete(index)"
:read-only="readOnly"
:readonly="readonly"
/>
</el-form>
<el-button v-show="!readOnly" type="primary" size="mini" @click="handleAddItem">添加一条明细</el-button>
<el-button v-show="!readonly" type="primary" size="mini" @click="handleAddItem">添加一条明细</el-button>
<span v-show="!readOnly" slot="footer" class="dialog-footer">
<span v-show="!readonly" slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="handleSave">确 定</el-button>
</span>
......@@ -45,7 +45,7 @@ export default {
type: Array,
default: () => []
},
readOnly: {
readonly: {
type: Boolean,
default: false
}
......@@ -117,7 +117,7 @@ export default {
this.dialogVisible = true
},
handleClose(done) {
if (this.readOnly) {
if (this.readonly) {
return done()
}
this.$confirm('确认关闭?')
......@@ -134,7 +134,7 @@ export default {
computed: {
title() {
if (this.readOnly) {
if (this.readonly) {
return '查看箱明细'
}
return !this.value || this.value.length === 0 ? '添加箱明细' : '编辑箱明细'
......
......@@ -2,12 +2,12 @@
<el-card style="margin-bottom: 10px">
<div slot="header">
<span>序号{{ index + 1 }}</span>
<el-link v-show="!readOnly" type="danger" @click="handleDelete" style="float: right">删除</el-link>
<el-link v-show="!readonly" type="danger" @click="handleDelete" style="float: right">删除</el-link>
</div>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item :label="$t('中文品名')">
<product-selector v-model="value.prodId" determined protect-once :disabled="readOnly" />
<product-selector v-model="value.prodId" determined protect-once :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -18,7 +18,7 @@
filterable
remote
:remote-method="getProductBrandPage"
:disabled="readOnly"
:disabled="readonly"
clearable>
<el-option
v-for="item in brandList"
......@@ -34,7 +34,7 @@
<el-col :span="12">
<el-form-item :label="$t('商品特性')">
<el-checkbox-group v-model="prodAttrIds">
<el-checkbox v-for="item in attrList" :key="item.id" :label="item.id" :disabled="readOnly">{{ item.attrName }}</el-checkbox>
<el-checkbox v-for="item in attrList" :key="item.id" :label="item.id" :disabled="readonly">{{ item.attrName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
......@@ -45,7 +45,7 @@
:type="DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE"
multiple
form-type="checkbox"
:disabled="readOnly"
:disabled="readonly"
></dict-selector>
</el-form-item>
</el-col>
......@@ -53,44 +53,44 @@
<el-row :gutter="10">
<el-col :span="4">
<el-form-item :label="$t('长')">
<el-input v-model="boxGauge1" :disabled="readOnly" />
<el-input v-model="boxGauge1" :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('宽')">
<el-input v-model="boxGauge2" :disabled="readOnly" />
<el-input v-model="boxGauge2" :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('高')">
<el-input v-model="boxGauge3" :disabled="readOnly" />
<el-input v-model="boxGauge3" :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('重量')">
<el-input v-model="value.weight" :disabled="readOnly" />
<el-input v-model="value.weight" :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('体积')">
<el-input v-model="value.volume" :disabled="readOnly" />
<el-input v-model="value.volume" :disabled="readonly" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="4">
<el-form-item :label="$t('快递单号')">
<el-input v-model="value.expressNo" :disabled="readOnly" />
<el-input v-model="value.expressNo" :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('包装类型')">
<dict-selector :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="value.unit" :disabled="readOnly"></dict-selector>
<dict-selector :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="value.unit" :disabled="readonly"></dict-selector>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('数量')">
<el-input v-model="value.quantityAll" :disabled="readOnly" />
<el-input v-model="value.quantityAll" :disabled="readonly" />
</el-form-item>
</el-col>
</el-row>
......@@ -120,7 +120,7 @@ export default {
type: Number,
default: 0
},
readOnly: {
readonly: {
type: Boolean,
default: false
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment