|
@@ -209,7 +209,7 @@
|
|
|
data-title="系统SKU"
|
|
|
data-intro="系统SKU"
|
|
|
>
|
|
|
- <a-input placeholder="提交后自动生成" disabled />
|
|
|
+ <a-input placeholder="提交后自动生成" disabled v-decorator="['systemSku']" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -400,13 +400,15 @@
|
|
|
@added="onAdded"
|
|
|
@deleted="onDeleted"
|
|
|
>
|
|
|
- <template #supplierId>
|
|
|
+ <template #supplierId="{ handleChange, value }">
|
|
|
<a-select
|
|
|
placeholder="请选择供应商"
|
|
|
v-decorator="['supplierId']"
|
|
|
:dropdownMatchSelectWidth="false"
|
|
|
showSearch
|
|
|
optionFilterProp="children"
|
|
|
+ :value="typeof value === 'string' ? Number(value) : ''"
|
|
|
+ @change="($event) => handleChange($event)"
|
|
|
>
|
|
|
<div slot="dropdownRender" slot-scope="menu">
|
|
|
<v-nodes :vnodes="menu" />
|
|
@@ -424,13 +426,15 @@
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</template>
|
|
|
- <template #depotId>
|
|
|
+ <template #depotId="{ handleChange, value }">
|
|
|
<a-select
|
|
|
placeholder="请选择仓库名称"
|
|
|
v-decorator="['depotId']"
|
|
|
:dropdownMatchSelectWidth="false"
|
|
|
showSearch
|
|
|
optionFilterProp="children"
|
|
|
+ :value="value"
|
|
|
+ @change="($event) => handleChange($event)"
|
|
|
>
|
|
|
<div slot="dropdownRender" slot-scope="menu">
|
|
|
<v-nodes :vnodes="menu" />
|
|
@@ -443,7 +447,7 @@
|
|
|
<a-icon type="plus" /> 新增仓库
|
|
|
</div>
|
|
|
</div>
|
|
|
- <a-select-option v-for="(item, index) in depotList" :key="index" :value="item.id">
|
|
|
+ <a-select-option v-for="(item, index) in depotList" :key="index" :value="item.value">
|
|
|
{{ item.text }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
@@ -637,17 +641,19 @@ export default {
|
|
|
dataSource: [],
|
|
|
columns: [
|
|
|
{
|
|
|
- title: '条码',
|
|
|
- key: 'barCode',
|
|
|
+ title: '批次号',
|
|
|
+ // key: 'barCode',
|
|
|
+ key: 'batchNumber',
|
|
|
width: '15%',
|
|
|
type: FormTypes.input,
|
|
|
+ disabled: true,
|
|
|
defaultValue: '',
|
|
|
- placeholder: '请输入${title}',
|
|
|
- validateRules: [
|
|
|
- { required: true, message: '${title}不能为空' },
|
|
|
- { pattern: /^.{4,40}$/, message: '长度为4到40位' },
|
|
|
- { handler: this.validateBarCode },
|
|
|
- ],
|
|
|
+ placeholder: '自动生成',
|
|
|
+ // validateRules: [
|
|
|
+ // { required: true, message: '${title}不能为空' },
|
|
|
+ // { pattern: /^.{4,40}$/, message: '长度为4到40位' },
|
|
|
+ // { handler: this.validateBarCode },
|
|
|
+ // ],
|
|
|
},
|
|
|
{
|
|
|
title: '单位',
|
|
@@ -733,15 +739,6 @@ export default {
|
|
|
placeholder: '请输入${title}',
|
|
|
},
|
|
|
{
|
|
|
- title: '批次号',
|
|
|
- key: 'batchNumber',
|
|
|
- width: '9%',
|
|
|
- type: FormTypes.input,
|
|
|
- readonly: true,
|
|
|
- defaultValue: '',
|
|
|
- placeholder: '自动生成,不可编辑',
|
|
|
- },
|
|
|
- {
|
|
|
title: '库存(最小单位)',
|
|
|
key: 'inventory',
|
|
|
width: '9%',
|
|
@@ -893,6 +890,7 @@ export default {
|
|
|
this.fileList = record.imgName
|
|
|
}, 5)
|
|
|
}
|
|
|
+ console.log('this.model--------', this.model)
|
|
|
this.$nextTick(() => {
|
|
|
this.form.setFieldsValue(
|
|
|
pick(
|
|
@@ -908,12 +906,9 @@ export default {
|
|
|
'categoryId',
|
|
|
'enableSerialNumber',
|
|
|
'movingPinReminderCycle',
|
|
|
- 'enableBatchNumber',
|
|
|
- 'position',
|
|
|
- 'expiryNum',
|
|
|
+ 'systemSku',
|
|
|
'weight',
|
|
|
'remark',
|
|
|
- 'mfrs',
|
|
|
'otherField1',
|
|
|
'otherField2',
|
|
|
'otherField3'
|
|
@@ -963,6 +958,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
tab.dataSource = res.data.rows || []
|
|
|
+ console.log('tab.dataSource-----', tab.dataSource)
|
|
|
})
|
|
|
.finally(() => {
|
|
|
tab.loading = false
|
|
@@ -1041,6 +1037,7 @@ export default {
|
|
|
},
|
|
|
/** 发起新增或修改的请求 */
|
|
|
requestAddOrEdit(formData) {
|
|
|
+ console.log('formData------------', formData)
|
|
|
if (formData.meList.length === 0) {
|
|
|
this.$message.warning('抱歉,请输入条码信息!')
|
|
|
return
|
|
@@ -1413,32 +1410,14 @@ export default {
|
|
|
},
|
|
|
onAdded(event) {
|
|
|
const { row, target } = event
|
|
|
- let unit = ''
|
|
|
- if (this.unitStatus == false) {
|
|
|
- unit = this.form.getFieldValue('unit')
|
|
|
- }
|
|
|
- if (this.maxBarCodeInfo === '') {
|
|
|
- getMaxBarCode({}).then((res) => {
|
|
|
- if (res && res.code === 200) {
|
|
|
- this.maxBarCodeInfo = res.data.barCode - 0
|
|
|
- this.maxBarCodeInfo = this.maxBarCodeInfo + 1
|
|
|
- target.setValues([
|
|
|
- { rowKey: row.id, values: { barCode: this.maxBarCodeInfo, commodityUnit: unit ? unit : '' } },
|
|
|
- ])
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.maxBarCodeInfo = this.maxBarCodeInfo + 1
|
|
|
- target.setValues([
|
|
|
- { rowKey: row.id, values: { barCode: this.maxBarCodeInfo, commodityUnit: unit ? unit : '' } },
|
|
|
- ])
|
|
|
- }
|
|
|
+ target.setValues([{ rowKey: row.id, values: { barCode: '', commodityUnit: '' } }])
|
|
|
},
|
|
|
onDeleted(value) {
|
|
|
this.meDeleteIdList = value
|
|
|
},
|
|
|
//单元值改变一个字符就触发一次
|
|
|
onValueChange(event) {
|
|
|
+ console.log('onValueChange--------table-change', event)
|
|
|
const { type, row, column, value, target } = event
|
|
|
switch (column.key) {
|
|
|
case 'purchaseDecimal':
|