|
@@ -236,7 +236,7 @@
|
|
|
<!--v-input-limit="2" 代表可以输入2位小数的数字 -->
|
|
|
<el-select v-if="row.$cellEdit" v-model="row.storageId" allow-create filterable
|
|
|
default-first-option @change="handleStorageNameChange(row)">
|
|
|
- <el-option v-for="(item, index) in row.storageQuantityList" :key="index" :label="item.storageName"
|
|
|
+ <el-option v-for="(item, index) in row.storageQuantityList" :key="index" :label="item.storageName +'-'+ item.corpName"
|
|
|
:value="item.storageId"></el-option>
|
|
|
</el-select>
|
|
|
<span v-else>{{ row.storageName }}</span>
|
|
@@ -1532,6 +1532,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleStorageNameChange(row) {
|
|
|
+ console.log(row,1535)
|
|
|
this.choiceIndexT = row.$index
|
|
|
let index = row.storageQuantityList.findIndex(function (item) {
|
|
|
return item.storageId === row.storageId;
|
|
@@ -1582,18 +1583,27 @@ export default {
|
|
|
this.pageLoading = true
|
|
|
this.saveLoading = true
|
|
|
detail(id).then(async res => {
|
|
|
+
|
|
|
this.form = res.data.data;
|
|
|
this.browse = this.form.status > 0 ? true : false;
|
|
|
this.arrearsCheck = this.form.specialCheckStatus == 3 ? true : false;
|
|
|
await getProfit({ Id: this.form.corpId }).then(res => {
|
|
|
this.$set(this.form, 'profit', res.data.data.surplusProfit ? res.data.data.surplusProfit : '0.00')
|
|
|
})
|
|
|
+
|
|
|
this.contactsData = this.form.orderItemsList.filter(item => {
|
|
|
- return item.goodType == 0
|
|
|
+ return item.goodType == 0
|
|
|
})
|
|
|
+ for(let item of this.contactsData) {
|
|
|
+ item.storageId = item.storageId + '-' + item.corpId
|
|
|
+ }
|
|
|
+ console.log(this.contactsData,1598)
|
|
|
this.giftData = this.form.orderItemsList.filter(item => {
|
|
|
return item.goodType == 1
|
|
|
})
|
|
|
+ for(let item of this.giftData) {
|
|
|
+ item.storageId = item.storageId + '-' + item.corpId
|
|
|
+ }
|
|
|
this.goodsShowData = this.giftData;
|
|
|
this.goodsActives = 'goods';
|
|
|
this.handleClick({ name: this.goodsActives })
|
|
@@ -1833,7 +1843,13 @@ export default {
|
|
|
warehouseId: selectedValue
|
|
|
}).then(res => {
|
|
|
if (res.data.data.length > 0) {
|
|
|
- this.$set(this.goodsShowData[row.$index], 'storageQuantityList', res.data.data)
|
|
|
+ var datas = res.data.data;
|
|
|
+
|
|
|
+ var arr = datas.map(item=>{
|
|
|
+ item.storageId = item.storageId + '-' + item.corpId
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ this.$set(this.goodsShowData[row.$index], 'storageQuantityList', arr)
|
|
|
// this.goodsShowData[row.$index].storageQuantityList = res.data.data;
|
|
|
this.goodsShowData[row.$index].storageId = res.data.data[0].storageId;
|
|
|
this.goodsShowData[row.$index].storageName = res.data.data[0].storageName;
|
|
@@ -3130,6 +3146,13 @@ export default {
|
|
|
item.storageId = this.contactsForm.storageId
|
|
|
});*/
|
|
|
await this.computedCost()
|
|
|
+
|
|
|
+ // 把库区拼接的id拆开
|
|
|
+ for(let item of this.form.orderItemsList) {
|
|
|
+ console.log(item.storageId.indexOf('-'),3151)
|
|
|
+ item.storageId = item.storageId.slice(0,item.storageId.indexOf('-'))
|
|
|
+ }
|
|
|
+
|
|
|
typeSave(this.form).then(res => {
|
|
|
if (!other) {
|
|
|
this.$message({ type: "success", message: this.form.id ? "修改成功!" : "新增成功!" });
|