|
@@ -5,7 +5,7 @@
|
|
|
<a-input v-decorator="['id']" type="hidden"/>
|
|
|
<a-input v-decorator="['storeId']" type="hidden"/>
|
|
|
<a-input v-decorator="['pickId']" type="hidden"/>
|
|
|
- <a-input v-decorator="['isOut']" type="hidden"/>
|
|
|
+ <a-input v-decorator="['outFlag']" type="hidden"/>
|
|
|
</a-form-item>
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
@@ -193,7 +193,7 @@ export default {
|
|
|
form: this.$form.createForm(this),
|
|
|
visible: false,
|
|
|
maskClosable: false,
|
|
|
- isOut: 1,
|
|
|
+ outFlag: 1,
|
|
|
storeId: null,
|
|
|
// 下拉框map
|
|
|
typeMap: {},
|
|
@@ -231,8 +231,7 @@ export default {
|
|
|
{
|
|
|
title: '库存',
|
|
|
dataIndex: 'storeNum',
|
|
|
- width: 150,
|
|
|
- scopedSlots: { customRender: 'num' }
|
|
|
+ width: 150
|
|
|
},
|
|
|
{
|
|
|
title: '单位',
|
|
@@ -283,8 +282,8 @@ export default {
|
|
|
methods: {
|
|
|
base (record) {
|
|
|
this.visible = true
|
|
|
- this.isOut = record.isOut
|
|
|
- if (record.isOut === 1) {
|
|
|
+ this.outFlag = record.outFlag
|
|
|
+ if (record.outFlag === 1) {
|
|
|
this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
|
|
|
} else {
|
|
|
this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SPARE_BACK_FORM_TYPE)
|
|
@@ -305,7 +304,7 @@ export default {
|
|
|
// 日期处理
|
|
|
this.$nextTick(() => {
|
|
|
setFieldsValue(Object.assign(pick(record, [
|
|
|
- 'isOut'
|
|
|
+ 'outFlag'
|
|
|
])))
|
|
|
})
|
|
|
return
|
|
@@ -343,6 +342,7 @@ export default {
|
|
|
this.confirmLoading = false
|
|
|
return
|
|
|
}
|
|
|
+ values.outFlag = this.outFlag
|
|
|
values.detailList = this.data
|
|
|
values.userTime = BaseTool.Date.formatter(values.userTime, BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
// 日期处理
|
|
@@ -491,7 +491,7 @@ export default {
|
|
|
}
|
|
|
const data = [...this.data]
|
|
|
const target = data.find(item => item.autoId === autoId)
|
|
|
- if (this.isOut === 1 && value > target.storeNum) {
|
|
|
+ if (this.outFlag === 1 && value > target.storeNum) {
|
|
|
this.$message.error('领用数量不能大于库存数量')
|
|
|
target[attr] = 1
|
|
|
return
|