马远东 2 months ago
parent
commit
57c0da89ff
  1. 12
      src/api/basicdata/basicdataTray.js
  2. 15
      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 => {
return request({
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) => {
return request({
url: '/api/logpm-basicdata/tray/lclListhistory',

15
src/components/tablecmt/tablecmt.vue

@ -99,7 +99,8 @@
<template #default="scope">
<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="
scope.row[column.prop] == props.searchInput && scope.row[column.prop]
@ -393,7 +394,9 @@ const isHaveSelection = ref(false);
let selectarr = ref([]);
/** 设置每行颜色 */
const tableRowClassName = ({ row, rowIndex }: { row: TableDataType; rowIndex: number }) => {
// console.log('selectarr.value :>> ', selectarr.value);
for (let i = 0; i < selectarr.value.length; i++) {
// console.log('row :>> ', row);
if (selectarr.value[i] === row) return 'table-SelectedRow-bgcolor';
}
@ -471,8 +474,8 @@ function godowns(url) {
let shownm = ref(false);
function copyalls(column: TableColumnType) {
console.log(column,'column');
console.log(column, 'column');
const _isReturn = column.type == 1 || column.type == 2 || column.type == 3;
if (!_isReturn) return;
let text = '';
@ -722,8 +725,8 @@ function copyContent(content: string) {
return copyResult;
}
}
function Copytxt(Value){
copyContent(Value)
function Copytxt(Value) {
copyContent(Value);
}
const handleRefresh = () => {
for (let i = 0; i < newcolumnList.value.length; i++) {
@ -927,7 +930,7 @@ defineExpose({ handleCheckSelect, handleClearSelect });
background-color: #ff0000;
color: #fff !important;
}
.el_placeholder{
.el_placeholder {
width: 100%;
position: absolute;
margin-top: -12% !important;

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="handleDownLoadTrayCode">
下载托盘码
</el-button> -->
<!-- 报损 -->
<el-button type="primary" icon="Edit" @click="handleBreakage"> </el-button>
@ -297,6 +302,7 @@ import {
add,
update,
getPrintTemplate,
getDownloadTrayCode,
disable,
addable,
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 = () => {
if (details.selectionList.length === 0) return ElMessage.warning('请选择一条数据进行报损');

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

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

Loading…
Cancel
Save