diff --git a/src/api/aftersales/aftersalesWorkOrder.js b/src/api/aftersales/aftersalesWorkOrder.js index 9a484776..1db6eef6 100644 --- a/src/api/aftersales/aftersalesWorkOrder.js +++ b/src/api/aftersales/aftersalesWorkOrder.js @@ -502,4 +502,32 @@ export const $_aftersalesCustomerMallsetDefault = (data) => { method: 'post', data }) +} + + +// 财务入账填写 +export const $_updateFinanceTime = (data) => { + return request({ + url: '/api/logpm-aftersales/aftersalesWorkOrder/updateFinanceTime', + method: 'post', + data + }) +} + +// 创建指派商场 +export const $_basicdataTripartiteMall = (params) => { + return request({ + url: '/api/logpm-basicdata/basicdataTripartiteMall/getOwn', + method: 'get', + params + }) +} + + +export const $_aftersalesCustomerMallgetByClientId = (params) => { + return request({ + url: '/api/logpm-aftersales/aftersalesCustomerMall/getByClientId', + method: 'get', + params + }) } \ No newline at end of file diff --git a/src/option/aftersales/vueTvemp.js b/src/option/aftersales/vueTvemp.js index 547caf27..a698961f 100644 --- a/src/option/aftersales/vueTvemp.js +++ b/src/option/aftersales/vueTvemp.js @@ -135,7 +135,17 @@ export const columnList = [ sortable: true, head: false, }, - + { + prop: 'totalAmount', + label: '赔款金额', + type: 2, + values: '', + width: '150', + checkarr: [], + fixed: false, + sortable: true, + head: false, + }, { prop: 'deliverGoodsTime', label: '送货时间', @@ -252,17 +262,17 @@ export const columnList = [ // sortable: true, // head: false, // }, - // { - // prop: 'processNumber', - // label: '钉钉流程号', - // type: 2, - // values: '', - // width: '150', - // checkarr: [], - // fixed: false, - // sortable: true, - // head: false, - // }, + { + prop: 'processNumber', + label: '钉钉流程号', + type: 2, + values: '', + width: '150', + checkarr: [], + fixed: false, + sortable: true, + head: false, + }, { prop: 'reviewedBy', label: '审核人', @@ -285,6 +295,7 @@ export const columnList = [ sortable: true, head: false, }, + { prop: 'entryTime', label: '财务入账时间', @@ -296,6 +307,17 @@ export const columnList = [ sortable: true, head: false, }, + { + prop: 'operator', + label: '操作人', + type: 2, + values: '', + width: '150', + checkarr: [], + fixed: false, + sortable: true, + head: false, + }, { prop: 'remarks', label: '备注', @@ -962,4 +984,79 @@ export const CustomerColumnList = [ sortable: false, }, +] + +export const MallassignmentColumnList = [ + { + prop: '', + label: '序号', + type: 12, + values: '', + width: 55, + fixed: true, + }, + { + prop: 'clientName', + label: '商场名称', + type: 1, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, + head: false, + }, + { + prop: 'customerServiceName', + label: '客服名称', + type: 1, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, + head: false, + }, + + + { + prop: 'createTime', + label: '创建时间', + type: 1, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, + head: false, + }, + { + prop: '', + label: '操作', + type: 6, + values: '', + width: '120', + checkarr: [], + fixed: 'right', + sortable: false, + }, + +] + + + +export const customerserviceColumnList = [ + { + prop: 'customerServiceName', + label: '客服名称', + type: 1, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, + head: false, + }, + + ] \ No newline at end of file diff --git a/src/views/aftersales/aftersalesWorkOrder.vue b/src/views/aftersales/aftersalesWorkOrder.vue index 14f27eef..cf53e338 100644 --- a/src/views/aftersales/aftersalesWorkOrder.vue +++ b/src/views/aftersales/aftersalesWorkOrder.vue @@ -17,16 +17,17 @@
- + + +
-
- +
@@ -87,11 +88,19 @@ 新 增 - + 导出报表 - + 默认指派 - + 批量确定 --> - + >批量确定 工单指派 @@ -159,7 +168,13 @@ 申诉 - + + 财务入账
@@ -167,7 +182,7 @@
- +
@@ -684,7 +699,7 @@ type="datetime" format="YYYY-MM-DD" value-format="YYYY-MM-DD HH:mm:ss" - placeholder="请选择运损发现时间" + placeholder="请选择审核时间" /> @@ -694,7 +709,7 @@ type="datetime" format="YYYY-MM-DD" value-format="YYYY-MM-DD HH:mm:ss" - placeholder="请选择运损发现时间" + placeholder="请选择时间" />
@@ -720,7 +735,7 @@ - + - + + + + + +
@@ -761,9 +807,9 @@ background @size-change="assignsizeChange" @current-change="assigncurrentChange" - :current-page="page.currentPage" + :current-page="assigncurrentPage" :page-sizes="[30, 50, 80, 120]" - :page-size="page.pageSize" + :page-size="assignpageSize" layout="total, sizes, prev, pager, next, jumper" :total="CustomerTotal" > @@ -805,22 +851,44 @@ v-loading="CreateassignmentLoading" element-loading-text="正在处理中..." > - + + + + + + + +
+ + +
+ + + + +
+ + + + + + + + +
+ +
@@ -902,6 +1018,9 @@ import { $_aftersalesCustomerMallremove, $_aftersalesCustomerMallsave, $_aftersalesCustomerMallsetDefault, + $_updateFinanceTime, + $_basicdataTripartiteMall, + $_aftersalesCustomerMallgetByClientId, } from '@/api/aftersales/aftersalesWorkOrder'; import { getToken } from '@/utils/auth'; import NProgress from 'nprogress'; @@ -925,6 +1044,8 @@ import { AppealList, timeoutList, CustomerColumnList, + MallassignmentColumnList, + customerserviceColumnList, } from '@/option/aftersales/vueTvemp.js'; import { processRowProperty, isNumer, computeNumber } from '@/utils/util'; import { useRouter } from 'vue-router'; @@ -934,9 +1055,25 @@ const $router = useRouter(); const $useStore = useStore(); const $route = useRoute(); /** vuex */ +const customerData=ref([]);//查询已绑定的客服 const accessControl = $useStore.getters.permission; console.log(accessControl, '权限按钮'); - +const loadingFinancial = ref(false); +const assigncurrentPage = ref(1); //商场当前多少 +const assignpageSize = ref(30); +const Malldropdown = ref([]); //商场选择 +const scChange=(val)=>{ + CreateassignmentLoading.value=true;//开启加载 + $_aftersalesCustomerMallgetByClientId({clientId:val}).then(res=>{ + customerData.value=res.data.data + AssignCustomerservice.value.forEach((itemA) => { + let exists = customerData.value.some((itemB) => itemB.customerServiceId == itemA.id); + itemA.disabled = exists ? true : false; + }); +CreateassignmentLoading.value=false;//开启加载 +console.log(AssignCustomerservice.value,'处理好的数据'); +}) +} // workAdd;//新增 // batch_return;//批量打回 // assign;//工单指派 @@ -984,6 +1121,7 @@ const PermissionButton = computed(() => { }; }); const CustomerServicea = ref(false); //客服指派弹窗 +const dialogFinancialaccounting = ref(false); //财务入账 const dialogCustomer = ref(false); //客服介入弹窗 const CustomerServiceForm = ref({}); //客服介入表单 const DingTalkfilling = ref({}); //钉钉号表单 @@ -996,6 +1134,7 @@ const BatchFrom = ref({}); //批量打回 const AssignCustomerlist = ref([]); //指派选择人员列表 const selectList = ref([]); //表格勾选选中 const CustomerLoad = ref(false); //客服指派查询弹窗加载 +const FinancialFrom = ref({}); //财务入账填写 const currentPage = ref(1); // 默认页码 const TransportlossList = ref([ //运损发现节点 @@ -1067,21 +1206,21 @@ const AppealStatus = ref(false); //申诉列表状态 const dialogModifyAmount = ref(false); //超时金额修改弹出状态 const UserPermissions = ref('仓库客服'); //客服权限 const TabPermissions = ref(0); //菜单权限 -const AssignmentType = ref('1');//指派切换类型 +const AssignmentType = ref('1'); //指派切换类型 const AppealeditorState = ref(false); //申诉是否为编辑状态(默认否) const AppealStatusT = ref(false); //是否为申诉列表 const loadingCustomer = ref(false); //客服介入弹窗加载 const TabList = ref([ - { name: 0, label: '全部', state: true }, - { name: 3, label: '待处理', state: true }, - { name: 9, label: '待审核', state: true }, - { name: 8, label: '待回复', state: false }, - { name: 1, label: '处理中', state: true }, - { name: 2, label: '处理完毕', state: true }, - { name: 6, label: '仲裁中', state: true }, - { name: 5, label: '客服介入', state: true }, - { name: 4, label: '理赔金额未出', state: true }, - { name: 7, label: '超时未处理', state: true }, + { name: 0, label: '全部', state: true, request: true }, + { name: 3, label: '待处理', state: true, request: true }, + { name: 9, label: '待审核', state: true, request: true }, + { name: 8, label: '待回复', state: false, request: true }, + { name: 1, label: '处理中', state: true, request: true }, + { name: 2, label: '处理完毕', state: true, request: true }, + { name: 6, label: '仲裁中', state: true, request: true }, + { name: 5, label: '客服介入', state: true, request: true }, + { name: 4, label: '理赔金额未出', state: true, request: true }, + { name: 7, label: '超时未处理', state: true, request: true }, ]); //标签栏 const DeliveryDriver = ref([]); @@ -1289,12 +1428,15 @@ const ButtonPermissions = computed(() => { add: true, //新增按钮 batchReject: UserPermissions.value != '仓库客服', //批量打回 assignment: UserPermissions.value == '总部客服经理', //工单指派 - applyArbitration: UserPermissions.value == '仓库客服', //客服介入 + applyArbitration: false, //客服介入 DingTalkNumber: UserPermissions.value == '总部客服经理', //钉钉号填写 batchFinish: UserPermissions.value != '仓库客服', //批量完结 appeal: false, //申诉 ManagerConfirmed: false, //处理完毕下面的客服经理批量确定 ArbitrationDetermination: false, //批量仲裁确定 + Financial_accounting: false, //财务入账 + defaultassignments: UserPermissions.value != '仓库客服', //默认指派 + export_Report: true, //导出报表 }; case 1: //处理中 return { @@ -1307,6 +1449,9 @@ const ButtonPermissions = computed(() => { appeal: false, //申诉 ManagerConfirmed: false, //处理完毕下面的客服经理批量确定 ArbitrationDetermination: false, //批量仲裁确定 + Financial_accounting: false, //财务入账 + defaultassignments: false, //默认指派 + export_Report: true, //导出报表 }; case 2: //处理完毕 return { @@ -1319,18 +1464,24 @@ const ButtonPermissions = computed(() => { Batchdetermination: UserPermissions.value == '仓库客服', //批量确定 ManagerConfirmed: UserPermissions.value == '总部客服经理', //处理完毕下面的客服经理批量确定 ArbitrationDetermination: false, //批量仲裁确定 + Financial_accounting: false, //财务入账 + defaultassignments: false, //默认指派 + export_Report: true, //导出报表 }; case 3: //待处理 return { add: false, //新增按钮 batchReject: UserPermissions.value == '总部客服', //批量打回 assignment: UserPermissions.value == '总部客服经理', //工单指派 - applyArbitration: UserPermissions.value == '仓库客服', //客服介入 + applyArbitration: false, //客服介入 batchFinish: UserPermissions.value != '仓库客服', //批量完结 appeal: false, //申诉 Batchdetermination: false, //批量确定 ManagerConfirmed: false, //处理完毕下面的客服经理批量确定 ArbitrationDetermination: false, //批量仲裁确定 + Financial_accounting: false, //财务入账 + defaultassignments: false, //默认指派 + export_Report: true, //导出报表 }; case 4: //理赔金额未出 return { @@ -1343,6 +1494,9 @@ const ButtonPermissions = computed(() => { Batchdetermination: false, //批量确定 ManagerConfirmed: false, //处理完毕下面的客服经理批量确定 ArbitrationDetermination: false, //批量仲裁确定 + Financial_accounting: false, //财务入账 + defaultassignments: false, //默认指派 + export_Report: true, //导出报表 }; case 5: //仲裁中 return { @@ -1355,6 +1509,9 @@ const ButtonPermissions = computed(() => { Batchdetermination: false, //批量确定 ManagerConfirmed: false, //处理完毕下面的客服经理批量确定 ArbitrationDetermination: true, //批量仲裁确定 + Financial_accounting: false, //财务入账 + defaultassignments: false, //默认指派 + export_Report: true, //导出报表 }; case 6: //完结 return { @@ -1367,6 +1524,9 @@ const ButtonPermissions = computed(() => { Batchdetermination: false, //批量确定 ManagerConfirmed: false, //处理完毕下面的客服经理批量确定 ArbitrationDetermination: false, //批量仲裁确定 + Financial_accounting: true, //财务入账 + defaultassignments: false, //默认指派 + export_Report: true, //导出报表 }; case 7: //超时未处理 return { @@ -1379,6 +1539,9 @@ const ButtonPermissions = computed(() => { Batchdetermination: false, //批量确定 ManagerConfirmed: false, //处理完毕下面的客服经理批量确定 ArbitrationDetermination: false, //批量仲裁确定 + Financial_accounting: false, //财务入账 + defaultassignments: false, //默认指派 + export_Report: false, //导出报表 }; case 8: //待回复 return { @@ -1391,6 +1554,24 @@ const ButtonPermissions = computed(() => { Batchdetermination: false, //批量确定 ManagerConfirmed: false, //处理完毕下面的客服经理批量确定 ArbitrationDetermination: false, //批量仲裁确定 + Financial_accounting: false, //财务入账 + defaultassignments: false, //默认指派 + export_Report: false, //导出报表 + }; + case 9: //待审核 + return { + add: false, //新增按钮 + batchReject: false, //批量打回 + assignment: false, //工单指派 + applyArbitration: false, //客服介入 + batchFinish: false, //批量完结 + appeal: false, //申诉 + Batchdetermination: false, //批量确定 + ManagerConfirmed: UserPermissions.value == '总部客服经理', //处理完毕下面的客服经理批量确定 + ArbitrationDetermination: false, //批量仲裁确定 + Financial_accounting: false, //财务入账 + defaultassignments: false, //默认指派 + export_Report: true, //导出报表 }; // 其他任何情况下的默认情况 default: @@ -1404,6 +1585,9 @@ const ButtonPermissions = computed(() => { Batchdetermination: false, //批量确定 ManagerConfirmed: false, //处理完毕下面的客服经理批量确定 ArbitrationDetermination: false, //批量仲裁确定 + Financial_accounting: false, //财务入账 + defaultassignments: false, //默认指派 + export_Report: false, //导出报表 }; } }); @@ -1450,7 +1634,7 @@ const TransportLossNode = ref([ ]); const Statusprocessing = val => { - val.forEach(item => { + val.forEach(item => { // 对为null的数据进行处理 // for (const property in item) { // if (item[property] == null) { @@ -1458,7 +1642,7 @@ const Statusprocessing = val => { // } // } // 对状态进行处理 - console.log(columnList[10],'columnList[10]'); + console.log(columnList[10], 'columnList[10]'); if (item.workOrderType == 1) { item.workOrderTypeNameS = columnList[2].checkarr[0].label; //货损 } else if (item.workOrderType == 2) { @@ -1587,9 +1771,17 @@ const Tableheaderswitching = val => { publicColumnList.value = val; //默认加载表格 details.columnList = val; //列表配置项 }; +const state = ref(0); // 页面初始化 const OnLoad = () => { + // state.value = localStorage.getItem('state'); + // console.log(state.value,'当前页面状态'); + // if(state.value==1){ + // return + // } + // state.value=1 + // localStorage.setItem('state', state.value); // 表格切换 userInfo.value = JSON.parse(localStorage.getItem('TWMS-userInfo')); //获取本地登录人参数 if (localStorage.getItem('my_data')) { @@ -2792,6 +2984,7 @@ const DataRendering = (val, input) => { // data.workOrderStatus = 10; // details.query.workOrderStatus = 10; // } + data.workOrderStatus = 10; details.query.workOrderStatus = 10; ArbitrationStatus.value = true; //可以申请仲裁 @@ -3190,49 +3383,17 @@ const fellSuccess = (response, uploadFile) => { }; // 处理结果和理赔确定 const DetermineStorage = val => { + if (!details.selectionList.length) { + ElMessage({ + message: '请勾选数据', + type: 'warning', + }); + return; + } let data = { assignList: [], }; - let ConfirmStatus = false; //批量确认状态 - if (!val.row) { - // 说明点击的批量确定 - console.log('当前点击的批量确定'); - if (!details.selectionList.length) { - ElMessage({ - message: '请勾选要处理的数据数据', - type: 'warning', - }); - return; - } else { - ConfirmStatus = true; //说明走的是批量 - data['assignList'] = details.selectionList.map(item => item.id); - console.log(data['assignList'], '批量确定处理好的参数'); - } - } else { - let ID = {}; - ID = val.row.id; - data['assignList'].push(ID); - } - - if (ConfirmStatus) { - // 走的批量确认 - let state = details.selectionList.every(item => item.workOrderStatus == '40'); - if (!state) { - ElMessage({ - message: '批量确认中状态只能为待审核', - type: 'warning', - }); - return; - } - } else { - if (val.workOrderStatus != '40') { - ElMessage({ - message: '状态错误,已经确认过', - type: 'warning', - }); - return; - } - } + data['assignList'] = details.selectionList.map(item => item.id); details.loadingObj.list = true; //开启加载效果 // 完结结果确定 @@ -3749,7 +3910,47 @@ const amountMoney = () => { console.log('赔款总计金额', TotalamountCompensation.value); console.log('收款总计金额', TotalamountReceived.value); }; - +// 财务入账按钮 +const Financialfillingbtn = () => { + if (!details.selectionList.length) { + ElMessage({ + message: '请勾选选择要删除的数据', + type: 'warning', + }); + return; + } + dialogFinancialaccounting.value = true; //开启财务入账弹窗 +}; +// 财务入账确定按钮 +const Financialfilling = () => { + let data = { + ids: '', + ...FinancialFrom.value, + }; + if (details.selectionList.length) { + data.ids = details.selectionList.map(item => item.id).join(','); + loadingFinancial.value = true; //开启加载 + $_updateFinanceTime(data) + .then(res => { + console.log(res, '财务入账填写成功'); + if (res.data.code == 200) { + ElMessage({ + message: res.data.msg, + type: 'success', + }); + dialogFinancialaccounting.value = false; //关闭财务入账弹窗 + DataRendering(TabPermissions.value, details.query); + } + AppealListFn(); + }) + .catch(res => { + console.log(res, '财务入账成功返回值'); + }) + .finally(() => { + loadingFinancial.value = false; //关闭加载 + }); + } +}; // 批量完结 const Batchcompletion = () => { console.log(details.selectionList); @@ -3932,9 +4133,9 @@ const exportReport = () => { const defaultAssignments = () => { CustomerServicea.value = true; //开启弹窗 let data = { - current: details.page.currentPage, - size: details.page.pageSize, - typesOf:AssignmentType.value, + current: assigncurrentPage.value, + size: assignpageSize.value, + typesOf: AssignmentType.value, }; CustomerLoad.value = true; //开启加载 $_aftersalesCustomerMall(data) @@ -3948,7 +4149,16 @@ const defaultAssignments = () => { CustomerLoad.value = false; //关闭加载 }); }; - +// 商场指派每一页多少个条 +const assignsizeChange = val => { + console.log('123'); + (assignpageSize.value = val), defaultAssignments(); +}; +// 点击多少页 +const assigncurrentChange = val => { + assigncurrentPage.value = val; + defaultAssignments(); +}; // 解绑客服默认指派 const Unbindassignment = val => { // let data= @@ -3985,20 +4195,32 @@ const setAsdefault = val => { let data = {}; data = val.row; CreateassignmentLoading.value = true; //开启加载 - $_aftersalesCustomerMallsetDefault(data).then(res => { + $_aftersalesCustomerMallsetDefault(data) + .then(res => { console.log(res, '设为默认'); - if(res.data.code == 200){ - defaultAssignments() + if (res.data.code == 200) { + defaultAssignments(); } - }).catch(res=>{ - - }).finally(()=>{ + }) + .catch(res => {}) + .finally(() => { CreateassignmentLoading.value = false; //关闭加载 }); }; // 指派新增 const CreateAdditions = () => { + // Malldropdown.value + let a=[{a:1,disabled:false},{a:2,disabled:false},{a:3,disabled:false}] + let tab=[{}] + if (AssignmentType.value == '2') { + $_basicdataTripartiteMall({}).then(res => { + console.log(res, '商场指派列表'); + if(res.data.data){ + Malldropdown.value = res.data.data; + } + }); + } Createassignment.value = true; //开启弹窗 $_getCustomerServicePersonnel({}) .then(res => { @@ -4010,20 +4232,21 @@ const CreateAdditions = () => { }); }; // 指派切换 -const AssignSwitch=(val)=>{ +const AssignSwitch = val => { console.log(val); - if(val.props.name == '0'){ + if (val.props.name == '0') { // 总部指派 - AssignmentType.value='1' - }else if(val.props.name == '1'){ + AssignmentType.value = '1'; + } else if (val.props.name == '1') { // 商场指派 - AssignmentType.value='2' + AssignmentType.value = '2'; } - defaultAssignments() -} + defaultAssignments(); +}; // 指派提交 const AssignSubmission = () => { + let data = { aftersalesCustomerMallEntities: [], }; @@ -4032,9 +4255,11 @@ const AssignSubmission = () => { customerServiceId: AssignCustomerservice.value.find(data => data.id == res).id, //仓库客服名称ID customerServiceName: AssignCustomerservice.value.find(data => data.id == res).realName, //客服名称 clientId: BatchFrom.value.AssignWarehouse, //客服仓库ID - clientName: warehouseData.value.find(res => res.value == BatchFrom.value.AssignWarehouse) - .label, //客服绑定仓库 - typesOf:AssignmentType.value, + clientName: + AssignmentType.value == '1' + ? warehouseData.value.find(res => res.value == BatchFrom.value.AssignWarehouse).label + : Malldropdown.value.find(res => res.id == BatchFrom.value.AssignWarehouse).tripartiteMall, //客服绑定仓库 + typesOf: AssignmentType.value, conditions: '2', }); }); @@ -4052,7 +4277,7 @@ const AssignSubmission = () => { Createassignment.value = false; //关闭页面 AssignCustomerlist.value = []; //清空选中列表 BatchFrom.value.AssignWarehouse = ''; //清空选择 - defaultAssignments() + defaultAssignments(); }) .catch(() => {}); } @@ -4637,7 +4862,7 @@ const AssignSubmission = () => { justify-content: space-between; } .el_Createbinding { - height: 450px; + height:110px; display: flex; align-items: flex-start; justify-content: flex-start; diff --git a/src/views/aftersales/aftersalesWorkOrderAdd.vue b/src/views/aftersales/aftersalesWorkOrderAdd.vue index 26db7642..ae6c30b8 100644 --- a/src/views/aftersales/aftersalesWorkOrderAdd.vue +++ b/src/views/aftersales/aftersalesWorkOrderAdd.vue @@ -1,5 +1,7 @@ +