Browse Source

客户新增默认付款方式

dev-xx
qb 1 year ago
parent
commit
1b9ad4b2ed
  1. 10
      src/option/distribution/BookingNote.js
  2. 2
      src/option/waybill/WarehousingByTrainNumber.js
  3. 286
      src/views/basicdata/brand/basicClient.vue
  4. 22
      src/views/waybill/CreateZeroOrder.vue
  5. 113
      src/views/waybill/TemporaryStorageList.vue
  6. 104
      src/views/waybill/WarehousingByTrainNumber.vue

10
src/option/distribution/BookingNote.js

@ -136,7 +136,7 @@ export const ChangeOrderColumnList = [
head: false, head: false,
}, },
{ {
prop: 'unloadNumber', prop: 'operationRemark',
label: '修改内容', label: '修改内容',
type: 1, type: 1,
values: '', values: '',
@ -146,7 +146,7 @@ export const ChangeOrderColumnList = [
sortable: true, sortable: true,
}, },
{ {
prop: 'NumberOfPiecesInTheCar', prop: 'createTime',
label: '申请时间', label: '申请时间',
type: 1, type: 1,
values: '', values: '',
@ -156,7 +156,7 @@ export const ChangeOrderColumnList = [
sortable: true, sortable: true,
}, },
{ {
prop: 'unloadNumber', prop: 'warehouseName',
label: '申请网点', label: '申请网点',
type: 1, type: 1,
values: '', values: '',
@ -166,7 +166,7 @@ export const ChangeOrderColumnList = [
sortable: true, sortable: true,
}, },
{ {
prop: 'NumberOfPiecesInTheCar', prop: 'createUserName',
label: '申请人', label: '申请人',
type: 1, type: 1,
values: '', values: '',
@ -176,7 +176,7 @@ export const ChangeOrderColumnList = [
sortable: true, sortable: true,
}, },
{ {
prop: 'unloadNumber', prop: 'aaa',
label: '修改原因', label: '修改原因',
type: 1, type: 1,
values: '', values: '',

2
src/option/waybill/WarehousingByTrainNumber.js

@ -16,7 +16,7 @@ export const columnList = [
fixed: true, fixed: true,
}, },
{ {
prop: 'billladingCode', prop: 'orderCode',
label: '订单自编号', label: '订单自编号',
type: 1, type: 1,
values: '', values: '',

286
src/views/basicdata/brand/basicClient.vue

@ -287,6 +287,16 @@
<el-form-item label="详细地址" prop="detailedly"> <el-form-item label="详细地址" prop="detailedly">
<el-input v-model="form.detailedly" placeholder="请填写详细地址" style="width: 100%" /> <el-input v-model="form.detailedly" placeholder="请填写详细地址" style="width: 100%" />
</el-form-item> </el-form-item>
<el-form-item label="默认付款方式" prop="defaultPaymentMethods">
<el-select v-model="form.defaultPaymentMethods" placeholder="请选择默认付款方式">
<el-option
v-for="item in defaultPaymentMethodsOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="三方商城" prop="tripartiteMall">--> <!-- <el-form-item label="三方商城" prop="tripartiteMall">-->
<!-- <el-input v-model="form.tripartiteMall" placeholder="请填写三方商城" style="width: 100%" />--> <!-- <el-input v-model="form.tripartiteMall" placeholder="请填写三方商城" style="width: 100%" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
@ -319,7 +329,7 @@
:limit="3" :limit="3"
:on-exceed="handleExceed" :on-exceed="handleExceed"
> >
<el-button>上传</el-button> <el-button type="Primary" icon="Position">上传</el-button>
<template #tip> <template #tip>
<div class="el-upload__tip">大小不超过500KB的jpg/png文件</div> <div class="el-upload__tip">大小不超过500KB的jpg/png文件</div>
</template> </template>
@ -333,35 +343,23 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="合同开始时间" prop="contractStartTime" label-width="120px"> <el-form-item label="合同开始时间" prop="contractStartTime" label-width="120px">
<!-- <el-input v-model="form.contractStartTime" placeholder="请输入合同开始时间"/>--> <el-date-picker
<div class="demo-date-picker" style="width: 60%"> v-model="form.contractStartTime"
<div class="block"> type="date"
<!-- <span class="demonstration">Default</span>--> placeholder="选择时间"
<el-date-picker format="YYYY/MM/DD HH:mm:ss"
v-model="form.contractStartTime" value-format="YYYY-MM-DD HH:mm:ss"
type="date" />
placeholder="选择时间"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
/>
</div>
</div>
</el-form-item> </el-form-item>
<el-form-item label="合同结束时间" prop="contractEntTime" label-width="120px"> <el-form-item label="合同结束时间" prop="contractEntTime" label-width="120px">
<!-- <el-input v-model="form.contractEntTime" placeholder="请输入合同结束时间"/>--> <el-date-picker
<div class="demo-date-picker"> v-model="form.contractEntTime"
<div class="block"> type="date"
<!-- <span class="demonstration">Default</span>--> placeholder="选择时间"
<el-date-picker format="YYYY/MM/DD HH:mm:ss"
v-model="form.contractEntTime" value-format="YYYY-MM-DD HH:mm:ss"
type="date" />
placeholder="选择时间"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
/>
</div>
</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 表单按钮 --> <!-- 表单按钮 -->
@ -756,24 +754,26 @@ export default {
{ required: true, message: '请输入客户名称', trigger: 'blur' }, { required: true, message: '请输入客户名称', trigger: 'blur' },
// { min: 3, max: 5, message: ' 3 5 ', trigger: 'blur' } // { min: 3, max: 5, message: ' 3 5 ', trigger: 'blur' }
], ],
typeService: [{ required: true, message: '请选择客户端类型', trigger: 'blur' }], typeService: [{ required: true, message: '请选择客户端类型', trigger: ['blur', 'change'] }],
businessType: [ businessType: [
{ required: true, message: '请选择配送业务类型', trigger: 'change' }, { required: true, message: '请选择配送业务类型', trigger: 'change' },
// { min: 3, max: 5, message: ' 3 5 ', trigger: 'blur' } // { min: 3, max: 5, message: ' 3 5 ', trigger: ['blur', 'change'] }
], ],
clientType: [{ required: true, message: '请选择客户类型', trigger: 'change' }], clientType: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
typeServiceList: [{ required: true, message: '请选择服务类型', trigger: 'change' }], typeServiceList: [{ required: true, message: '请选择服务类型', trigger: 'change' }],
linkman: [{ required: true, message: '请填写联系人', trigger: 'blur' }], linkman: [{ required: true, message: '请填写联系人', trigger: ['blur', 'change'] }],
detailedly: [{ required: true, message: '请填写详细地址', trigger: 'blur' }], detailedly: [{ required: true, message: '请填写详细地址', trigger: ['blur', 'change'] }],
phone: [{ required: true, message: '请填写联系电话', trigger: 'blur' }], phone: [{ required: true, message: '请填写联系电话', trigger: ['blur', 'change'] }],
contractEntTime: [ // contractEntTime: [
{ type: 'date', required: true, message: '请选择合同结束时间', trigger: 'change' }, // { type: 'date', required: true, message: '', trigger: 'change' },
], // ],
contractStartTime: [ // contractStartTime: [
{ type: 'date', required: true, message: '请选择合同开始时间', trigger: 'change' }, // { type: 'date', required: true, message: '', trigger: 'change' },
], // ],
bladeRegionProvinceId: [{ required: true, message: '请选择地址', trigger: 'change' }], bladeRegionProvinceId: [{ required: true, message: '请选择地址', trigger: 'change' }],
// leaseAccessories: [{ required: true, message: '', trigger: 'blur' }], defaultPaymentMethods: [
{ required: true, message: '请选择默认付款方式', trigger: 'change' },
],
}, },
bianji: false, bianji: false,
@ -782,6 +782,29 @@ export default {
name: '', name: '',
phone: '', phone: '',
}, },
/** 付款方式 */
defaultPaymentMethodsOptions: [
{
value: '1',
label: '现付',
},
{
value: '2',
label: '到付',
},
{
value: '3',
label: '月结',
},
{
value: '4',
label: '回付',
},
{
value: '5',
label: '内部结算',
},
],
}; };
}, },
created() {}, created() {},
@ -1218,6 +1241,10 @@ export default {
this.box = true; this.box = true;
this.distriType = false; this.distriType = false;
this.viewClientEntd = false; this.viewClientEntd = false;
this.$nextTick(() => {
this.$refs.form.resetFields();
this.form.defaultPaymentMethods = '1';
});
}, },
handleAddSon(row) { handleAddSon(row) {
console.log(row); console.log(row);
@ -1455,102 +1482,104 @@ export default {
this.query.bladeRegionAreaId = this.query.bladeRegionProvinceId[2]; this.query.bladeRegionAreaId = this.query.bladeRegionProvinceId[2];
this.query.bladeRegionProvinceId = this.query.bladeRegionProvinceId[0]; this.query.bladeRegionProvinceId = this.query.bladeRegionProvinceId[0];
} }
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { getList(page.currentPage, page.pageSize, Object.assign(params, this.query))
const data = res.data.data; .then(res => {
console.log(data); const data = res.data.data;
console.log(data);
data.records.forEach(i => { data.records.forEach(i => {
let ke = this.clientType.find(kh => parseInt(kh.dictKey) == parseInt(i.clientType)); let ke = this.clientType.find(kh => parseInt(kh.dictKey) == parseInt(i.clientType));
// console.log("<><><>",ke); // console.log("<><><>",ke);
if (!!ke) { if (!!ke) {
i.clientTypeName = ke.dictValue; i.clientTypeName = ke.dictValue;
// console.log('==-=-=', i.clientType, ke.dictKey, ke.dictValue); // console.log('==-=-=', i.clientType, ke.dictKey, ke.dictValue);
} }
if (!i.clientType) { if (!i.clientType) {
i.clientTypeName = '无'; i.clientTypeName = '无';
} }
let typeServiceName = []; let typeServiceName = [];
if (!i.typeServiceBusiness) { if (!i.typeServiceBusiness) {
i.typeServiceName = '无'; i.typeServiceName = '无';
} else { } else {
i.typeServiceBusiness.forEach(ty => { i.typeServiceBusiness.forEach(ty => {
let fuw = this.freightType.find( let fuw = this.freightType.find(
fw => parseInt(fw.dictKey) == parseInt(ty.typeService) fw => parseInt(fw.dictKey) == parseInt(ty.typeService)
); );
if (!!fuw) { if (!!fuw) {
// console.log("fuw",fuw); // console.log("fuw",fuw);
typeServiceName.push(fuw.dictValue); typeServiceName.push(fuw.dictValue);
// console.log('==-=-=', i.typeService, fuw.dictKey, fuw.dictValue); // console.log('==-=-=', i.typeService, fuw.dictKey, fuw.dictValue);
} }
}); });
i.typeServiceNameFy = typeServiceName.join(','); i.typeServiceNameFy = typeServiceName.join(',');
} }
});
//
// let dz = '';
// data.records.forEach(it => {
// let arrsheng = this.optioner.filter(i => {
// return it.bladeRegionProvinceId == i.value;
// });
// if (arrsheng.length == 0) return;
// // console.log("========",JSON.parse(JSON.stringify(arrsheng)) );
// let arrshi = arrsheng[0].children.filter(i => {
// return it.bladeRegionCityId == i.value;
// });
// // console.log("========",JSON.parse(JSON.stringify(arrsheng)) );
// let arrqu = arrshi[0].children.filter(i => {
// return it.bladeRegionAreaId == i.value;
// });
// // console.log("========",JSON.parse(JSON.stringify(arrsheng)) );
// dz =
// arrsheng[0].label +
// (arrshi[0].label ? `/${arrshi[0].label}` : ``) +
// (arrqu[0]?.label ? `/${arrqu[0]?.label}` : '');
// it.bladeRegionProvinceId = dz;
// });
//
let dz = '';
data.records.forEach(it => {
let arrsheng = this.optioner.filter(i => {
return it.bladeRegionProvinceId == i.value;
}); });
let shengLabel = arrsheng.length > 0 ? arrsheng[0].label : ''; // //
// let dz = '';
// data.records.forEach(it => {
// let arrsheng = this.optioner.filter(i => {
// return it.bladeRegionProvinceId == i.value;
// });
// if (arrsheng.length == 0) return;
// // console.log("========",JSON.parse(JSON.stringify(arrsheng)) );
// let arrshi = arrsheng[0].children.filter(i => {
// return it.bladeRegionCityId == i.value;
// });
// // console.log("========",JSON.parse(JSON.stringify(arrsheng)) );
// let arrqu = arrshi[0].children.filter(i => {
// return it.bladeRegionAreaId == i.value;
// });
if (arrsheng.length === 0) { // // console.log("========",JSON.parse(JSON.stringify(arrsheng)) );
it.bladeRegionProvinceId = shengLabel; // // dz =
return; // arrsheng[0].label +
} // (arrshi[0].label ? `/${arrshi[0].label}` : ``) +
// (arrqu[0]?.label ? `/${arrqu[0]?.label}` : '');
// it.bladeRegionProvinceId = dz;
// });
//
let dz = '';
data.records.forEach(it => {
let arrsheng = this.optioner.filter(i => {
return it.bladeRegionProvinceId == i.value;
});
let shengLabel = arrsheng.length > 0 ? arrsheng[0].label : ''; //
let arrshi = arrsheng[0].children.filter(i => { if (arrsheng.length === 0) {
return it.bladeRegionCityId == i.value; it.bladeRegionProvinceId = shengLabel; //
}); return;
let shiLabel = arrshi.length > 0 ? arrshi[0].label : ''; // }
if (arrshi.length === 0) { let arrshi = arrsheng[0].children.filter(i => {
dz = shengLabel; // return it.bladeRegionCityId == i.value;
} else {
let arrqu = arrshi[0].children.filter(i => {
return it.bladeRegionAreaId == i.value;
}); });
let shiLabel = arrshi.length > 0 ? arrshi[0].label : ''; //
let quLabel = arrqu.length > 0 ? arrqu[0].label : ''; // if (arrshi.length === 0) {
dz = shengLabel; //
} else {
let arrqu = arrshi[0].children.filter(i => {
return it.bladeRegionAreaId == i.value;
});
dz = shengLabel + (shiLabel ? `/${shiLabel}` : '') + (quLabel ? `/${quLabel}` : ''); let quLabel = arrqu.length > 0 ? arrqu[0].label : ''; //
}
it.bladeRegionProvinceId = dz; dz = shengLabel + (shiLabel ? `/${shiLabel}` : '') + (quLabel ? `/${quLabel}` : '');
}
it.bladeRegionProvinceId = dz;
});
this.page.total = data.total;
this.data = data.records;
this.data = this.$functions.newdatas(this.columnList, this.data);
this.loading = false;
this.selectionClear();
})
.catch(() => {
this.data = [];
this.loading = false;
}); });
this.page.total = data.total;
this.data = data.records;
this.data = this.$functions.newdatas(this.columnList, this.data);
this.loading = false;
this.selectionClear();
}).catch(()=>{
this.data =[]
this.loading = false;
});
}, },
}, },
}; };
@ -1577,4 +1606,13 @@ export default {
:deep(.el-cascader) { :deep(.el-cascader) {
width: 100%; width: 100%;
} }
:deep(.el-date-editor.el-input) {
height: 100% !important;
width: 100% !important;
}
:deep(.el-select) {
width: 100% !important;
}
</style> </style>

22
src/views/waybill/CreateZeroOrder.vue

@ -1764,22 +1764,22 @@ let _ant1 = null;
const remoteMethod = val => { const remoteMethod = val => {
if (_ant1) clearTimeout(_ant1); if (_ant1) clearTimeout(_ant1);
_ant1 = setTimeout(async () => { _ant1 = setTimeout(async () => {
if (val) { try {
try { details.loadingObj.loading = true;
details.loadingObj.loading = true; const res = await getOpenOrderAdvanceFindWarehouseList({ warehouseName: val });
const res = await getOpenOrderAdvanceFindWarehouseList({ warehouseName: val }); const { data, code } = res.data;
const { data, code } = res.data; if (code !== 200) return;
if (code !== 200) return; details.options = data || [];
details.options = data || []; } catch (error) {
} catch (error) { } finally {
} finally { details.loadingObj.loading = false;
details.loadingObj.loading = false;
}
} }
clearTimeout(_ant1); clearTimeout(_ant1);
}, 1000); }, 1000);
}; };
remoteMethod('');
/** 目的仓选择时给目的仓名称赋值 */ /** 目的仓选择时给目的仓名称赋值 */
const destinationWarehouseNameChange = val => { const destinationWarehouseNameChange = val => {
details.query.destinationWarehouseName = details.options.find( details.query.destinationWarehouseName = details.options.find(

113
src/views/waybill/TemporaryStorageList.vue

@ -311,27 +311,25 @@
</el-form> </el-form>
</div> </div>
<template #footer> <div class="flex-c-c dialog-footer">
<div class="flex-c-c dialog-footer"> <el-button icon="Close" @click="details.popUpShow.addTagVisited = false"> </el-button>
<el-button <el-button
icon="Position" icon="Refresh"
type="primary" type="primary"
:loading="details.loadingObj.addTagLoading" :loading="details.loadingObj.addTagLoading"
@click="handleSubmitAddTag(ruleFormRef)" @click="() => handleRefreshAddTag(ruleFormRef)"
> >
</el-button> </el-button>
<el-button <el-button
icon="Refresh" icon="Position"
type="primary" type="primary"
:loading="details.loadingObj.addTagLoading" :loading="details.loadingObj.addTagLoading"
@click="handleRefreshAddTag(ruleFormRef)" @click="() => handleSubmitAddTag(ruleFormRef)"
> >
</el-button> </el-button>
<el-button icon="Close" @click="details.popUpShow.addTagVisited = false"> </el-button> </div>
</div>
</template>
</el-dialog> </el-dialog>
<!-- 导入 -- 批量开标签 --> <!-- 导入 -- 批量开标签 -->
@ -1237,50 +1235,63 @@ const handleClose = res => {
}; };
/** 开标签提交 */ /** 开标签提交 */
const handleSubmitAddTag = async (formEl: FormInstance | undefined) => { const handleSubmitAddTag = (formEl: FormInstance | undefined) => {
if (!formEl) return; if (!formEl) return;
await formEl.validate(async (valid, fields) => { formEl.validate((valid, fields) => {
if (valid) { ElMessageBox.confirm('确认提交吗?', '提示', {
console.log('submit!'); confirmButtonText: '确认',
cancelButtonText: '取消',
console.log('details.addTagForm :>> ', details.addTagForm); type: 'warning',
try { }).then(async () => {
if (details.addTagForm.area.length < 2) return ElMessage.warning('区域最少选择到市'); if (valid) {
console.log('submit!');
details.loadingObj.addTagLoading = true;
console.log('details.addTagForm :>> ', details.addTagForm);
const res = await postOpenLabel({ try {
...details.addTagForm, if (details.addTagForm.area.length < 2) return ElMessage.warning('区域最少选择到市');
area: details.addTagForm.area.join(','),
}); details.loadingObj.addTagLoading = true;
const { code } = res.data;
const res = await postOpenLabel({
if (code !== 200) return; ...details.addTagForm,
ElMessage.success('添加成功'); area: details.addTagForm.area.join(','),
details.popUpShow.addTagVisited = false; });
initOnLoad({}, true); const { code } = res.data;
} catch (error) {
console.log('error :>> ', error); if (code !== 200) return;
} finally { ElMessage.success('添加成功');
details.loadingObj.addTagLoading = false; details.popUpShow.addTagVisited = false;
initOnLoad({}, true);
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.addTagLoading = false;
}
} else {
console.log('error submit!', fields);
} }
} else { });
console.log('error submit!', fields);
}
}); });
}; };
/** 开标签重置 */ /** 开标签重置 */
const handleRefreshAddTag = (formEl: FormInstance | undefined) => { const handleRefreshAddTag = (formEl: FormInstance | undefined) => {
console.log('123123 :>> ', 123123);
if (!formEl) return; if (!formEl) return;
formEl.resetFields(); ElMessageBox.confirm('确认重置吗?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
formEl.resetFields();
});
}; };
/** 开启开标签弹窗 */ /** 开启开标签弹窗 */
const handleOpenAddTagDlog = () => { const handleOpenAddTagDlog = () => {
details.popUpShow.addTagVisited = true; details.popUpShow.addTagVisited = true;
handleRefreshAddTag(ruleFormRef.value); ruleFormRef.value.resetFields();
}; };
onActivated(() => { onActivated(() => {

104
src/views/waybill/WarehousingByTrainNumber.vue

@ -1,6 +1,6 @@
<template> <template>
<basic-container> <basic-container>
<div class="avue-crud"> <div class="avue-crud" v-loading="details.loadingObj.pageLoading">
<!-- 搜索模块 --> <!-- 搜索模块 -->
<div v-h5uShow="!search"> <div v-h5uShow="!search">
<!-- 查询模块 --> <!-- 查询模块 -->
@ -32,7 +32,9 @@
<div class="avue-crud__header"> <div class="avue-crud__header">
<!-- 头部左侧按钮模块 --> <!-- 头部左侧按钮模块 -->
<div class="avue-crud__left"> <div class="avue-crud__left">
<el-button type="primary" icon="Van" @click="handlePutInStorage">批量入库</el-button> <el-button type="primary" icon="Van" @click="handleBatchPutInStorage"
>批量入库</el-button
>
</div> </div>
<!-- 头部右侧按钮模块 --> <!-- 头部右侧按钮模块 -->
<div class="avue-crud__right"> <div class="avue-crud__right">
@ -50,15 +52,24 @@
ref="tableNodeRef" ref="tableNodeRef"
:columnList="details.columnList" :columnList="details.columnList"
:tableData="details.data" :tableData="details.data"
:loading="loadingObj.packageListLoading" :loading="loadingObj.list"
@inputTxt="inputsc" @inputTxt="inputsc"
@timeCheck="timesc" @timeCheck="timesc"
@btnCheck="btnsc" @btnCheck="btnsc"
@selectCheck="selectsc" @selectCheck="selectsc"
@selection="selectionChange" @selection="selectionChange"
:isselectfun="handleIsSelect"
> >
<template #default="slotProps"> <template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'"> </template> <template v-if="slotProps.scope.column.label === '操作'">
<el-text
v-if="Number(slotProps.scope.row.isIncoming) === 1"
@click="handlePutInStorage(slotProps.scope)"
>
入库
</el-text>
<el-text @click="handleGoDetails(slotProps.scope)">包明细</el-text>
</template>
</template> </template>
</tablecmt> </tablecmt>
</el-row> </el-row>
@ -152,7 +163,7 @@ const details = reactive<any>({
loadingObj: { loadingObj: {
/** 列表加载loading */ /** 列表加载loading */
list: false, list: false,
packageListLoading: false, pageLoading: false,
}, },
/** 列表复选框选中的数据 */ /** 列表复选框选中的数据 */
selectionList: [], selectionList: [],
@ -222,9 +233,10 @@ const searchChange = () => {
/** 清空表单 */ /** 清空表单 */
const searchReset = () => { const searchReset = () => {
details.query = {}; details.query = {};
details.stockupDate = []; details.data = [];
details.page.currentPage = 1; for (let i = 0; i < details.columnList.length; i++) {
onLoad(); details.columnList[i].values = '';
}
}; };
/** 展开列表控件 */ /** 展开列表控件 */
@ -242,6 +254,7 @@ const searchHide = () => {
/** 表格表头输入框搜索 */ /** 表格表头输入框搜索 */
const inputsc = (index, row) => { const inputsc = (index, row) => {
details.query[row.prop] = index; details.query[row.prop] = index;
if (!index) delete details.query[row.prop];
onLoad(); onLoad();
}; };
@ -295,20 +308,83 @@ const setnewcolum = (newarr, headarr, type) => {
}; };
/** 入库 */ /** 入库 */
const handlePutInStorage = row => { const handlePutInStorage = ({ row }) => {
ElMessageBox.confirm('确认批量入库吗?', '警告', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(async () => {
try {
details.loadingObj.pageLoading = true;
const res = await postIncomingBatchOrder({
advanceIds: [row.id],
incomingType: details.searchType === 'orderCode' ? 5 : 4,
});
const { code, msg } = res.data;
if (code !== 200) return;
ElMessage.success(msg);
onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
})
.catch(() => {});
};
/** 批量入库 */
const handleBatchPutInStorage = () => {
if (!details.selectionList.length) return ElMessage.error('请选择需要入库的数据');
ElMessageBox.confirm('确认批量入库吗?', '警告', { ElMessageBox.confirm('确认批量入库吗?', '警告', {
confirmButtonText: '确认', confirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}) })
.then(() => { .then(async () => {
ElMessage({ try {
type: 'success', details.loadingObj.pageLoading = true;
message: '入库成功',
}); const res = await postIncomingBatchOrder({
advanceIds: details.selectionList.map(val => val.id),
incomingType: details.searchType === 'orderCode' ? 5 : 4,
});
const { code, msg } = res.data;
if (code !== 200) return;
ElMessage.success(msg);
onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
}) })
.catch(() => {}); .catch(() => {});
}; };
/** 详情 */
const handleGoDetails = ({ row }) => {
$router.push({
path: '/waybill/orderPackageListDetails?name=包明细',
query: {
id: row.id,
name: `订单 -- ${row.orderCode} 包明细`,
},
});
};
const handleIsSelect = val => {
if (Number(val.isIncoming) === 1) {
return true;
} else {
return false;
}
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

Loading…
Cancel
Save