|
@@ -37,18 +37,18 @@
|
|
<!-- 新增 -->
|
|
<!-- 新增 -->
|
|
<div v-if="!comDisabled">
|
|
<div v-if="!comDisabled">
|
|
<template v-if="moduleType === 1">
|
|
<template v-if="moduleType === 1">
|
|
- <el-button type="primary" size="default" @click="onSubmit('WAIT')">提交</el-button>
|
|
|
|
- <el-button size="default" @click="onSubmit('SAVE')">保存</el-button>
|
|
|
|
|
|
+ <el-button type="primary" size="mini" @click="onSubmit('WAIT')">提交</el-button>
|
|
|
|
+ <el-button size="mini" @click="onSubmit('SAVE')">保存</el-button>
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
- <el-button type="primary" size="default" @click="onSubmit">编辑</el-button>
|
|
|
|
|
|
+ <el-button type="primary" size="mini" @click="onSubmit">编辑</el-button>
|
|
</template>
|
|
</template>
|
|
- <el-button size="default" @click="onReset">重置</el-button>
|
|
|
|
|
|
+ <el-button size="mini" @click="onReset">重置</el-button>
|
|
</div>
|
|
</div>
|
|
<!-- 审核 /详情-->
|
|
<!-- 审核 /详情-->
|
|
<div v-if="moduleType === 3 || moduleType === 2">
|
|
<div v-if="moduleType === 3 || moduleType === 2">
|
|
- <el-button v-if="moduleType === 3" type="primary" size="default" @click="onExamine('OK')">同意</el-button>
|
|
|
|
- <el-button size="default" @click="onInvoice('SAVE')">撤回</el-button>
|
|
|
|
|
|
+ <el-button v-if="moduleType === 3" type="primary" size="mini" @click="onExamine('OK')">同意</el-button>
|
|
|
|
+ <el-button size="mini" @click="onInvoice('SAVE')">撤回</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -140,11 +140,16 @@ export default {
|
|
sonCustomerList: [],
|
|
sonCustomerList: [],
|
|
logisticsData: [],
|
|
logisticsData: [],
|
|
sonCustomerNumberList: [],
|
|
sonCustomerNumberList: [],
|
|
- sonCustomerNameList: []
|
|
|
|
|
|
+ sonCustomerNameList: [],
|
|
|
|
+ setDisabled: {
|
|
|
|
+ disabledDate: time => {
|
|
|
|
+ return time.getTime() < new Date() - 24 * 3600 * 1000
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- ...mapGetters(['customerNumber']),
|
|
|
|
|
|
+ ...mapGetters(['customerNumber', 'customerName']),
|
|
comDisabled() {
|
|
comDisabled() {
|
|
// 禁止
|
|
// 禁止
|
|
return !!~[2, 3].indexOf(this.moduleType || 1)
|
|
return !!~[2, 3].indexOf(this.moduleType || 1)
|
|
@@ -171,7 +176,9 @@ export default {
|
|
style: { width: '100%' },
|
|
style: { width: '100%' },
|
|
placeholder: '选择日期时间',
|
|
placeholder: '选择日期时间',
|
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
|
- disabled: this.comDisabled
|
|
|
|
|
|
+ disabled: this.comDisabled,
|
|
|
|
+ pickerOptions: this.setDisabled
|
|
|
|
+
|
|
},
|
|
},
|
|
formItemAttributes: { label: '调整日期', prop: 'transferTime' }
|
|
formItemAttributes: { label: '调整日期', prop: 'transferTime' }
|
|
},
|
|
},
|
|
@@ -181,21 +188,12 @@ export default {
|
|
attributes: { disabled: true, placeholder: '系统自动生成' },
|
|
attributes: { disabled: true, placeholder: '系统自动生成' },
|
|
formItemAttributes: { label: '制单人', prop: 'createBy' }
|
|
formItemAttributes: { label: '制单人', prop: 'createBy' }
|
|
},
|
|
},
|
|
- // {
|
|
|
|
- // name: 'el-input',
|
|
|
|
- // md: 6,
|
|
|
|
- // attributes: { disabled: this.comDisabled, placeholder: '请输入' },
|
|
|
|
- // formItemAttributes: { label: '商家编号', prop: 'transferCustomerNumber' }
|
|
|
|
- // },
|
|
|
|
- // {
|
|
|
|
- // name: 'el-input',
|
|
|
|
- // md: 6,
|
|
|
|
- // attributes: { disabled: this.comDisabled, placeholder: '请输入' },
|
|
|
|
- // formItemAttributes: { label: '商家名称', prop: 'transferCustomerName' }
|
|
|
|
- // },
|
|
|
|
{
|
|
{
|
|
name: 'el-select',
|
|
name: 'el-select',
|
|
options: this.sonCustomerNumberList,
|
|
options: this.sonCustomerNumberList,
|
|
|
|
+ events: {
|
|
|
|
+ change: (e) => this.handleChange(e, 'transferCustomerNumber')
|
|
|
|
+ },
|
|
md: 6,
|
|
md: 6,
|
|
attributes: {
|
|
attributes: {
|
|
clearable: true,
|
|
clearable: true,
|
|
@@ -208,6 +206,9 @@ export default {
|
|
name: 'el-select',
|
|
name: 'el-select',
|
|
options: this.sonCustomerNameList,
|
|
options: this.sonCustomerNameList,
|
|
md: 6,
|
|
md: 6,
|
|
|
|
+ events: {
|
|
|
|
+ change: (e) => this.handleChange(e, 'transferCustomerName')
|
|
|
|
+ },
|
|
attributes: {
|
|
attributes: {
|
|
clearable: true,
|
|
clearable: true,
|
|
filterable: true,
|
|
filterable: true,
|
|
@@ -219,8 +220,8 @@ export default {
|
|
name: 'el-select',
|
|
name: 'el-select',
|
|
md: 6,
|
|
md: 6,
|
|
options: [
|
|
options: [
|
|
- { label: '嘉贤前置仓', value: 'JIAXIAN' },
|
|
|
|
- { label: '商家仓', value: 'SHANGJIA' }
|
|
|
|
|
|
+ { label: '嘉贤前置仓', value: 'JIAXIAN' }
|
|
|
|
+ // { label: '商家仓', value: 'SHANGJIA' }
|
|
],
|
|
],
|
|
attributes: { disabled: this.comDisabled, placeholder: '请输入' },
|
|
attributes: { disabled: this.comDisabled, placeholder: '请输入' },
|
|
formItemAttributes: { label: '调拨仓库', prop: 'stockType' }
|
|
formItemAttributes: { label: '调拨仓库', prop: 'stockType' }
|
|
@@ -282,12 +283,12 @@ export default {
|
|
width: 300
|
|
width: 300
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- {
|
|
|
|
|
|
+ ...[this.moduleType === 1 ? {
|
|
columnAttributes: {
|
|
columnAttributes: {
|
|
label: '可调拨库存数',
|
|
label: '可调拨库存数',
|
|
prop: 'frontStockNum'
|
|
prop: 'frontStockNum'
|
|
}
|
|
}
|
|
- },
|
|
|
|
|
|
+ } : {}],
|
|
{
|
|
{
|
|
columnAttributes: {
|
|
columnAttributes: {
|
|
label: '调拨数量',
|
|
label: '调拨数量',
|
|
@@ -603,6 +604,8 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
getStagecustomerListV2() {
|
|
getStagecustomerListV2() {
|
|
|
|
+ this.formData.customerNumber = this.customerNumber
|
|
|
|
+ this.formData.customerName = this.customerName
|
|
getStagecustomerListV2({
|
|
getStagecustomerListV2({
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: -1,
|
|
pageSize: -1,
|
|
@@ -614,16 +617,17 @@ export default {
|
|
}
|
|
}
|
|
]
|
|
]
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
|
+ this.sonCustomerList = res.data.records
|
|
this.sonCustomerNameList = res.data.records.map(k => {
|
|
this.sonCustomerNameList = res.data.records.map(k => {
|
|
return {
|
|
return {
|
|
label: k.name,
|
|
label: k.name,
|
|
- value: k.name
|
|
|
|
|
|
+ value: k.id
|
|
}
|
|
}
|
|
})
|
|
})
|
|
this.sonCustomerNumberList = res.data.records.map(k => {
|
|
this.sonCustomerNumberList = res.data.records.map(k => {
|
|
return {
|
|
return {
|
|
label: k.number,
|
|
label: k.number,
|
|
- value: k.number
|
|
|
|
|
|
+ value: k.id
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
@@ -645,6 +649,7 @@ export default {
|
|
materialOldNumber: k.materialOldNumber,
|
|
materialOldNumber: k.materialOldNumber,
|
|
notes: '',
|
|
notes: '',
|
|
qty: 0,
|
|
qty: 0,
|
|
|
|
+ frontStockNum: k.frontStockNum,
|
|
specification: k.specification,
|
|
specification: k.specification,
|
|
disabledId: k.disabledId,
|
|
disabledId: k.disabledId,
|
|
stockName: '嘉贤前置仓',
|
|
stockName: '嘉贤前置仓',
|
|
@@ -693,8 +698,17 @@ export default {
|
|
this.$refs.pageRef &&
|
|
this.$refs.pageRef &&
|
|
this.$refs.pageRef.$children[0].$children[0].$children[2].$children[0].$children[0].clearSelection()
|
|
this.$refs.pageRef.$children[0].$children[0].$children[2].$children[0].$children[0].clearSelection()
|
|
},
|
|
},
|
|
- handleChangeNumber(e){
|
|
|
|
- console.log(e);
|
|
|
|
|
|
+ handleChange(e, type) {
|
|
|
|
+ if (e) {
|
|
|
|
+ if (type === 'transferCustomerNumber') {
|
|
|
|
+ this.formData.transferCustomerName = this.sonCustomerList.find(k => k.id === e).name
|
|
|
|
+ } else {
|
|
|
|
+ this.formData.transferCustomerNumber = this.sonCustomerList.find(k => k.id === e).number
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.formData.transferCustomerNumber = ''
|
|
|
|
+ this.formData.transferCustomerName = ''
|
|
|
|
+ }
|
|
},
|
|
},
|
|
handlerefreshList() {
|
|
handlerefreshList() {
|
|
this.$emit('refresh')
|
|
this.$emit('refresh')
|