马远东 8 months ago
parent
commit
57c0da89ff
  1. 12
      src/api/basicdata/basicdataTray.js
  2. 7
      src/components/tablecmt/tablecmt.vue
  3. 29
      src/views/basicdata/warehouse/tray/basicdataTray.vue
  4. 12
      src/views/distribution/inventory/distributionStockListMarket.vue

12
src/api/basicdata/basicdataTray.js

@ -67,6 +67,7 @@ export const getinventoryListhistory = (current, size, params) => {
}); });
}; };
/** 获取打印模板 */
export const getPrintTemplate = ids => { export const getPrintTemplate = ids => {
return request({ return request({
url: '/api/logpm-basicdata/tray/barCode', url: '/api/logpm-basicdata/tray/barCode',
@ -77,6 +78,17 @@ export const getPrintTemplate = ids => {
}); });
}; };
/** 获取托盘码PDF */
export const getDownloadTrayCode = ids => {
return request({
url: '/api/logpm-basicdata/tray/getPDF',
method: 'get',
params: {
ids,
},
});
};
export const getlclListhistory = (current, size, params) => { export const getlclListhistory = (current, size, params) => {
return request({ return request({
url: '/api/logpm-basicdata/tray/lclListhistory', url: '/api/logpm-basicdata/tray/lclListhistory',

7
src/components/tablecmt/tablecmt.vue

@ -99,7 +99,8 @@
<template #default="scope"> <template #default="scope">
<el-text <el-text
@click.stop @dblclick.stop="Copytxt(scope.row[column.prop])" @click.stop
@dblclick.stop="Copytxt(scope.row[column.prop])"
class="mx-2 tabculconte" class="mx-2 tabculconte"
:class=" :class="
scope.row[column.prop] == props.searchInput && scope.row[column.prop] scope.row[column.prop] == props.searchInput && scope.row[column.prop]
@ -393,7 +394,9 @@ const isHaveSelection = ref(false);
let selectarr = ref([]); let selectarr = ref([]);
/** 设置每行颜色 */ /** 设置每行颜色 */
const tableRowClassName = ({ row, rowIndex }: { row: TableDataType; rowIndex: number }) => { const tableRowClassName = ({ row, rowIndex }: { row: TableDataType; rowIndex: number }) => {
// console.log('selectarr.value :>> ', selectarr.value);
for (let i = 0; i < selectarr.value.length; i++) { for (let i = 0; i < selectarr.value.length; i++) {
// console.log('row :>> ', row);
if (selectarr.value[i] === row) return 'table-SelectedRow-bgcolor'; if (selectarr.value[i] === row) return 'table-SelectedRow-bgcolor';
} }
@ -723,7 +726,7 @@ function copyContent(content: string) {
} }
} }
function Copytxt(Value) { function Copytxt(Value) {
copyContent(Value) copyContent(Value);
} }
const handleRefresh = () => { const handleRefresh = () => {
for (let i = 0; i < newcolumnList.value.length; i++) { for (let i = 0; i < newcolumnList.value.length; i++) {

29
src/views/basicdata/warehouse/tray/basicdataTray.vue

@ -89,6 +89,11 @@
<!-- 查看二维码 --> <!-- 查看二维码 -->
<el-button type="primary" icon="Printer" @click="handleShowHtml">查看二维码</el-button> <el-button type="primary" icon="Printer" @click="handleShowHtml">查看二维码</el-button>
<!-- 查看二维码 -->
<!-- <el-button type="primary" icon="Printer" @click="handleDownLoadTrayCode">
下载托盘码
</el-button> -->
<!-- 报损 --> <!-- 报损 -->
<el-button type="primary" icon="Edit" @click="handleBreakage"> </el-button> <el-button type="primary" icon="Edit" @click="handleBreakage"> </el-button>
@ -297,6 +302,7 @@ import {
add, add,
update, update,
getPrintTemplate, getPrintTemplate,
getDownloadTrayCode,
disable, disable,
addable, addable,
vacants, vacants,
@ -644,6 +650,29 @@ const handleShowHtml = async () => {
} }
}; };
/** 下载托盘码PDF */
const handleDownLoadTrayCode = async () => {
try {
details.loadingObj.pageLoading = true;
if (details.selectionList.length === 0) {
ElMessage.warning('请选择至少一条数据');
return;
}
let qr = details.selectionList.map(item => item.id).join(',');
console.log(qr);
const res = await getDownloadTrayCode(qr);
console.log(res.data);
const { code, data } = res.data;
if (code !== 200) return;
console.log('data :>> ', data);
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
};
/** 报损 */ /** 报损 */
const handleBreakage = () => { const handleBreakage = () => {
if (details.selectionList.length === 0) return ElMessage.warning('请选择一条数据进行报损'); if (details.selectionList.length === 0) return ElMessage.warning('请选择一条数据进行报损');

12
src/views/distribution/inventory/distributionStockListMarket.vue

@ -260,7 +260,9 @@
placeholder="请输入请输入拆箱数" placeholder="请输入请输入拆箱数"
clearable clearable
v-model="formInline.unpackingQuantity" v-model="formInline.unpackingQuantity"
:precision="0"
:min="0" :min="0"
:value-on-clear="0"
/> />
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -1021,12 +1023,12 @@ export default {
this.$message.warning('拆包数量大于在库数量!!!'); this.$message.warning('拆包数量大于在库数量!!!');
return; return;
} else { } else {
const regex = /\d+/g; // console.log('this.getQuery :>> ', this.getQuery);
const numbers = this.getQuery.packageNum.match(regex); // 使match // const regex = /\d+/g; //
parseInt(numbers[0]) * parseInt(this.formInline.unpackingQuantity); // const numbers = this.getQuery.packageNum.match(regex); // 使match
// parseInt(numbers[0]) * parseInt(this.formInline.unpackingQuantity);
this.formInline.storeNum = this.formInline.storeNum = this.getQuery.packageNum * this.formInline.unpackingQuantity;
parseInt(numbers[0]) * parseInt(this.formInline.unpackingQuantity);
} }
this.formInline.id = this.stockList.id; this.formInline.id = this.stockList.id;
// this.formInline.materialId = this.stockList.materialId; // this.formInline.materialId = this.stockList.materialId;

Loading…
Cancel
Save