|
@@ -413,10 +413,19 @@
|
|
|
</div>
|
|
|
<div class="selection-print-modal-body-info">
|
|
|
{{
|
|
|
- selectedObj.un_print == 0
|
|
|
+ selectedObj.isFinished
|
|
|
? "该部件已打印,是否再次打印?"
|
|
|
: "请确认打印数量是否正确!"
|
|
|
}}
|
|
|
+ <div>
|
|
|
+ <Button
|
|
|
+ v-show="selectedObj.isFinished"
|
|
|
+ @click="handleSelectionRoom"
|
|
|
+ type="primary"
|
|
|
+ >
|
|
|
+ 选择房间号
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div slot="footer">
|
|
@@ -470,7 +479,7 @@
|
|
|
>
|
|
|
返回
|
|
|
</Button>
|
|
|
- <Button @click="handlePrintComfirm(selectedObj)" type="primary">
|
|
|
+ <Button @click="handlePrintComfirm(selectedObj, 1)" type="primary">
|
|
|
确认
|
|
|
</Button>
|
|
|
</div>
|
|
@@ -587,6 +596,9 @@ export default {
|
|
|
handleCancelSelected(v, type) {
|
|
|
if (type) {
|
|
|
this.selectedInfo.rows.splice(v, 1);
|
|
|
+ } else if (v == "product_id") {
|
|
|
+ this.selectedInfo.url_number = "";
|
|
|
+ this.selectedInfo.product_id = "";
|
|
|
} else {
|
|
|
this.selectedInfo[v] = "";
|
|
|
}
|
|
@@ -611,6 +623,9 @@ export default {
|
|
|
});
|
|
|
row.isChoosed = true;
|
|
|
}
|
|
|
+ if (row.un_print == 0) {
|
|
|
+ row.isFinished = true;
|
|
|
+ }
|
|
|
this.selectedObj = row;
|
|
|
},
|
|
|
handleSelectionClick(row, obj) {
|
|
@@ -843,17 +858,34 @@ export default {
|
|
|
}
|
|
|
this.printModal = true;
|
|
|
},
|
|
|
- handlePrintComfirm(row) {
|
|
|
+ handlePrintComfirm(row, type) {
|
|
|
+ if (this.modalRoomListSelected.length != this.selectedObj.print_num) {
|
|
|
+ return this.$Message.warning("与打印数量不符");
|
|
|
+ }
|
|
|
+ let ids = this.modalRoomListSelected.map((v) => {
|
|
|
+ return v.id;
|
|
|
+ });
|
|
|
+ let data = type
|
|
|
+ ? {
|
|
|
+ order_no: this.selectedInfo.order_no,
|
|
|
+ product_id: this.selectedInfo.product_id,
|
|
|
+ rows: this.selectedInfo.rows,
|
|
|
+ num: this.selectedObj.print_num,
|
|
|
+ id: row.id,
|
|
|
+ ids,
|
|
|
+ type,
|
|
|
+ }
|
|
|
+ : {
|
|
|
+ order_no: this.selectedInfo.order_no,
|
|
|
+ product_id: this.selectedInfo.product_id,
|
|
|
+ rows: this.selectedInfo.rows,
|
|
|
+ num: this.selectedObj.print_num,
|
|
|
+ id: row.id,
|
|
|
+ };
|
|
|
this.axios({
|
|
|
method: "post",
|
|
|
url: "/api/station_print",
|
|
|
- data: {
|
|
|
- order_no: this.selectedInfo.order_no,
|
|
|
- product_id: this.selectedInfo.product_id,
|
|
|
- rows: this.selectedInfo.rows,
|
|
|
- num: this.selectedObj.print_num,
|
|
|
- id: row.id,
|
|
|
- },
|
|
|
+ data,
|
|
|
}).then((resp) => {
|
|
|
if (resp.code == 200) {
|
|
|
this.handlePrintChips(resp.data);
|
|
@@ -861,6 +893,23 @@ export default {
|
|
|
this.roomModal = false;
|
|
|
}
|
|
|
});
|
|
|
+ // this.axios({
|
|
|
+ // method: "post",
|
|
|
+ // url: "/api/station_print",
|
|
|
+ // data: {
|
|
|
+ // order_no: this.selectedInfo.order_no,
|
|
|
+ // product_id: this.selectedInfo.product_id,
|
|
|
+ // rows: this.selectedInfo.rows,
|
|
|
+ // num: this.selectedObj.print_num,
|
|
|
+ // id: row.id,
|
|
|
+ // },
|
|
|
+ // }).then((resp) => {
|
|
|
+ // if (resp.code == 200) {
|
|
|
+ // this.handlePrintChips(resp.data);
|
|
|
+ // this.printModal = false;
|
|
|
+ // this.roomModal = false;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
},
|
|
|
handleOk() {
|
|
|
if (!this.selectedObj.isChoosed) {
|