diff --git a/src/api/distribution/distributionStockArticle.js b/src/api/distribution/distributionStockArticle.js
index 34b7ead4..2c9d8895 100644
--- a/src/api/distribution/distributionStockArticle.js
+++ b/src/api/distribution/distributionStockArticle.js
@@ -123,6 +123,16 @@ export const showOrderPackgeCode = params => {
});
};
+export const $_showOrderPackgeCodeByCode = params => {
+ return request({
+ url: '/api/logpm-distribution/distributionStockArticle/showOrderPackgeCodeByCode',
+ method: 'get',
+ params: {
+ ...params,
+ },
+ });
+};
+
export const getStockTemplate = params => {
return request({
url: '/api/logpm-distribution/distributionStockArticle/getPrintTemplate',
diff --git a/src/api/warehouse/PreStoragePackage.js b/src/api/warehouse/PreStoragePackage.js
index 75e7a272..06f91b2f 100644
--- a/src/api/warehouse/PreStoragePackage.js
+++ b/src/api/warehouse/PreStoragePackage.js
@@ -7,7 +7,7 @@ import request from '@/axios';
*/
export const getList = params => {
return request({
- url: '/api/logpm-distribution/businessPreOrder/page',
+ url: '/api/logpm-business/businessPreOrder/page',
method: 'get',
params,
});
@@ -20,7 +20,7 @@ export const getList = params => {
*/
export const getInOrder = params => {
return request({
- url: '/api/logpm-distribution/businessPreOrder/inOrder',
+ url: '/api/logpm-business/businessPreOrder/inOrder',
method: 'get',
params,
});
@@ -33,7 +33,7 @@ export const getInOrder = params => {
*/
export const getPageByCarNum = params => {
return request({
- url: '/api/logpm-distribution/businessPreOrder/pageByCarNum',
+ url: '/api/logpm-business/businessPreOrder/pageByCarNum',
method: 'get',
params,
});
diff --git a/src/option/warehouse/distributionStockArticle.js b/src/option/warehouse/distributionStockArticle.js
index d2a6aa6c..496ebfc0 100644
--- a/src/option/warehouse/distributionStockArticle.js
+++ b/src/option/warehouse/distributionStockArticle.js
@@ -58,6 +58,28 @@ export const columnList = [
sortable: true,
head: false,
},
+ {
+ prop: 'signingTime',
+ label: '签收复核时间',
+ type: 1,
+ values: '',
+ width: '150',
+ checkarr: [],
+ fixed: false,
+ sortable: true,
+ head: false,
+ },
+ {
+ prop: 'sjsigningTime',
+ label: '司机签收时间',
+ type: 1,
+ values: '',
+ width: '150',
+ checkarr: [],
+ fixed: false,
+ sortable: true,
+ head: false,
+ },
{
prop: 'mallName',
label: '商场名称',
diff --git a/src/views/aftersales/aftersalesWorkOrderend.vue b/src/views/aftersales/aftersalesWorkOrderend.vue
index c9e3a0ab..28005641 100644
--- a/src/views/aftersales/aftersalesWorkOrderend.vue
+++ b/src/views/aftersales/aftersalesWorkOrderend.vue
@@ -482,14 +482,14 @@
-
财务处理
-
-
+ -->
+
移除
@@ -987,8 +987,9 @@ const CompensationParty = ref([
num: 0,
reason: '',
cld: 1,
- warehouseId: null,
+ warehouseId: '',
compensationPersonnel: '',
+ button:false,
}, //赔款方
// explains: ''
{
@@ -997,8 +998,9 @@ const CompensationParty = ref([
num: 0,
reason: '',
cld: 1,
- warehouseId: null,
+ warehouseId: '',
compensationPersonnel: '',
+ button:false,
}, //受款方
// explains: ''
]); //收/赔
@@ -1701,79 +1703,98 @@ const Clickviod = () => {
};
// 添加赔款方
const AddCompensation = () => {
- console.log('添加赔款方');
- let som = 1;
- CompensationParty.value.forEach(item => {
- if (item.state == 0) {
- som++;
- }
- });
-
- let lastIndex = -1;
-
- for (let i = CompensationParty.value.length - 1; i >= 0; i--) {
- if (CompensationParty.value[i].state == 0) {
- lastIndex = i;
- break; // 找到匹配元素后中断循环
- }
- }
-
- if (lastIndex !== -1) {
- CompensationParty.value.splice(lastIndex + 1, 0, {
- name: '',
- state: 0,
- num: 0,
- reason: '',
- cld: som,
- compensationPersonnel: '',
- warehouseId: '',
- });
-
- // CompensationParty.value.push({
- // name: '',
- // state: 0,
- // num: 0,
- // reason: '',
- // cld: som,
- // compensationPersonnel: '',
- // warehouseId: '',
- // });
- } else {
- console.log(`在数组中未找到 ${elementToFind}。`);
- }
-
- // explains: ''
+ let data = {
+ state: 0, //赔款方
+ warehouseId: '', //仓库
+ reason: '', //原因
+ num: 0, //金额
+ compensationPersonnel: '', //责任人
+ button: true, //按钮可移除
+ };
+ CompensationParty.value.splice(
+ CompensationParty.value.map(item => item.state).lastIndexOf(0) + 1,
+ 0,
+ data
+ );
};
// 添加受款方
-const AddPayee = () => {
- let som = 1;
- CompensationParty.value.forEach(item => {
- if (item.state == 1) {
- som++;
- }
- });
-
- let lastIndex = -1;
+const AddPayee=()=>{
+ console.log(warehouseData.value,'warehouseData');
+ let data = {
+ state: 1, //赔款方
+ warehouseId: '', //仓库
+ reason: '', //原因
+ num: 0, //金额
+ compensationPersonnel: '', //责任人
+ button: true, //按钮可移除
+ };
+ CompensationParty.value.splice(
+ CompensationParty.value.map(item => item.state).lastIndexOf(1) + 1,
+ 0,
+ data
+ );
+}
+// 添加赔款方
+// const AddCompensation = () => {
+// console.log('添加赔款方');
+// let som = 1;
+// CompensationParty.value.forEach(item => {
+// if (item.state == 0) {
+// som++;
+// }
+// });
+
+// let lastIndex = -1;
+
+// for (let i = CompensationParty.value.length - 1; i >= 0; i--) {
+// if (CompensationParty.value[i].state == 0) {
+// lastIndex = i;
+// break; // 找到匹配元素后中断循环
+// }
+// }
- for (let i = CompensationParty.value.length - 1; i >= 0; i--) {
- if (CompensationParty.value[i].state == 0) {
- lastIndex = i;
- break; // 找到匹配元素后中断循环
- }
- }
+// if (lastIndex !== -1) {
+// CompensationParty.value.splice(lastIndex + 1, 0, {
+// name: '',
+// state: 0,
+// num: 0,
+// reason: '',
+// cld: som,
+// compensationPersonnel: '',
+// warehouseId: '',
+// });
+// }
+// };
+// 添加受款方
+// const AddPayee = () => {
+// let som = 1;
+// CompensationParty.value.forEach(item => {
+// if (item.state == 1) {
+// som++;
+// }
+// });
+
+// let lastIndex = -1;
+
+// for (let i = CompensationParty.value.length - 1; i >= 0; i--) {
+// if (CompensationParty.value[i].state == 0) {
+// lastIndex = i;
+// break; // 找到匹配元素后中断循环
+// }
+// }
- if (lastIndex !== -1) {
- CompensationParty.value.splice(lastIndex + 1, 0, {
- name: '',
- state: 1,
- num: 0,
- reason: '',
- cld: som,
- compensationPersonnel: '',
- warehouseId: '',
- });
- }
-};
+// if (lastIndex !== -1) {
+// CompensationParty.value.splice(lastIndex + 1, 0, {
+// name: '',
+// state: 1,
+// num: 0,
+// reason: '',
+// cld: som,
+// compensationPersonnel: '',
+// warehouseId: '',
+// });
+// }
+// };
// 表单校验
const ruleForm = reactive({
// warehouseId: [{ required: true, message: '请选择仓库', trigger: ['bulr', 'change'] }],
@@ -1789,7 +1810,30 @@ const Totalamount = () => {
.reduce((accumulator, currentValue) => accumulator + currentValue, 0);
};
// 移除按钮
-const payremove = (state, val) => {
+const payremove =async (item, index) => {
+ console.log(item, 'item');
+ console.log(index, 'index');
+ const cleanedItem = item.state ? '受款方' : '赔款方';
+ // 尝试使用 HTML 字符串
+ const message = `是否移除当前
${cleanedItem}?`;
+ await ElMessageBox.confirm(message, '提示', {
+ dangerouslyUseHTMLString: true, // 如果组件支持,启用此选项以解析 HTML
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning',
+ })
+ .then(() => {
+
+ if (item.state) {
+ Totalamountreceived.value -= item.num; //受款总金额
+ } else {
+ Totalamountcompensation.value -= item.num; //赔款总金额
+ }
+ CompensationParty.value.splice(index, 1);
+ })
+ .catch(() => {});
+
+ return
// 判断赔付方,至少保留一条数据
if (CompensationParty.value.map(res => res.state == 0).length == 1) {
diff --git a/src/views/warehouse/prewarehousing/PreStoragePackage.vue b/src/views/warehouse/prewarehousing/PreStoragePackage.vue
index ce99e05c..df4434bc 100644
--- a/src/views/warehouse/prewarehousing/PreStoragePackage.vue
+++ b/src/views/warehouse/prewarehousing/PreStoragePackage.vue
@@ -146,10 +146,10 @@ import {
import { columnList } from '@/option/warehouse/PreStoragePackage';
import { useRouter, useRoute } from 'vue-router';
import { deepClone } from '@/utils/util';
-import { showOrderPackgeCode } from '@/api/distribution/distributionStockArticle';
+import { showOrderPackgeCode,$_showOrderPackgeCodeByCode } from '@/api/distribution/distributionStockArticle';
import { getList, getInOrder } from '@/api/warehouse/PreStoragePackage';
import { ElMessage, ElMessageBox } from 'element-plus';
-
+import { getShowAdvancePackgeCode } from '@/api/waybill/orderPackageListDetails';
// 获取路由实例
const $router = useRouter();
const $route = useRoute();
@@ -365,15 +365,15 @@ const handleShowQrCode = async ({ row }) => {
details.loadingObj.pageLoading = true;
let qr = {
- ids: row.id,
+ orderPackageCodes: row.orderPackageCode,
};
details.html = '';
- const res = await showOrderPackgeCode(qr);
+ const res = await getShowAdvancePackgeCode(qr);
const { code, data } = res.data;
if (code !== 200) return;
- details.html = details.getHtmls(data.dataList, data.templateHtml);
+ details.html = getHtmls(data.dataList, data.templateHtml);
details.popUpShow.dialogVisible = true;
} catch (error) {
@@ -391,19 +391,21 @@ const handleBatchShowQrCode = async () => {
let checkcode = [];
details.selectionList.map(item => {
- checkcode.push(item.id);
+ checkcode.push(item.orderPackageCode);
});
// return
let qr = {
- ids: checkcode.join(','),
+ orderPackageCodes: checkcode.join(','),
};
details.html = '';
- const res = await showOrderPackgeCode(qr);
+ const res = await getShowAdvancePackgeCode(qr);
+ console.log(details,'details');
const { code, data } = res.data;
if (code !== 200) return;
- details.html = details.getHtmls(data.dataList, data.templateHtml);
+
+ details.html = getHtmls(data.dataList, data.templateHtml);
details.popUpShow.dialogVisible = true;
} catch (error) {