Browse Source

Merge branch 'dev' of http://47.108.105.48:3000/java_project/logpm_page into dev

pre-production
pref_mail@163.com 1 year ago
parent
commit
24b79fb486
  1. 51
      src/api/distribution/createTask.js
  2. 10
      src/option/distribution/BookingNote.js
  3. 2
      src/option/waybill/TemporaryStorageList.js
  4. 2
      src/option/waybill/WarehousingByTrainNumber.js
  5. 145
      src/views/basicdata/brand/basicClient.vue
  6. 86
      src/views/distribution/checkInventoryTask/createTask.vue
  7. 4
      src/views/waybill/CreateZeroOrder.vue
  8. 35
      src/views/waybill/TemporaryStorageList.vue
  9. 102
      src/views/waybill/WarehousingByTrainNumber.vue

51
src/api/distribution/createTask.js

@ -63,32 +63,32 @@ export const $_postBatchDelete = params => {
});
};
// 新增盘点任务
export const $_submit = (data) => {
export const $_submit = data => {
return request({
url: '/api/logpm-basic/material/submit',
method: 'post',
data
})
}
data,
});
};
/**
* 盘点详情
*/
export const $_getDetailInfo = params => {
return request({
url: '/api/logpm-warehouse/blade-taskQuest/taskQuest/getDetailInfo',
method:'get',
method: 'get',
params,
});
};
// 查询货位信息
export const $_getList = ( params) => {
export const $_getList = params => {
return request({
url: '/api/logpm-basicdata/goodsAllocation/list',
method: 'get',
params
})
}
params,
});
};
/**
* 盘点状态修改
@ -96,7 +96,7 @@ export const $_getList = ( params) => {
export const $_updateQuestChildInfo = data => {
return request({
url: '/api/logpm-warehouse/blade-taskQuest/taskQuest/updateQuestChildInfo',
method:'put',
method: 'put',
data,
});
};
@ -107,42 +107,33 @@ export const $_updateQuestChildInfo = data => {
export const $_getQuestChildInfo = params => {
return request({
url: '/api/logpm-warehouse/blade-taskQuest/taskQuest/getQuestChildInfo',
method:'get',
method: 'get',
params,
});
};
/**
* 盘点查询
*/
export const $_materialList = params => {
return request({
url: '/api/logpm-basic/material/list',
method:'get',
method: 'get',
params,
});
};
/**
* 删除盘点数据接口
*/
export const $_deleteQuestChild = params => {
return request({
url: '/api/logpm-warehouse/blade-taskQuest/taskQuest/deleteQuestChild',
method:'get',
method: 'get',
params,
});
};
/**
* 盘点详情保存
*/
@ -154,8 +145,6 @@ export const $_updateDetailInfo = data => {
});
};
/**
* 盘点日期延期
*/
@ -167,7 +156,6 @@ export const $_updateDate = data => {
});
};
/**
* 盘点对比数据
*/
@ -205,7 +193,6 @@ export const $_exportGetContrastInfo = params => {
});
};
// 盘点任务库存品
export const $_QuestSelectInventory = params => {
return request({
@ -216,7 +203,6 @@ export const $_QuestSelectInventory = params => {
};
// 盘点任务零担
export const $_taskQuestSelectZreo = params => {
return request({
url: '/api/logpm-warehouse/blade-taskQuest/taskQuest/SelectZreo',
@ -224,3 +210,14 @@ export const $_taskQuestSelectZreo = params => {
params,
});
};
/**
* 未盘点数据导出
*/
export const postExportContrastStockInfo = params => {
return request({
url: '/api/logpm-warehouse/blade-taskQuest/taskQuest/exportContrastStockInfo',
method: 'get',
params,
});
};

10
src/option/distribution/BookingNote.js

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

2
src/option/waybill/TemporaryStorageList.js

@ -28,7 +28,7 @@ export const columnList = [
{
prop: 'htMallName',
label: '汇通商场',
type: 1,
type: 2,
values: '',
width: '150',
checkarr: [],

2
src/option/waybill/WarehousingByTrainNumber.js

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

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

@ -60,7 +60,7 @@
<el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain
> </el-button
>
<el-button type="danger" icon="el-icon-delete" @click="handleImport"> </el-button>
<el-button type="danger" icon="Upload" @click="handleImport"> </el-button>
</div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
@ -184,6 +184,7 @@
:close-on-click-modal="false"
append-to-body
>
<div v-loading="loadingObj.submitLoading">
<el-form :disabled="view" ref="form" :model="form" :rules="rules" label-width="120px">
<!-- 表单字段 -->
<el-form-item label="客户编码" prop="clientCode">
@ -196,7 +197,11 @@
/>
</el-form-item>
<el-form-item label="客户名称" prop="clientName">
<el-input v-model="form.clientName" placeholder="请输入客户名称" style="width: 100%" />
<el-input
v-model="form.clientName"
placeholder="请输入客户名称"
style="width: 100%"
/>
</el-form-item>
<el-form-item label="客户类型" prop="clientType">
<!-- <el-input v-model="form.clientName" placeholder="请输入客户名称" style="width: 100%"/>-->
@ -285,7 +290,21 @@
</el-cascader>
</el-form-item>
<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 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-input v-model="form.tripartiteMall" placeholder="请填写三方商城" style="width: 100%" />-->
@ -319,7 +338,7 @@
:limit="3"
:on-exceed="handleExceed"
>
<el-button>上传</el-button>
<el-button type="Primary" icon="Position">上传</el-button>
<template #tip>
<div class="el-upload__tip">大小不超过500KB的jpg/png文件</div>
</template>
@ -333,10 +352,6 @@
/>
</el-form-item>
<el-form-item label="合同开始时间" prop="contractStartTime" label-width="120px">
<!-- <el-input v-model="form.contractStartTime" placeholder="请输入合同开始时间"/>-->
<div class="demo-date-picker" style="width: 60%">
<div class="block">
<!-- <span class="demonstration">Default</span>-->
<el-date-picker
v-model="form.contractStartTime"
type="date"
@ -344,15 +359,9 @@
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
/>
</div>
</div>
</el-form-item>
<el-form-item label="合同结束时间" prop="contractEntTime" label-width="120px">
<!-- <el-input v-model="form.contractEntTime" placeholder="请输入合同结束时间"/>-->
<div class="demo-date-picker">
<div class="block">
<!-- <span class="demonstration">Default</span>-->
<el-date-picker
v-model="form.contractEntTime"
type="date"
@ -360,19 +369,16 @@
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
/>
</div>
</div>
</el-form-item>
</el-form>
<!-- 表单按钮 -->
<template #footer>
<span v-if="!view" class="dialog-footer">
<div v-if="!view" class="flex-c-c">
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit('form')"
> </el-button
>
<el-button icon="el-icon-circle-close" @click="box = false"> </el-button>
</span>
</template>
</div>
</div>
</el-dialog>
<!-- 账号绑定弹出框页面
@ -756,24 +762,26 @@ export default {
{ required: true, message: '请输入客户名称', 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: [
{ 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' }],
typeServiceList: [{ required: true, message: '请选择服务类型', trigger: 'change' }],
linkman: [{ required: true, message: '请填写联系人', trigger: 'blur' }],
detailedly: [{ required: true, message: '请填写详细地址', trigger: 'blur' }],
phone: [{ required: true, message: '请填写联系电话', trigger: 'blur' }],
contractEntTime: [
{ type: 'date', required: true, message: '请选择合同结束时间', trigger: 'change' },
],
contractStartTime: [
{ type: 'date', required: true, message: '请选择合同开始时间', trigger: 'change' },
],
linkman: [{ required: true, message: '请填写联系人', trigger: ['blur', 'change'] }],
detailedly: [{ required: true, message: '请填写详细地址', trigger: ['blur', 'change'] }],
phone: [{ required: true, message: '请填写联系电话', trigger: ['blur', 'change'] }],
// contractEntTime: [
// { type: 'date', required: true, message: '', trigger: 'change' },
// ],
// contractStartTime: [
// { type: 'date', 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,
@ -782,6 +790,32 @@ export default {
name: '',
phone: '',
},
/** 付款方式 */
defaultPaymentMethodsOptions: [
{
value: '1',
label: '现付',
},
{
value: '2',
label: '到付',
},
{
value: '3',
label: '月结',
},
{
value: '4',
label: '回付',
},
{
value: '5',
label: '内部结算',
},
],
loadingObj: {
submitLoading: false,
},
};
},
created() {},
@ -1168,42 +1202,56 @@ export default {
if (!this.form.id) {
console.log('添加提交的数据:', this.form);
this.$refs[from].validate(valid => {
this.$refs[from].validate(async valid => {
if (valid) {
try {
this.loadingObj.submitLoading = true;
// this.form.typeService = !!this.form.typeService ? parseInt(this.form.typeService) : undefined;
this.form.bladeRegionCityId = this.form.bladeRegionProvinceId[1];
this.form.bladeRegionAreaId = this.form.bladeRegionProvinceId[2];
this.form.bladeRegionProvinceId = this.form.bladeRegionProvinceId[0];
console.log('上传llll>>>', this.form);
add(this.form).then(() => {
await add(this.form);
this.box = false;
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
});
} catch (error) {
console.log('error :>> ', error);
} finally {
this.loadingObj.submitLoading = false;
}
} else {
console.log('error submit!!');
return false;
}
});
} else {
this.$refs[from].validate(valid => {
this.$refs[from].validate(async valid => {
if (valid) {
try {
this.loadingObj.submitLoading = true;
console.log('修改提交的数据:', this.form);
// this.form.typeService = !!this.form.typeService ? parseInt(this.form.typeService) : undefined;
this.form.bladeRegionCityId = this.form.bladeRegionProvinceId[1];
this.form.bladeRegionAreaId = this.form.bladeRegionProvinceId[2];
this.form.bladeRegionProvinceId = this.form.bladeRegionProvinceId[0];
update(this.form).then(() => {
await update(this.form);
this.box = false;
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
});
} catch (error) {
console.log('error :>> ', error);
} finally {
this.loadingObj.submitLoading = false;
}
} else {
console.log('error submit!!');
return false;
@ -1218,6 +1266,10 @@ export default {
this.box = true;
this.distriType = false;
this.viewClientEntd = false;
this.$nextTick(() => {
this.$refs.form.resetFields();
this.form.defaultPaymentMethods = '1';
});
},
handleAddSon(row) {
console.log(row);
@ -1455,7 +1507,8 @@ export default {
this.query.bladeRegionAreaId = this.query.bladeRegionProvinceId[2];
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))
.then(res => {
const data = res.data.data;
console.log(data);
@ -1547,8 +1600,9 @@ export default {
this.data = this.$functions.newdatas(this.columnList, this.data);
this.loading = false;
this.selectionClear();
}).catch(()=>{
this.data =[]
})
.catch(() => {
this.data = [];
this.loading = false;
});
},
@ -1577,4 +1631,13 @@ export default {
:deep(.el-cascader) {
width: 100%;
}
:deep(.el-date-editor.el-input) {
height: 100% !important;
width: 100% !important;
}
:deep(.el-select) {
width: 100% !important;
}
</style>

86
src/views/distribution/checkInventoryTask/createTask.vue

@ -1,5 +1,5 @@
<template>
<div class="maxContent">
<div class="maxContent" v-loading="loadingObj.pageLoading">
<!-- 搜索功能 -->
<div>
<!-- <div class="SoInput" v-show="searchSo">
@ -158,6 +158,9 @@
<el-button type="primary" @click="TcAddData" v-if="Statusjudgment"> </el-button>
<el-button type="primary" @click="InventoryModification">提交修改</el-button>
<el-button type="primary" @click="ModifyingStatus">修改状态</el-button>
<el-button icon="Download" type="primary" @click="handleUncountedExport">
导出
</el-button>
</div>
<div style="margin-left: 10px">
<!-- v-if="NotCounted" -->
@ -211,7 +214,7 @@
>
<template #header>
<el-input
@change="InputSo(item)"
@change="() => InputSo(item)"
clearable
v-if="item.type == 5 || item.prop == 'categoryName' || item.prop == 'materialCode'"
v-model="item.values"
@ -668,12 +671,13 @@ import {
$_exportGetContrastInfo,
$_getList,
$_postBatchDelete,
postExportContrastStockInfo,
} from '@/api/distribution/createTask';
import { ElMessageBox } from 'element-plus';
import { ElMessage } from 'element-plus';
import { downloadXls } from '@/utils/util';
import { getDictionaryBiz } from '@/api/system/dict';
import { ref } from 'vue';
import { ref, reactive } from 'vue';
import { off } from 'dom7';
const wLinput = ref(null); //
const wLinputState = ref(false); //
@ -730,6 +734,13 @@ const Statusjudgment = ref(false); //新增按钮
const DbEx = ref(null); //
const fullScreen = ref(false); //
const BatchAbandonment = ref([]); //
/** loading */
const loadingObj = reactive({
/** 页面loading */
pageLoading: false,
});
/** 未盘点query */
const uncountedQuery = reactive({});
const radioList = ref([
{ label: 0, txt: '在库', input: 'stockNum', disabled: true },
{ label: 1, txt: '破损', input: 'wornNum', disabled: true },
@ -1450,57 +1461,7 @@ const InputSo = val => {
console.log(row.value, 'row.value');
data.current = TccurrentPage.value;
data.size = TcpageSize.value;
// if (val.prop == 'categoryName') {
// //
// data.name = val.values;
// $_materialList(data).then(res => {
// console.log(res, '');
// if (res.data.data.records.length) {
// Tctotal.value = res.data.data.total;
// res.data.data.records.forEach(item => {
// item.Checkbox = true;
// });
// TcPdloading.value = false;
// console.log(res, '');
// TcPD.value = res.data.data.records;
// } else {
// Statusjudgment.value = true; //
// TcPD.value = res.data.data.records;
// ElMessage({
// message: '',
// type: 'warning',
// });
// }
// });
// return;
// }
// if (val.prop == 'materialCode') {
// //
// data.sku = val.values;
// $_materialList(data).then(res => {
// console.log(res, '');
// if (res.data.data.records.length) {
// Tctotal.value = res.data.data.total;
// res.data.data.records.forEach(item => {
// item.Checkbox = true;
// });
// TcPdloading.value = false;
// console.log(res, '');
// TcPD.value = res.data.data.records;
// } else {
// Statusjudgment.value = true; //
// TcPD.value = res.data.data.records;
// ElMessage({
// message: '',
// type: 'warning',
// });
// }
// });
// return;
// }
// if (val.prop != 'categoryName' || val.prop != 'materialCode') {
let dataS = {
questNum: UncountedDetails.value.questNum,
questId: UncountedDetails.value.id,
@ -2463,7 +2424,6 @@ const InventorySubmit = () => {
loading.value = true; //
console.log(SubData, '处理好的数据');
postAddtaskQuest(SubData).then(res => {
if ((res.data.code = 200)) {
ElMessage({
message: res.data.msg,
@ -2505,7 +2465,6 @@ const InventorySubmit = () => {
onLoad(); //
}
console.log(res, '盘点计划提交成功');
});
};
//
@ -2555,6 +2514,23 @@ const DelayButton = () => {
console.log('延期');
dialogTabData.value = true;
};
/** 未盘点数据导出 */
const handleUncountedExport = () => {
ElMessageBox.confirm('是否导出未盘点数据?').then(async () => {
try {
TcPdloading.value = true;
const res = await postExportContrastStockInfo({ questNum: UncountedDetails.value.questNum });
if (res.status !== 200) return;
downloadXls(res.data, '未盘点数据.xlsx');
} catch (error) {
console.log('error :>> ', error);
} finally {
TcPdloading.value = false;
}
});
};
</script>
<style lang="scss" scoped>

4
src/views/waybill/CreateZeroOrder.vue

@ -1764,7 +1764,6 @@ let _ant1 = null;
const remoteMethod = val => {
if (_ant1) clearTimeout(_ant1);
_ant1 = setTimeout(async () => {
if (val) {
try {
details.loadingObj.loading = true;
const res = await getOpenOrderAdvanceFindWarehouseList({ warehouseName: val });
@ -1775,11 +1774,12 @@ const remoteMethod = val => {
} finally {
details.loadingObj.loading = false;
}
}
clearTimeout(_ant1);
}, 1000);
};
remoteMethod('');
/** 目的仓选择时给目的仓名称赋值 */
const destinationWarehouseNameChange = val => {
details.query.destinationWarehouseName = details.options.find(

35
src/views/waybill/TemporaryStorageList.vue

@ -311,27 +311,25 @@
</el-form>
</div>
<template #footer>
<div class="flex-c-c dialog-footer">
<el-button icon="Close" @click="details.popUpShow.addTagVisited = false"> </el-button>
<el-button
icon="Position"
icon="Refresh"
type="primary"
:loading="details.loadingObj.addTagLoading"
@click="handleSubmitAddTag(ruleFormRef)"
@click="() => handleRefreshAddTag(ruleFormRef)"
>
</el-button>
<el-button
icon="Refresh"
icon="Position"
type="primary"
:loading="details.loadingObj.addTagLoading"
@click="handleRefreshAddTag(ruleFormRef)"
@click="() => handleSubmitAddTag(ruleFormRef)"
>
</el-button>
<el-button icon="Close" @click="details.popUpShow.addTagVisited = false"> </el-button>
</div>
</template>
</el-dialog>
<!-- 导入 -- 批量开标签 -->
@ -1237,9 +1235,14 @@ const handleClose = res => {
};
/** 开标签提交 */
const handleSubmitAddTag = async (formEl: FormInstance | undefined) => {
const handleSubmitAddTag = (formEl: FormInstance | undefined) => {
if (!formEl) return;
await formEl.validate(async (valid, fields) => {
formEl.validate((valid, fields) => {
ElMessageBox.confirm('确认提交吗?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
if (valid) {
console.log('submit!');
@ -1268,19 +1271,27 @@ const handleSubmitAddTag = async (formEl: FormInstance | undefined) => {
console.log('error submit!', fields);
}
});
});
};
/** 开标签重置 */
const handleRefreshAddTag = (formEl: FormInstance | undefined) => {
console.log('123123 :>> ', 123123);
if (!formEl) return;
ElMessageBox.confirm('确认重置吗?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
formEl.resetFields();
});
};
/** 开启开标签弹窗 */
const handleOpenAddTagDlog = () => {
details.popUpShow.addTagVisited = true;
handleRefreshAddTag(ruleFormRef.value);
ruleFormRef.value.resetFields();
};
onActivated(() => {

102
src/views/waybill/WarehousingByTrainNumber.vue

@ -1,6 +1,6 @@
<template>
<basic-container>
<div class="avue-crud">
<div class="avue-crud" v-loading="details.loadingObj.pageLoading">
<!-- 搜索模块 -->
<div v-h5uShow="!search">
<!-- 查询模块 -->
@ -32,7 +32,9 @@
<div class="avue-crud__header">
<!-- 头部左侧按钮模块 -->
<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 class="avue-crud__right">
@ -50,15 +52,24 @@
ref="tableNodeRef"
:columnList="details.columnList"
:tableData="details.data"
:loading="loadingObj.packageListLoading"
:loading="loadingObj.list"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
:isselectfun="handleIsSelect"
>
<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>
</tablecmt>
</el-row>
@ -152,7 +163,7 @@ const details = reactive<any>({
loadingObj: {
/** 列表加载loading */
list: false,
packageListLoading: false,
pageLoading: false,
},
/** 列表复选框选中的数据 */
selectionList: [],
@ -222,9 +233,10 @@ const searchChange = () => {
/** 清空表单 */
const searchReset = () => {
details.query = {};
details.stockupDate = [];
details.page.currentPage = 1;
onLoad();
details.data = [];
for (let i = 0; i < details.columnList.length; i++) {
details.columnList[i].values = '';
}
};
/** 展开列表控件 */
@ -242,6 +254,7 @@ const searchHide = () => {
/** 表格表头输入框搜索 */
const inputsc = (index, row) => {
details.query[row.prop] = index;
if (!index) delete details.query[row.prop];
onLoad();
};
@ -295,20 +308,83 @@ const setnewcolum = (newarr, headarr, type) => {
};
/** 入库 */
const handlePutInStorage = row => {
const handlePutInStorage = ({ row }) => {
ElMessageBox.confirm('确认批量入库吗?', '警告', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
ElMessage({
type: 'success',
message: '入库成功',
.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('确认批量入库吗?', '警告', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(async () => {
try {
details.loadingObj.pageLoading = true;
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(() => {});
};
/** 详情 */
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>
<style scoped lang="scss">

Loading…
Cancel
Save