|
@@ -494,8 +494,46 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
<div id="printDom" style="width: 160px; height: 160px"></div>
|
|
<div id="printDom" style="width: 160px; height: 160px"></div>
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="接续列表"
|
|
|
|
+ :visible.sync="jxtc"
|
|
|
|
+ width="30%"
|
|
|
|
+ :before-close="handleClose">
|
|
|
|
+ <el-table
|
|
|
|
+ ref="singleTable"
|
|
|
|
+ :data="tableData1"
|
|
|
|
+ highlight-current-row
|
|
|
|
+ @current-change="handleCurrentChange1"
|
|
|
|
+ style="width: 100%">
|
|
|
|
+ <el-table-column
|
|
|
|
+ property="qrCode"
|
|
|
|
+ label="编号"
|
|
|
|
+ width="120">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ property="levels"
|
|
|
|
+ label="等级"
|
|
|
|
+ width="120">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ property="canisterWeight"
|
|
|
|
+ label="筒重">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ property="tubeColor"
|
|
|
|
+ label="管色">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ property="totalBoxNum"
|
|
|
|
+ label="箱数">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="jxtc = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="jiexuqd">确 定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</el-card>
|
|
</template>
|
|
</template>
|
|
@@ -516,7 +554,7 @@ import {
|
|
AutoPrinting,
|
|
AutoPrinting,
|
|
getPrintDataNew,
|
|
getPrintDataNew,
|
|
removeProductCodeASInventory,
|
|
removeProductCodeASInventory,
|
|
- listBySaleProductID,
|
|
|
|
|
|
+ listBySaleProductID, productCodeListQueryInBatches, selectProductCodeListBySaleQrCode,
|
|
} from "@/api/codeListManage/productCodeList";
|
|
} from "@/api/codeListManage/productCodeList";
|
|
import codeListPrint from "@/utils/print/codeListPrint";
|
|
import codeListPrint from "@/utils/print/codeListPrint";
|
|
import { getServerPrintData } from "@/utils/print/printUtils";
|
|
import { getServerPrintData } from "@/utils/print/printUtils";
|
|
@@ -535,6 +573,25 @@ export default {
|
|
],
|
|
],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ tableData1: [{
|
|
|
|
+ date: '2016-05-02',
|
|
|
|
+ name: '王小虎',
|
|
|
|
+ address: '上海市普陀区金沙江路 1518 弄'
|
|
|
|
+ }, {
|
|
|
|
+ date: '2016-05-04',
|
|
|
|
+ name: '王小虎',
|
|
|
|
+ address: '上海市普陀区金沙江路 1517 弄'
|
|
|
|
+ }, {
|
|
|
|
+ date: '2016-05-01',
|
|
|
|
+ name: '王小虎',
|
|
|
|
+ address: '上海市普陀区金沙江路 1519 弄'
|
|
|
|
+ }, {
|
|
|
|
+ date: '2016-05-03',
|
|
|
|
+ name: '王小虎',
|
|
|
|
+ address: '上海市普陀区金沙江路 1516 弄'
|
|
|
|
+ }],
|
|
|
|
+ currentRow1: null,
|
|
|
|
+ jxtc:false,
|
|
summertId: "", //总码单id
|
|
summertId: "", //总码单id
|
|
qrCode: "", //码单号
|
|
qrCode: "", //码单号
|
|
isStartReadNum: false, //是否开始读取重量
|
|
isStartReadNum: false, //是否开始读取重量
|
|
@@ -747,6 +804,7 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
|
|
+
|
|
this.summertId = new Date().getTime();
|
|
this.summertId = new Date().getTime();
|
|
let { excuteType, qrCode } = this.$route.query;
|
|
let { excuteType, qrCode } = this.$route.query;
|
|
if (excuteType == 2) {
|
|
if (excuteType == 2) {
|
|
@@ -782,6 +840,71 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
+ handleClose(){
|
|
|
|
+ //jxtc关闭
|
|
|
|
+ this.jxtc=false;
|
|
|
|
+ },
|
|
|
|
+ async jiexuqd(){
|
|
|
|
+ console.log(this.currentRow1);
|
|
|
|
+ let payload={
|
|
|
|
+ isEnablePaging: false,
|
|
|
|
+ qrCode:this.currentRow1.qrCode
|
|
|
|
+ }
|
|
|
|
+ let res = await selectProductCodeListBySaleQrCode(payload);
|
|
|
|
+
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ console.log(res);
|
|
|
|
+ this.tableData = res.rows.map((item) => {
|
|
|
|
+ let productionLineNo = this.lineOptions.find(
|
|
|
|
+ (i) => i.id == item.machineTool
|
|
|
|
+ )?.productionLineNo;
|
|
|
|
+ return {
|
|
|
|
+ ...item,
|
|
|
|
+ productionLineNo,
|
|
|
|
+ };
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ if (res.rows.length > 0) {
|
|
|
|
+ let lastRow = res.rows[res.rows.length - 1];
|
|
|
|
+ this.summertId = lastRow.parentCode; //取最后一条数据的总码单code为当前总码单code
|
|
|
|
+ this.qrCode = lastRow.qrCode;
|
|
|
|
+ let {
|
|
|
|
+ packaging,
|
|
|
|
+ machineTool,
|
|
|
|
+ workShifts,
|
|
|
|
+ productionDate,
|
|
|
|
+ levels,
|
|
|
|
+ foreignTradeNumber,
|
|
|
|
+ canisterWeight,
|
|
|
|
+ canisterNum,
|
|
|
|
+ boxWeight,
|
|
|
|
+ tubeColor,
|
|
|
|
+ printFormat,
|
|
|
|
+ grossWeight,
|
|
|
|
+ remark,
|
|
|
|
+ } = lastRow;
|
|
|
|
+ Object.assign(this.form, {
|
|
|
|
+ packaging,
|
|
|
|
+ machineTool,
|
|
|
|
+ workShifts,
|
|
|
|
+ productionDate,
|
|
|
|
+ levels,
|
|
|
|
+ foreignTradeNumber,
|
|
|
|
+ canisterWeight,
|
|
|
|
+ canisterNum,
|
|
|
|
+ boxWeight,
|
|
|
|
+ tubeColor,
|
|
|
|
+ printFormat,
|
|
|
|
+ grossWeight,
|
|
|
|
+ remark,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ this.$message.success("接续完成,请继续打印");
|
|
|
|
+ this.jxtc=false;
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error(res.msg);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
handleInput(value) {
|
|
handleInput(value) {
|
|
console.log("触发了")
|
|
console.log("触发了")
|
|
const currentTime = Date.now(); // 当前时间戳
|
|
const currentTime = Date.now(); // 当前时间戳
|
|
@@ -877,66 +1000,87 @@ export default {
|
|
this.$message.error("请选择产品");
|
|
this.$message.error("请选择产品");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- let payload = {
|
|
|
|
- isEnablePaging: false,
|
|
|
|
- machineTool,
|
|
|
|
- workShifts,
|
|
|
|
- levels,
|
|
|
|
- lotNum: this.currentRow.lotNum,
|
|
|
|
- saleProductId: this.currentRow.id,
|
|
|
|
- };
|
|
|
|
- let res = await listBySaleProductID(payload);
|
|
|
|
- if (res.code == 200) {
|
|
|
|
- console.log(res);
|
|
|
|
- this.tableData = res.rows.map((item) => {
|
|
|
|
- let productionLineNo = this.lineOptions.find(
|
|
|
|
- (i) => i.id == item.machineTool
|
|
|
|
- )?.productionLineNo;
|
|
|
|
- return {
|
|
|
|
- ...item,
|
|
|
|
- productionLineNo,
|
|
|
|
- };
|
|
|
|
- });
|
|
|
|
|
|
+ //abc
|
|
|
|
+ this.pay={
|
|
|
|
+ productId:this.currentRow.id
|
|
|
|
+ }
|
|
|
|
+ //查询是否具有多批的续接信息
|
|
|
|
+ let resa = await productCodeListQueryInBatches(this.pay)
|
|
|
|
+ if(resa.rows.length<=0){
|
|
|
|
+ this.$message.error("暂无需要接续的产品信息");
|
|
|
|
+ return;
|
|
|
|
+ }else if(resa.rows.length==1) {
|
|
|
|
+ console.log(resa)
|
|
|
|
+ let payload = {
|
|
|
|
+ isEnablePaging: false,
|
|
|
|
+ machineTool,
|
|
|
|
+ workShifts,
|
|
|
|
+ levels,
|
|
|
|
+ lotNum: this.currentRow.lotNum,
|
|
|
|
+ saleProductId: this.currentRow.id,
|
|
|
|
+ };
|
|
|
|
+ let res = await listBySaleProductID(payload);
|
|
|
|
|
|
- if (res.rows.length > 0) {
|
|
|
|
- let lastRow = res.rows[res.rows.length - 1];
|
|
|
|
- this.summertId = lastRow.parentCode; //取最后一条数据的总码单code为当前总码单code
|
|
|
|
- this.qrCode = lastRow.qrCode;
|
|
|
|
- let {
|
|
|
|
- packaging,
|
|
|
|
- machineTool,
|
|
|
|
- workShifts,
|
|
|
|
- productionDate,
|
|
|
|
- levels,
|
|
|
|
- foreignTradeNumber,
|
|
|
|
- canisterWeight,
|
|
|
|
- canisterNum,
|
|
|
|
- boxWeight,
|
|
|
|
- tubeColor,
|
|
|
|
- printFormat,
|
|
|
|
- grossWeight,
|
|
|
|
- remark,
|
|
|
|
- } = lastRow;
|
|
|
|
- Object.assign(this.form, {
|
|
|
|
- packaging,
|
|
|
|
- machineTool,
|
|
|
|
- workShifts,
|
|
|
|
- productionDate,
|
|
|
|
- levels,
|
|
|
|
- foreignTradeNumber,
|
|
|
|
- canisterWeight,
|
|
|
|
- canisterNum,
|
|
|
|
- boxWeight,
|
|
|
|
- tubeColor,
|
|
|
|
- printFormat,
|
|
|
|
- grossWeight,
|
|
|
|
- remark,
|
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ console.log(res);
|
|
|
|
+ this.tableData = res.rows.map((item) => {
|
|
|
|
+ let productionLineNo = this.lineOptions.find(
|
|
|
|
+ (i) => i.id == item.machineTool
|
|
|
|
+ )?.productionLineNo;
|
|
|
|
+ return {
|
|
|
|
+ ...item,
|
|
|
|
+ productionLineNo,
|
|
|
|
+ };
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ if (res.rows.length > 0) {
|
|
|
|
+ let lastRow = res.rows[res.rows.length - 1];
|
|
|
|
+ this.summertId = lastRow.parentCode; //取最后一条数据的总码单code为当前总码单code
|
|
|
|
+ this.qrCode = lastRow.qrCode;
|
|
|
|
+ let {
|
|
|
|
+ packaging,
|
|
|
|
+ machineTool,
|
|
|
|
+ workShifts,
|
|
|
|
+ productionDate,
|
|
|
|
+ levels,
|
|
|
|
+ foreignTradeNumber,
|
|
|
|
+ canisterWeight,
|
|
|
|
+ canisterNum,
|
|
|
|
+ boxWeight,
|
|
|
|
+ tubeColor,
|
|
|
|
+ printFormat,
|
|
|
|
+ grossWeight,
|
|
|
|
+ remark,
|
|
|
|
+ } = lastRow;
|
|
|
|
+ Object.assign(this.form, {
|
|
|
|
+ packaging,
|
|
|
|
+ machineTool,
|
|
|
|
+ workShifts,
|
|
|
|
+ productionDate,
|
|
|
|
+ levels,
|
|
|
|
+ foreignTradeNumber,
|
|
|
|
+ canisterWeight,
|
|
|
|
+ canisterNum,
|
|
|
|
+ boxWeight,
|
|
|
|
+ tubeColor,
|
|
|
|
+ printFormat,
|
|
|
|
+ grossWeight,
|
|
|
|
+ remark,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ this.$message.success("接续完成,请继续打印");
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error(res.msg);
|
|
}
|
|
}
|
|
- this.$message.success("接续完成,请继续打印");
|
|
|
|
- } else {
|
|
|
|
- this.$message.error(res.msg);
|
|
|
|
|
|
+ }else {
|
|
|
|
+ //赋值表格信息
|
|
|
|
+ this.tableData1=resa.rows;
|
|
|
|
+ this.jxtc=true;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
} catch (error) {
|
|
} catch (error) {
|
|
console.log(error);
|
|
console.log(error);
|
|
this.$message.error("网络异常");
|
|
this.$message.error("网络异常");
|
|
@@ -1596,6 +1740,9 @@ export default {
|
|
let { boxWeight, canisterWeight, canisterNum } = this.form;
|
|
let { boxWeight, canisterWeight, canisterNum } = this.form;
|
|
return (Number(boxWeight) - canisterWeight * canisterNum).toFixed(2);
|
|
return (Number(boxWeight) - canisterWeight * canisterNum).toFixed(2);
|
|
},
|
|
},
|
|
|
|
+ async handleCurrentChange1(val) {
|
|
|
|
+ this.currentRow1 = val;
|
|
|
|
+ },
|
|
// 表格点击回调
|
|
// 表格点击回调
|
|
async handleCurrentChange(val) {
|
|
async handleCurrentChange(val) {
|
|
//判断是否为纺丝部如果是则不做处理
|
|
//判断是否为纺丝部如果是则不做处理
|