Browse Source

修改自提零担提交

fix_bug_pro20231227
qb 1 year ago
parent
commit
09d2176e17
  1. 12
      src/api/distribution/distrilbutionBillLading.js
  2. 177
      src/views/distribution/inventory/distrilbutionBillLading.vue
  3. 4
      vite.config.js

12
src/api/distribution/distrilbutionBillLading.js

@ -171,4 +171,14 @@ export const update = (row) => {
data: row data: row
}) })
} }
/**
* 获取零担订单详情数据
* @param {*} params
*/
export const zeroMaterial = params => {
return request({
url: '/api/logpm-distribution/distributionParcelList/zeroMaterial',
method: 'get',
params,
});
};

177
src/views/distribution/inventory/distrilbutionBillLading.vue

@ -181,7 +181,7 @@
<el-form-item label="费用" prop="freightMark"> <el-form-item label="费用" prop="freightMark">
<el-checkbox-group v-model="form.freightMark" @change="handleCheckedCitiesChange"> <el-checkbox-group v-model="form.freightMark" @change="handleCheckedCitiesChange">
<el-checkbox <el-checkbox
style="min-width: 16%; margin-bottom: 8px;" style="min-width: 16%; margin-bottom: 8px"
v-for="(item, index) in clientType" v-for="(item, index) in clientType"
:key="item.dictKey" :key="item.dictKey"
:label="item.dictKey" :label="item.dictKey"
@ -249,7 +249,8 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="库存品"> <el-tab-pane label="库存品">
<el-button type="primary" text icon="el-icon-view" @click="handleAddView(row)" <el-button type="primary" text icon="el-icon-view" @click="handleAddView(row)"
>新增</el-button> >新增</el-button
>
<tablecmt <tablecmt
:columnList="columnStock" :columnList="columnStock"
:tableData="data" :tableData="data"
@ -464,8 +465,27 @@
</template> </template>
</el-dialog> </el-dialog>
<el-dialog v-model="dialogFormZeroOrderVisible" title="修改零担" style="width: 50%"> <!-- 零担订单信息修改 -->
<el-dialog v-model="dialogFormZeroOrderVisible" title="修改订单信息" center style="width: 50%">
<template v-if="zeroOrderFormList">
<div style="display: flex; align-items: center; text-align: center">
<div style="width: 120px">名称</div>
<div style="flex: 1">数量</div>
</div>
<el-form-item
:label="item.firsts"
label-width="120px"
v-for="item in zeroOrderFormList"
:key="item"
>
<el-input-number :min="0" :max="item.maxNum" v-model="item.quantity" />
</el-form-item>
</template>
<div style="text-align: center">
<el-button type="primary" @click="handleRowZeroOrder">确定</el-button>
<el-button @click="dialogFormZeroOrderVisible = false">取消</el-button>
</div>
</el-dialog> </el-dialog>
</basic-container> </basic-container>
</template> </template>
@ -477,6 +497,7 @@ import {
add, add,
update, update,
remove, remove,
zeroMaterial,
} from '@/api/distribution/distrilbutionBillLading'; } from '@/api/distribution/distrilbutionBillLading';
import { getListOwn } from '@/api/distribution/distributionParcelList'; import { getListOwn } from '@/api/distribution/distributionParcelList';
import option from '@/option/distribution/distrilbutionBillLading'; import option from '@/option/distribution/distrilbutionBillLading';
@ -504,6 +525,7 @@ export default {
head: false, head: false,
}, },
], ],
zeroOrderFormList: [],
dialogFormVisible: false, dialogFormVisible: false,
dialogFormOrderVisible: false, // dialogFormOrderVisible: false, //
dialogFormZeroOrderVisible: false, // dialogFormZeroOrderVisible: false, //
@ -546,6 +568,7 @@ export default {
selectionList: [], selectionList: [],
stockupDate: [], // stockupDate: [], //
selectionListStock: [], // selectionListStock: [], //
// //
option: option, option: option,
// //
@ -1028,6 +1051,15 @@ export default {
// ... // ...
], ],
columnListedit: [ columnListedit: [
{
prop: '',
label: '序号',
type: 0,
values: '',
width: 55,
checkarr: [],
fixed: true,
},
{ {
prop: 'serviceNumber', prop: 'serviceNumber',
label: '服务号', label: '服务号',
@ -1606,7 +1638,6 @@ export default {
watch: { watch: {
'$route.query.id': { '$route.query.id': {
handler(newVal, oldVal) { handler(newVal, oldVal) {
// console.log(newVal, oldVal);
if (this.$route.query.type == '2') { if (this.$route.query.type == '2') {
// //
this.getDetailOen(); this.getDetailOen();
@ -1655,7 +1686,6 @@ export default {
* 固定搭配只需要更换 columnList * 固定搭配只需要更换 columnList
*/ */
setnewcolum(newarr, headarr, type) { setnewcolum(newarr, headarr, type) {
// console.log(newarr,'+++++++++++')
if (type == 1) { if (type == 1) {
this.columnList = newarr; this.columnList = newarr;
this.$functions.setStorage(window.location.pathname + 'checkList', headarr); this.$functions.setStorage(window.location.pathname + 'checkList', headarr);
@ -1682,7 +1712,6 @@ export default {
console.log(index, row); console.log(index, row);
}, },
selectsc(index, row) { selectsc(index, row) {
console.log(index, row);
if (row.prop === 'freezeStatusName') { if (row.prop === 'freezeStatusName') {
this.queryOrder['freezeStatus'] = index; this.queryOrder['freezeStatus'] = index;
} else if (row.prop === 'completeSetName') { } else if (row.prop === 'completeSetName') {
@ -1705,7 +1734,6 @@ export default {
this.onLoadOrder(this.pageOrder); this.onLoadOrder(this.pageOrder);
}, },
timesc(index, row) { timesc(index, row) {
console.log(index, row);
if (!!index) { if (!!index) {
index = dayjs(index).format('YYYY-MM-DD'); index = dayjs(index).format('YYYY-MM-DD');
} }
@ -1716,7 +1744,6 @@ export default {
this.onLoadOrder(this.pageOrder); this.onLoadOrder(this.pageOrder);
}, },
inputsc(index, row) { inputsc(index, row) {
console.log(index, row);
this.query[row.prop] = index; this.query[row.prop] = index;
this.onLoadOrder(this.pageOrder); this.onLoadOrder(this.pageOrder);
}, },
@ -1724,7 +1751,6 @@ export default {
getDetailOen() { getDetailOen() {
this.orderAdd = true; this.orderAdd = true;
getDetail(this.$route.query.id).then(res => { getDetail(this.$route.query.id).then(res => {
// console.log("",res.data.data);
let s = res.data.data; let s = res.data.data;
this.form = s; this.form = s;
let f = []; let f = [];
@ -1770,9 +1796,6 @@ export default {
this.fileListLibrary = genreMapping['3']; this.fileListLibrary = genreMapping['3'];
this.fileListSell = genreMapping['1']; this.fileListSell = genreMapping['1'];
this.fileListClerk = genreMapping['2']; this.fileListClerk = genreMapping['2'];
// console.log("le1",le1);
// console.log("le2",le2);
// console.log("le3",le3);
} }
this.loading = false; this.loading = false;
@ -1780,7 +1803,6 @@ export default {
}, },
// //
rowStock(row) { rowStock(row) {
console.log('>>?>?><?', row);
this.data.forEach(i => { this.data.forEach(i => {
if (i.id === row.id) { if (i.id === row.id) {
this.data; this.data;
@ -1795,7 +1817,6 @@ export default {
}, },
// //
rowOrder(row) { rowOrder(row) {
console.log('>>?>?><?', row);
this.dataList.forEach(i => { this.dataList.forEach(i => {
if (i.id === row.id) { if (i.id === row.id) {
this.dataList; this.dataList;
@ -1853,7 +1874,6 @@ export default {
let isa = false; let isa = false;
this.selectionList.some(i => { this.selectionList.some(i => {
let a = this.dataList.filter(ele => ele.id == i.id).length >= 1; let a = this.dataList.filter(ele => ele.id == i.id).length >= 1;
// console.log("asdgfasdv",a);
if (!a) { if (!a) {
this.dataList.push(i); this.dataList.push(i);
} }
@ -1869,22 +1889,17 @@ export default {
return; return;
} }
let isa = false; let isa = false;
// console.log('');
this.selectionListStock.some(i => { this.selectionListStock.some(i => {
// console.log('', i);
if (parseInt(i.inventoryQuantity) > parseInt(i.quantityStock)) { if (parseInt(i.inventoryQuantity) > parseInt(i.quantityStock)) {
// this.$message.warning(""); // this.$message.warning("");
isa = true; isa = true;
return; return;
} }
let a = this.data.filter(ele => ele.id == i.id).length >= 1; let a = this.data.filter(ele => ele.id == i.id).length >= 1;
// console.log("",a);
if (!a) { if (!a) {
// console.log("");
this.data.push(i); this.data.push(i);
} else if (a) { } else if (a) {
this.data.forEach(ii => { this.data.forEach(ii => {
// console.log("",ii);
if ( if (
ii.id == i.id && ii.id == i.id &&
parseInt(ii.inventoryQuantity) + parseInt(i.inventoryQuantity) < ii.quantityStock parseInt(ii.inventoryQuantity) + parseInt(i.inventoryQuantity) < ii.quantityStock
@ -1901,7 +1916,6 @@ export default {
}, },
// //
handleNumberRange(e, row) { handleNumberRange(e, row) {
// console.log('2222', e, e.target.value, row);
if (e.target.value) { if (e.target.value) {
e.target.value = e.target.value.replace(/[^\.\d]/g, ''); // e.target.value = e.target.value.replace(/[^\.\d]/g, ''); //
if (e.target.value) { if (e.target.value) {
@ -1915,10 +1929,6 @@ export default {
} }
}, },
uploadSuccess(fileList) { uploadSuccess(fileList) {
console.log('123123123', fileList);
// console.log('123123123==fileListSell', this.fileListSell);
// console.log('123123123==fileListClerk', this.fileListClerk);
// console.log('123123123==fileListLibrary', this.fileListLibrary);
// this.form.fileName = // this.form.fileName =
// this.$set(row, 'imageCos', fileList); // this.$set(row, 'imageCos', fileList);
}, },
@ -1929,11 +1939,8 @@ export default {
console.log(file); console.log(file);
}, },
textbox(e, index) { textbox(e, index) {
console.log('e',e);
let nu = index + 1; let nu = index + 1;
let a = this.costListName[index]; let a = this.costListName[index];
// console.log("<><><><>",e,nu);
// console.log("aaaa",a);
this.costList[nu] = e; this.costList[nu] = e;
if (!!a) { if (!!a) {
// //
@ -1945,21 +1952,15 @@ export default {
} }
}, },
handleCheckedCitiesChange(value) { handleCheckedCitiesChange(value) {
// console.log(">>>>>>>",value );
if (value.length < 1) { if (value.length < 1) {
this.costListName = []; this.costListName = [];
} }
this.clientType.forEach(i => { this.clientType.forEach(i => {
if (value.includes(i.dictKey)) { if (value.includes(i.dictKey)) {
console.log(i);
i.pitch = true; i.pitch = true;
this.costListName = value; this.costListName = value;
} }
}); });
// console.log("",this.clientType);
console.log('选择的', this.costListName);
console.log('价格', this.costList);
let n = 0; let n = 0;
value.forEach(s => { value.forEach(s => {
let a = this.costList[s]; let a = this.costList[s];
@ -2039,7 +2040,6 @@ export default {
this.onLoad(this.page); this.onLoad(this.page);
}, },
bianLier(costListName, clientType, costList, fei) { bianLier(costListName, clientType, costList, fei) {
// console.log(">>>>>>>>>",costListName,clientType,costList,fei);
this.pan = false; this.pan = false;
for (let i = 0; i < costListName.length; i++) { for (let i = 0; i < costListName.length; i++) {
if (!costList) { if (!costList) {
@ -2047,9 +2047,7 @@ export default {
return; return;
} }
for (let a = 0; a < clientType.length; a++) { for (let a = 0; a < clientType.length; a++) {
// console.log("",clientType[a].dictKey , costListName[i]);
if (clientType[a].dictKey == costListName[i]) { if (clientType[a].dictKey == costListName[i]) {
// console.log("",clientType[a].dictKey , costListName[i]);
let zhi = costList[costListName[i]]; let zhi = costList[costListName[i]];
if (!zhi) { if (!zhi) {
this.pan = true; this.pan = true;
@ -2063,6 +2061,26 @@ export default {
} }
}, },
async handleSubmit() { async handleSubmit() {
const zeroOrderList = this.dataList.filter(val => val.isZero === '1');
//
const wrongZeroOrder = zeroOrderList.find(val => !val.ParcelLisList);
console.log('wrongZeroOrder :>> ', wrongZeroOrder);
if (wrongZeroOrder)
return this.$message({
type: 'error',
message: `订单自编号为${wrongZeroOrder.orderCode}的物料数量为编辑`,
});
if (zeroOrderList) {
//
const isSubmit = zeroOrderList.every(item => {
return item.ParcelLisList.every(val => val.quantity);
});
if (!isSubmit)
return this.$message({
type: 'error',
message: '有零担物料未填写',
});
}
this.$refs.form.validate(async valid => { this.$refs.form.validate(async valid => {
if (valid) { if (valid) {
if (!this.form.id) { if (!this.form.id) {
@ -2078,7 +2096,6 @@ export default {
let o = []; let o = [];
if (this.fileListClerk.length > 0) { if (this.fileListClerk.length > 0) {
this.fileListClerk.forEach(i => { this.fileListClerk.forEach(i => {
// console.log("iiii",i);
let num = {}; let num = {};
num.state = '2'; num.state = '2';
num.name = i.name; num.name = i.name;
@ -2088,7 +2105,6 @@ export default {
} }
if (this.fileListLibrary.length > 0) { if (this.fileListLibrary.length > 0) {
this.fileListLibrary.forEach(i => { this.fileListLibrary.forEach(i => {
// console.log("",i);
let num = {}; let num = {};
num.state = '3'; num.state = '3';
num.name = i.name; num.name = i.name;
@ -2098,7 +2114,6 @@ export default {
} }
if (this.fileListSell.length > 0) { if (this.fileListSell.length > 0) {
this.fileListSell.forEach(i => { this.fileListSell.forEach(i => {
// console.log(",.,.,.,.",i);
let num = {}; let num = {};
num.state = '1'; num.state = '1';
num.name = i.name; num.name = i.name;
@ -2112,14 +2127,26 @@ export default {
} }
if (this.orderAdd && this.dataList.length > 0) { if (this.orderAdd && this.dataList.length > 0) {
let a = this.dataList.map(i => i.id); let a = this.dataList.map(i => i.id);
console.log('aaaaa', a);
this.form.stockArticleId = this.form.stockArticleId =
this.form.stockArticleId != null this.form.stockArticleId != null
? this.form.stockArticleId + a.join(',') ? this.form.stockArticleId + a.join(',')
: a.join(','); : a.join(',');
} }
console.log('this.form', this.form); const data = this.form;
//
if (zeroOrderList){
data.parcelLisList = []
data.zeroType = '2'
zeroOrderList.forEach(val => {
val.ParcelLisList.forEach(item => {
data.parcelLisList.push(item)
})
})
}else{
data.zeroType = '1'
}
add(this.form).then(() => { add(this.form).then(() => {
this.box = false; this.box = false;
this.onLoad(this.page); this.onLoad(this.page);
@ -2146,7 +2173,6 @@ export default {
Object.entries(fileListMapping).forEach(([fileList, state]) => { Object.entries(fileListMapping).forEach(([fileList, state]) => {
if (this[fileList].length > 0) { if (this[fileList].length > 0) {
this[fileList].forEach(i => { this[fileList].forEach(i => {
console.log('i>>>>', i);
let num = { let num = {
state, state,
}; };
@ -2163,7 +2189,6 @@ export default {
} }
}); });
this.form.printList = o.length > 0 ? o : []; this.form.printList = o.length > 0 ? o : [];
// console.log("",this.form);
let up = {}; let up = {};
up.printList = o.length > 0 ? o : []; up.printList = o.length > 0 ? o : [];
up.fei = this.form.fei; up.fei = this.form.fei;
@ -2248,7 +2273,6 @@ export default {
getListOne(page.currentPage, page.pageSize, Object.assign(params, this.queryOrder)).then( getListOne(page.currentPage, page.pageSize, Object.assign(params, this.queryOrder)).then(
res => { res => {
const data = res.data.data; const data = res.data.data;
console.log('>>>>>>>', data.records);
this.pageOrder.total = data.total; this.pageOrder.total = data.total;
this.dataOrder = data.records; this.dataOrder = data.records;
this.dataOrder = this.dataOrder.map(i => { this.dataOrder = this.dataOrder.map(i => {
@ -2273,7 +2297,6 @@ export default {
this.dataOrder.forEach(i => { this.dataOrder.forEach(i => {
let asas = this.dataList.find(l => l.id == i.id); let asas = this.dataList.find(l => l.id == i.id);
if (!!asas) { if (!!asas) {
console.log('存在的数据》》》', asas);
this.selectionList.push(i.id); this.selectionList.push(i.id);
} }
}); });
@ -2287,7 +2310,6 @@ export default {
}, },
// //
handleAddView(row) { handleAddView(row) {
console.log('row :>> ', row);
this.selectionList = []; this.selectionList = [];
this.dialogFormVisible = true; this.dialogFormVisible = true;
this.onLoadList(this.pageStock); this.onLoadList(this.pageStock);
@ -2345,7 +2367,6 @@ export default {
} }
}, },
selectionChangeStock(list) { selectionChangeStock(list) {
// console.log('', list);
this.selectionListStock = list; this.selectionListStock = list;
}, },
selectionClear() { selectionClear() {
@ -2375,7 +2396,6 @@ export default {
this.orderAdd = false; this.orderAdd = false;
getListOne(page.currentPage, page.pageSize, params).then(res => { getListOne(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data; const data = res.data.data;
console.log('订单详细>>>>>>>>>===', data);
this.dataList = data.records; this.dataList = data.records;
this.loading = false; this.loading = false;
this.selectionClear(); this.selectionClear();
@ -2401,7 +2421,6 @@ export default {
a = this.dataOrder[0]; a = this.dataOrder[0];
} }
// let a = this.dataList[0]; // let a = this.dataList[0];
console.log('aaa', a);
if (!!a.mallId) { if (!!a.mallId) {
params.marketId = a.mallId; params.marketId = a.mallId;
params.warehouseId = a.warehouseId; params.warehouseId = a.warehouseId;
@ -2425,7 +2444,6 @@ export default {
this.loading = true; this.loading = true;
this.query.stockArticleIds = this.$route.query.id; this.query.stockArticleIds = this.$route.query.id;
getListOwn(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { getListOwn(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
console.log('包件信息>>>>', res.data.data);
const dataList = res.data.data; const dataList = res.data.data;
this.page.total = dataList.total; this.page.total = dataList.total;
this.dataList = dataList.records; this.dataList = dataList.records;
@ -2433,16 +2451,49 @@ export default {
this.selectionClear(); this.selectionClear();
}); });
}, },
// //
handleZeroOrder(row){ async handleZeroOrder(row) {
console.log('row :>> ', row); const handleParcelLisList = this.dataList.find(val => val.id === row.id).ParcelLisList;
console.log('row.isZero', row.isZero) // ,
this.dialogFormZeroOrderVisible = true if (handleParcelLisList) {
} this.zeroOrderFormList = handleParcelLisList;
}, this.dialogFormZeroOrderVisible = true;
watch: { return;
clientType(newVal, oldVal) { }
console.log('newVal', newVal);
//
const res = await zeroMaterial({ stockArticleId: row.id });
console.log('res :>> ', res);
const { code, data } = res.data;
if (code === 200) {
this.zeroOrderFormList = data.map(val => {
const zeroOrder = {
// id
stockArticleId: val.stockArticleId,
// id
id: val.id,
//
maxNum: val.quantity,
//
quantity: val.quantity,
//
firsts: val.firsts,
};
if (row.completeSetName !== '是') zeroOrder.quantity = null;
return zeroOrder;
});
console.log('this.zeroOrderFormList :>> ', this.zeroOrderFormList);
}
//
this.dialogFormZeroOrderVisible = true;
},
//
handleRowZeroOrder() {
// dataList
this.dataList.find(val => val.id === this.zeroOrderFormList[0].stockArticleId).ParcelLisList =
this.zeroOrderFormList;
//
this.dialogFormZeroOrderVisible = false;
}, },
}, },
}; };
@ -2486,4 +2537,8 @@ export default {
.el-checkbox { .el-checkbox {
margin-left: 0; margin-left: 0;
} }
.el-input-number {
width: 100%;
}
</style> </style>

4
vite.config.js

@ -14,9 +14,9 @@ export default ({ mode, command }) => {
'/api': { '/api': {
// target: 'http://192.168.10.126:8889', // target: 'http://192.168.10.126:8889',
// target: 'http://192.168.10.48:8888', // target: 'http://192.168.10.48:8888',
target: 'http://192.168.10.123:8889', // target: 'http://192.168.10.123:8889',
// target: 'http://192.168.10.101:8888',
// target: 'http://192.168.10.101:8888', // target: 'http://192.168.10.101:8888',
target: 'http://192.168.10.75:8777',
// target: 'http://192.168.10.29:13000', // target: 'http://192.168.10.29:13000',
// target: 'http://test.api.huitongys.com', // target: 'http://test.api.huitongys.com',
changeOrigin: true, changeOrigin: true,

Loading…
Cancel
Save