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

4
vite.config.js

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

Loading…
Cancel
Save