qb 6 months ago
parent
commit
e7979048f1
  1. 74
      src/views/distribution/inventory/delivery/distributionStockArticle.vue

74
src/views/distribution/inventory/delivery/distributionStockArticle.vue

@ -157,8 +157,17 @@
<el-text @click="handleView(slotProps.scope)"> 查看 </el-text>
<el-text @click="handleCallDeliveryOwn(slotProps.scope)"> 修改客户信息 </el-text>
<el-text @click="handleGoLogs(slotProps.scope)"> 日志 </el-text>
<el-text @click="Splittheorder(slotProps.scope.row)" v-if="slotProps.scope.row.isZero ==0 && permissionList.distributionStockList_unpack"> 拆单 </el-text>
<el-text @click="zeroSplittheorder(slotProps.scope.row)" v-if="slotProps.scope.row.isZero ==1" >零担拆单</el-text>
<el-text
@click="Splittheorder(slotProps.scope.row)"
v-if="slotProps.scope.row.isZero == 0 && permissionList.distributionStockList_unpack"
>
拆单
</el-text>
<el-text
@click="zeroSplittheorder(slotProps.scope.row)"
v-if="slotProps.scope.row.isZero == 1"
>零担拆单</el-text
>
</template>
</template>
</tablecmt>
@ -483,8 +492,6 @@
<div>运单总件数</div>
<div>{{ rowobj.totalCount }}</div>
</div>
</div>
<div class="titlxbx">
<div>
@ -502,8 +509,7 @@
</div>
</div>
</div>
<div class="maxitembxlist" v-loading="zeroload"
element-loading-text="Loading...">
<div class="maxitembxlist" v-loading="zeroload" element-loading-text="Loading...">
<div class="items" v-for="(item, index) in orderlist" :key="item">
<div class="titltophead">
<div>订单{{ index + 1 }}</div>
@ -526,11 +532,7 @@
{{ itemlimit.productName }}
</div>
<div class="numbinput">
<el-input-number
class="w100"
v-model="itemlimit.quantity"
disabled
/>
<el-input-number class="w100" v-model="itemlimit.quantity" disabled />
</div>
<div class="numbinput">
<el-input-number
@ -902,7 +904,10 @@ export default {
viewBtn: this.validData(this.permission.basicdataBrandCategory_view, false),
delBtn: this.validData(this.permission.basicdataBrandCategory_delete, false),
editBtn: this.validData(this.permission.basicdataBrandCategory_edit, false),
distributionStockList_unpack: this.validData(this.permission.distributionStockList_unpack, false),
distributionStockList_unpack: this.validData(
this.permission.distributionStockList_unpack,
false
),
};
},
ids() {
@ -1468,7 +1473,7 @@ export default {
customerTelephone: '', //
customerAddress: '', //
},
]
];
this.dialogSplitthe = true;
}
}
@ -1484,27 +1489,28 @@ export default {
async zeroSplittheorder(row) {
console.log(row);
this.zerodialogTableVisible=true
this.zerodialogTableVisible = true;
let _data = {
orderId:row.id
}
let res= await $_zeroetail(_data)
orderId: row.id,
};
let res = await $_zeroetail(_data);
console.log(res, 'res');
const {code , data } = res.data
const { code, data } = res.data;
if (code != 200) {
return
return;
}
let _obj = {
...data.orderInfo,...data.waybillEntity
}
...data.orderInfo,
...data.waybillEntity,
};
console.log(data.orderInfo, 'data.orderInfo');
console.log(data.waybillEntity, 'data.waybillEntity');
console.log(_obj, ' _obj');
let Name = data.parcelList.map(res=>res.firsts).join(',')
this.rowobj=_obj
let Name = data.parcelList.map(res => res.firsts).join(',');
this.rowobj = _obj;
this.orderlist.splice(1);
this.parcelList = data.parcelList;
@ -1514,7 +1520,6 @@ export default {
});
this.orderlist[0].goods = this.splitName(Name, data.parcelList);
console.log(this.orderlist[0], 'this.orderlist[0]');
},
addorder() {
// copy
@ -1545,7 +1550,7 @@ export default {
this.orderlist.splice(index, 1);
},
async hidedial() {
this.zeroload=true
this.zeroload = true;
try {
let _arr = [];
let totalNum = 0;
@ -1580,7 +1585,7 @@ export default {
if (totalNum > this.rowobj.handQuantity) return this.$message.error('总数大于可用数量');
this.dialogTableVisible = false;
console.log(_arr);
this.zeroload=true
this.zeroload = true;
const res = await $_splitOrder(_arr);
const { code, data } = res.data;
@ -1590,7 +1595,7 @@ export default {
this.page.currentPage = 1;
this.onLoad(this.page);
this.zerodialogTableVisible=false
this.zerodialogTableVisible = false;
// splitOrder(row).then(res => {
// const data = res.data.data;
// this.page.total = data.total;
@ -1603,11 +1608,10 @@ export default {
console.log('error :>> ', error);
} finally {
console.log('111 :>> ', 111);
this.zeroload=false
this.zeroload = false;
}
},
//
changeTaskNumber() {
this.Totalnumbersplitorders = this.Splittheform.PackageList.reduce(
@ -1647,12 +1651,11 @@ export default {
let taskNumberState = this.Splittheform.PackageList.find(item => item.taskNumber == 0);
if (taskNumberState) {
this.$message({
message: '存在拆单数量为0的任务',
message: '存在拆单数量为0的任务',
type: 'warning',
});
return;
}
console.log(this.Splittheform.PackageList);
let sum = this.Splittheform.PackageList.reduce((accumulator, currentValue) => {
if (!currentValue || currentValue.taskNumber == null) {
return accumulator;
@ -1695,7 +1698,7 @@ export default {
ElMessage({
message: res.data.msg,
type: 'success',
})
});
this.onLoad(this.page);
}
})
@ -1707,6 +1710,11 @@ export default {
});
})
.catch(() => {});
} else {
ElMessage({
message: '信息未填写完整或填写格式不正确!',
type: 'warning',
});
}
});
},
@ -1921,7 +1929,6 @@ export default {
this.getAllOrderInfo();
const [res] = await Promise.all([
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)),
]);
const data = res.data.data;
@ -2296,7 +2303,6 @@ export default {
font-size: 12px !important;
}
.el-input {
width: 100%;
}
textarea {

Loading…
Cancel
Save