Browse Source

修复已知bug,修复查看二维码

pre-production
马远东 9 months ago
parent
commit
d325ac3c3e
  1. 10
      src/api/distribution/distributionStockArticle.js
  2. 6
      src/api/warehouse/PreStoragePackage.js
  3. 22
      src/option/warehouse/distributionStockArticle.js
  4. 194
      src/views/aftersales/aftersalesWorkOrderend.vue
  5. 20
      src/views/warehouse/prewarehousing/PreStoragePackage.vue

10
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',

6
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,
});

22
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: '商场名称',

194
src/views/aftersales/aftersalesWorkOrderend.vue

@ -482,14 +482,14 @@
</div>
<div style="display: flex">
<div class="el_cwBtn">
<el-button
<!-- <el-button
type="primary"
v-if="item.state == 0 && UserPermissions != '职能客服' && item.accounting!='1'"
@click="accountingBtn(item)"
>
财务处理
</el-button>
<el-button type="primary" @click="payremove(item.state, index)">
</el-button> -->
<el-button type="primary" v-if="item.button" @click="payremove(item, index)">
移除
</el-button>
</div>
@ -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 = `是否移除当前<span style="color: red; font-weight: bold">${cleanedItem}</span>?`;
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) {

20
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) {

Loading…
Cancel
Save