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

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

@ -157,8 +157,17 @@
<el-text @click="handleView(slotProps.scope)"> 查看 </el-text> <el-text @click="handleView(slotProps.scope)"> 查看 </el-text>
<el-text @click="handleCallDeliveryOwn(slotProps.scope)"> 修改客户信息 </el-text> <el-text @click="handleCallDeliveryOwn(slotProps.scope)"> 修改客户信息 </el-text>
<el-text @click="handleGoLogs(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
<el-text @click="zeroSplittheorder(slotProps.scope.row)" v-if="slotProps.scope.row.isZero ==1" >零担拆单</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>
</template> </template>
</tablecmt> </tablecmt>
@ -483,8 +492,6 @@
<div>运单总件数</div> <div>运单总件数</div>
<div>{{ rowobj.totalCount }}</div> <div>{{ rowobj.totalCount }}</div>
</div> </div>
</div> </div>
<div class="titlxbx"> <div class="titlxbx">
<div> <div>
@ -502,8 +509,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="maxitembxlist" v-loading="zeroload" <div class="maxitembxlist" v-loading="zeroload" element-loading-text="Loading...">
element-loading-text="Loading...">
<div class="items" v-for="(item, index) in orderlist" :key="item"> <div class="items" v-for="(item, index) in orderlist" :key="item">
<div class="titltophead"> <div class="titltophead">
<div>订单{{ index + 1 }}</div> <div>订单{{ index + 1 }}</div>
@ -526,11 +532,7 @@
{{ itemlimit.productName }} {{ itemlimit.productName }}
</div> </div>
<div class="numbinput"> <div class="numbinput">
<el-input-number <el-input-number class="w100" v-model="itemlimit.quantity" disabled />
class="w100"
v-model="itemlimit.quantity"
disabled
/>
</div> </div>
<div class="numbinput"> <div class="numbinput">
<el-input-number <el-input-number
@ -579,7 +581,7 @@
</div> </div>
</div> </div>
<div class="btsbx"> <div class="btsbx">
<el-button @click="zerodialogTableVisible=false">取消</el-button> <el-button @click="zerodialogTableVisible = false">取消</el-button>
<el-button :disabled="zeroload" type="primary" @click="hidedial">确认</el-button> <el-button :disabled="zeroload" type="primary" @click="hidedial">确认</el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -689,7 +691,7 @@ import { getDictionaryBiz } from '@/api/system/dict';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { exportBlob } from '@/api/common'; import { exportBlob } from '@/api/common';
import { getToken } from '@/utils/auth'; import { getToken } from '@/utils/auth';
import { downloadXls, getObjType, handleClearTableQuery,isNumber } from '@/utils/util'; import { downloadXls, getObjType, handleClearTableQuery, isNumber } from '@/utils/util';
import { columnList } from '@/option/distribution/distributionStockArticleSelf'; import { columnList } from '@/option/distribution/distributionStockArticleSelf';
import { deepClone, setNodeHeight, hanleTextLineFeed } from '@/utils/util.js'; import { deepClone, setNodeHeight, hanleTextLineFeed } from '@/utils/util.js';
import { ElMessage, ElMessageBox } from 'element-plus'; import { ElMessage, ElMessageBox } from 'element-plus';
@ -701,9 +703,9 @@ export default {
excelForm: {}, excelForm: {},
excelBox: false, excelBox: false,
tcloading: false, tcloading: false,
rowobj:{}, rowobj: {},
zeroload:false, zeroload: false,
parcelList:[], parcelList: [],
orderobj: { orderobj: {
name: '', name: '',
phone: '', phone: '',
@ -730,7 +732,7 @@ export default {
], ],
}, },
], ],
zerodialogTableVisible:false, zerodialogTableVisible: false,
Totalnumbersplitorders: 0, Totalnumbersplitorders: 0,
dataRwo: {}, dataRwo: {},
ruleForm: { ruleForm: {
@ -896,13 +898,16 @@ export default {
computed: { computed: {
...mapGetters(['permission']), ...mapGetters(['permission']),
permissionList() { permissionList() {
console.log(this.permission,'this.permission'); console.log(this.permission, 'this.permission');
return { return {
addBtn: this.validData(this.permission.basicdataBrandCategory_add, false), addBtn: this.validData(this.permission.basicdataBrandCategory_add, false),
viewBtn: this.validData(this.permission.basicdataBrandCategory_view, false), viewBtn: this.validData(this.permission.basicdataBrandCategory_view, false),
delBtn: this.validData(this.permission.basicdataBrandCategory_delete, false), delBtn: this.validData(this.permission.basicdataBrandCategory_delete, false),
editBtn: this.validData(this.permission.basicdataBrandCategory_edit, 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() { ids() {
@ -1458,7 +1463,7 @@ export default {
type: 'warning', type: 'warning',
}); });
} else { } else {
this.Splittheform.PackageList=[ this.Splittheform.PackageList = [
{ {
stockArticleId: '', //ID stockArticleId: '', //ID
orderCode: '', // orderCode: '', //
@ -1468,7 +1473,7 @@ export default {
customerTelephone: '', // customerTelephone: '', //
customerAddress: '', // customerAddress: '', //
}, },
] ];
this.dialogSplitthe = true; this.dialogSplitthe = true;
} }
} }
@ -1481,40 +1486,40 @@ export default {
}); });
}, },
// //
async zeroSplittheorder(row){ async zeroSplittheorder(row) {
console.log(row); console.log(row);
this.zerodialogTableVisible=true this.zerodialogTableVisible = true;
let _data={ let _data = {
orderId:row.id orderId: row.id,
} };
let res= await $_zeroetail(_data) let res = await $_zeroetail(_data);
console.log(res,'res'); console.log(res, 'res');
const {code , data } = res.data const { code, data } = res.data;
if(code !=200){ if (code != 200) {
return return;
}
let _obj ={
...data.orderInfo,...data.waybillEntity
} }
console.log(data.orderInfo,'data.orderInfo'); let _obj = {
...data.orderInfo,
...data.waybillEntity,
};
console.log(data.orderInfo, 'data.orderInfo');
console.log(data.waybillEntity,'data.waybillEntity'); console.log(data.waybillEntity, 'data.waybillEntity');
console.log( _obj,' _obj'); console.log(_obj, ' _obj');
let Name = data.parcelList.map(res=>res.firsts).join(',') let Name = data.parcelList.map(res => res.firsts).join(',');
this.rowobj=_obj this.rowobj = _obj;
this.orderlist.splice(1); this.orderlist.splice(1);
this.parcelList=data.parcelList; this.parcelList = data.parcelList;
// 使 // 使
['addres', 'name', 'phone', 'rak'].forEach(prop => { ['addres', 'name', 'phone', 'rak'].forEach(prop => {
this.orderlist[0][prop] = ''; this.orderlist[0][prop] = '';
}); });
this.orderlist[0].goods = this.splitName(Name,data.parcelList); this.orderlist[0].goods = this.splitName(Name, data.parcelList);
console.log(this.orderlist[0],'this.orderlist[0]'); console.log(this.orderlist[0], 'this.orderlist[0]');
}, },
addorder() { addorder() {
// copy // copy
@ -1522,8 +1527,8 @@ export default {
obsj.goods = this.splitName(this.rowobj.goodsName, this.parcelList); obsj.goods = this.splitName(this.rowobj.goodsName, this.parcelList);
this.orderlist.push(obsj); this.orderlist.push(obsj);
}, },
splitName(goodName,data) { splitName(goodName, data) {
console.log(goodName,'goodName'); console.log(goodName, 'goodName');
var t = goodName.split(','); var t = goodName.split(',');
var arr = []; var arr = [];
@ -1532,7 +1537,7 @@ export default {
var o = {}; var o = {};
o.productName = proN; o.productName = proN;
o.splitNum = 0; o.splitNum = 0;
o.quantity=data[i].quantity; o.quantity = data[i].quantity;
arr[i] = o; arr[i] = o;
} }
return arr; return arr;
@ -1545,7 +1550,7 @@ export default {
this.orderlist.splice(index, 1); this.orderlist.splice(index, 1);
}, },
async hidedial() { async hidedial() {
this.zeroload=true this.zeroload = true;
try { try {
let _arr = []; let _arr = [];
let totalNum = 0; let totalNum = 0;
@ -1572,7 +1577,7 @@ export default {
}; };
_arr.push(obj); _arr.push(obj);
} }
console.log(this.rowobj,'this.rowobj'); console.log(this.rowobj, 'this.rowobj');
console.log('_arr :>> ', _arr); console.log('_arr :>> ', _arr);
@ -1580,7 +1585,7 @@ export default {
if (totalNum > this.rowobj.handQuantity) return this.$message.error('总数大于可用数量'); if (totalNum > this.rowobj.handQuantity) return this.$message.error('总数大于可用数量');
this.dialogTableVisible = false; this.dialogTableVisible = false;
console.log(_arr); console.log(_arr);
this.zeroload=true this.zeroload = true;
const res = await $_splitOrder(_arr); const res = await $_splitOrder(_arr);
const { code, data } = res.data; const { code, data } = res.data;
@ -1590,7 +1595,7 @@ export default {
this.page.currentPage = 1; this.page.currentPage = 1;
this.onLoad(this.page); this.onLoad(this.page);
this.zerodialogTableVisible=false this.zerodialogTableVisible = false;
// splitOrder(row).then(res => { // splitOrder(row).then(res => {
// const data = res.data.data; // const data = res.data.data;
// this.page.total = data.total; // this.page.total = data.total;
@ -1603,11 +1608,10 @@ export default {
console.log('error :>> ', error); console.log('error :>> ', error);
} finally { } finally {
console.log('111 :>> ', 111); console.log('111 :>> ', 111);
this.zeroload=false this.zeroload = false;
} }
}, },
// //
changeTaskNumber() { changeTaskNumber() {
this.Totalnumbersplitorders = this.Splittheform.PackageList.reduce( this.Totalnumbersplitorders = this.Splittheform.PackageList.reduce(
@ -1647,12 +1651,11 @@ export default {
let taskNumberState = this.Splittheform.PackageList.find(item => item.taskNumber == 0); let taskNumberState = this.Splittheform.PackageList.find(item => item.taskNumber == 0);
if (taskNumberState) { if (taskNumberState) {
this.$message({ this.$message({
message: '存在拆单数量为0的任务', message: '存在拆单数量为0的任务',
type: 'warning', type: 'warning',
}); });
return; return;
} }
console.log(this.Splittheform.PackageList);
let sum = this.Splittheform.PackageList.reduce((accumulator, currentValue) => { let sum = this.Splittheform.PackageList.reduce((accumulator, currentValue) => {
if (!currentValue || currentValue.taskNumber == null) { if (!currentValue || currentValue.taskNumber == null) {
return accumulator; return accumulator;
@ -1695,7 +1698,7 @@ export default {
ElMessage({ ElMessage({
message: res.data.msg, message: res.data.msg,
type: 'success', type: 'success',
}) });
this.onLoad(this.page); this.onLoad(this.page);
} }
}) })
@ -1707,6 +1710,11 @@ export default {
}); });
}) })
.catch(() => {}); .catch(() => {});
} else {
ElMessage({
message: '信息未填写完整或填写格式不正确!',
type: 'warning',
});
} }
}); });
}, },
@ -1921,7 +1929,6 @@ export default {
this.getAllOrderInfo(); this.getAllOrderInfo();
const [res] = await Promise.all([ const [res] = await Promise.all([
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)), getList(page.currentPage, page.pageSize, Object.assign(params, this.query)),
]); ]);
const data = res.data.data; const data = res.data.data;
@ -2193,7 +2200,7 @@ export default {
} }
} }
.numbinput { .numbinput {
.el-input-number{ .el-input-number {
width: 100%; width: 100%;
} }
} }
@ -2295,8 +2302,7 @@ export default {
input { input {
font-size: 12px !important; font-size: 12px !important;
} }
.el-input{ .el-input {
width: 100%; width: 100%;
} }
textarea { textarea {

Loading…
Cancel
Save