|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <Modal v-model="fullscreenModal" fullscreen title="工位屏">
|
|
|
+ <Modal v-model="fullscreenModal" fullscreen title="工位屏" @on-cancel='cancel'>
|
|
|
<div slot="header">
|
|
|
<span style="font-size: 0.5rem">工位屏</span>
|
|
|
<div class="fullscreen-title-btn">
|
|
@@ -132,6 +132,17 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="fullscreen-content-select-block">
|
|
|
+ <Button
|
|
|
+ @click="handleSelectionAll"
|
|
|
+ size="large"
|
|
|
+ type="primary"
|
|
|
+ :ghost='selectedAll?true:false'
|
|
|
+ style="margin-right: 10px"
|
|
|
+ >
|
|
|
+ {{selectedAll?"取消全选":'全选'}}
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="fullscreen-content-choose">
|
|
|
<div
|
|
@@ -427,9 +438,9 @@
|
|
|
<Modal
|
|
|
class="selection-print-modal"
|
|
|
v-model="printModal"
|
|
|
- title="打印"
|
|
|
width="60%"
|
|
|
>
|
|
|
+ <div slot="header" style="text-align:center;font-weight:bold"><h1>打 印</h1></div>
|
|
|
<div class="selection-print-modal-body">
|
|
|
<div class="selection-print-modal-body-top">
|
|
|
<div>
|
|
@@ -445,7 +456,7 @@
|
|
|
<InputNumber
|
|
|
:max="selectedObj.un_print==0?selectedObj.on_print:selectedObj.un_print"
|
|
|
:min="0"
|
|
|
- size="large"
|
|
|
+ style="height:1em;font-size:1.5em;line-height:0.9em;width:2rem"
|
|
|
@on-focus="handlePrintInput"
|
|
|
v-model="selectedObj.print_num"
|
|
|
></InputNumber>
|
|
@@ -475,7 +486,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div slot="footer">
|
|
|
+ <div slot="footer" class="selection-print-modal-body-footer">
|
|
|
<Button
|
|
|
@click="printModal = false"
|
|
|
type="primary"
|
|
@@ -484,11 +495,15 @@
|
|
|
返回
|
|
|
</Button>
|
|
|
<Button @click="handlePrintComfirm(selectedObj)" type="primary">
|
|
|
- 确认
|
|
|
+ 芯片打印
|
|
|
</Button>
|
|
|
+ <Button @click="Print(selectedObj)" type="primary">
|
|
|
+ 标签打印
|
|
|
+ </Button>
|
|
|
+
|
|
|
</div>
|
|
|
</Modal>
|
|
|
- <Modal
|
|
|
+ <!-- <Modal
|
|
|
class="selection-print-modal"
|
|
|
v-model="okModal"
|
|
|
title="完成"
|
|
@@ -542,7 +557,7 @@
|
|
|
确认
|
|
|
</Button>
|
|
|
</div>
|
|
|
- </Modal>
|
|
|
+ </Modal> -->
|
|
|
<Modal
|
|
|
class="selection-modal"
|
|
|
v-model="roomModal"
|
|
@@ -582,9 +597,13 @@
|
|
|
>
|
|
|
返回
|
|
|
</Button>
|
|
|
- <Button @click="handlePrintComfirm(selectedObj, 1)" type="primary">
|
|
|
- 确认
|
|
|
+ <Button @click="handlePrintComfirm(selectedObj, 1)" type="primary">
|
|
|
+ 芯片打印
|
|
|
</Button>
|
|
|
+ <Button @click="Print(selectedObj, 1)" type="primary">
|
|
|
+ 标签打印
|
|
|
+ </Button>
|
|
|
+
|
|
|
</div>
|
|
|
</Modal>
|
|
|
<Modal
|
|
@@ -642,6 +661,15 @@
|
|
|
</div>
|
|
|
</Modal>
|
|
|
</Modal>
|
|
|
+ <div ref='printRow' class="printRow">
|
|
|
+ <div v-for="(item,index) in tagPrintList" :key="index" class="printRow_content" style="width:300px">
|
|
|
+ <div style="display:flex"><span style="width:140px">项目:{{item.client_name}}</span><span>区域:{{item.house ? item.house + "-" : ""}}{{item.layer ? item.layer : ""}}{{item.position ? item.position : ""}}</span></div>
|
|
|
+ <div style="display:flex"><span style="width:140px">房号:{{item.number_detail}}</span><span>产品:{{item.product_title}}</span></div>
|
|
|
+ <div style="display:flex"><span style="width:140px">图号:{{item.url_number}}</span><span>部件:{{item.part_title}}</span></div>
|
|
|
+ <div><span>尺寸:{{item.measure}}</span></div>
|
|
|
+ <div><span>木皮:{{item.color_title}}</span></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -658,6 +686,8 @@ export default {
|
|
|
data() {
|
|
|
// 这里存放数据
|
|
|
return {
|
|
|
+ cancelData:[],
|
|
|
+ tagPrintList:[],
|
|
|
produceID:null,
|
|
|
employeeID:null,
|
|
|
rownoList:[],
|
|
@@ -708,11 +738,12 @@ export default {
|
|
|
rows: [],
|
|
|
},
|
|
|
page_index: 1,
|
|
|
- page_size: 6,
|
|
|
+ // page_size: 6,
|
|
|
total: 0,
|
|
|
currentSearchValue: "",
|
|
|
modal_1_page_index: 1,
|
|
|
modal_1_page_size: 6,
|
|
|
+ selectedAll:false,//true全选;false取消全选
|
|
|
modal_1_total: 0,
|
|
|
modal_room_page_index: 1,
|
|
|
modal_room_page_size: 9,
|
|
@@ -734,14 +765,23 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
+ computed:{
|
|
|
+ page_size(){
|
|
|
+ if(this.isWideScreen){
|
|
|
+ return 12
|
|
|
+ }else{
|
|
|
+ return 6
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
created() {},
|
|
|
beforeRouteEnter(to, from, next) {
|
|
|
next((vm) => {
|
|
|
if (from.path == "/cms/ChipPrintScreen/ChipPrintScreenCheck") {
|
|
|
vm.selectedInfo = JSON.parse(localStorage.getItem("printInfo"));
|
|
|
vm.getChipDetail();
|
|
|
- }
|
|
|
- });
|
|
|
+ vm.handleGetType(JSON.parse(localStorage.getItem("printInfo")).order_no);
|
|
|
+ }})
|
|
|
},
|
|
|
// 生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
@@ -759,6 +799,69 @@ export default {
|
|
|
// })
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleSelectionAll(){
|
|
|
+ this.selectedAll = !this.selectedAll;
|
|
|
+ if(this.selectedAll){
|
|
|
+ this.contentData.map(v=>{
|
|
|
+ v.isChoosed = true
|
|
|
+ });
|
|
|
+ this.saveData = [];
|
|
|
+ }else{
|
|
|
+ this.contentData.map(v=>{
|
|
|
+ v.isChoosed = false;
|
|
|
+ });
|
|
|
+ this.saveData=[];
|
|
|
+ this.cancelData = [];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ Print(row,type){
|
|
|
+ if (
|
|
|
+ type &&
|
|
|
+ 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,
|
|
|
+ }).then((resp) => {
|
|
|
+ if (resp.code == 200) {
|
|
|
+ console.log(resp)
|
|
|
+ this.tagPrintList = resp.data;
|
|
|
+ setTimeout(()=>{
|
|
|
+ this.$print(this.$refs.printRow);
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
+ cancel(){
|
|
|
+ this.fullscreenModal = false;
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
focusChange(index){
|
|
|
this.focusIndex = index;
|
|
|
this.max = this.rownoList[index].num;
|
|
@@ -802,12 +905,28 @@ export default {
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
changeChooseProduceList(item){
|
|
|
-
|
|
|
+ let passData={
|
|
|
+ order_no: this.selectedInfo.order_no,
|
|
|
+ product_id: this.selectedInfo.product_id,
|
|
|
+ rows: this.selectedInfo.rows,
|
|
|
+ };
|
|
|
let produce = item.id;
|
|
|
let id = [];
|
|
|
- this.saveData.map(v=>{
|
|
|
- id.push(v.id)
|
|
|
+ let cancelId = [];
|
|
|
+ if(this.selectedAll){
|
|
|
+ this.cancelData.map(v=>{
|
|
|
+ cancelId.push(v.id)
|
|
|
+ })
|
|
|
+ passData.delete_id = cancelId;
|
|
|
+ passData.produce =produce;
|
|
|
+ passData.type =1; //type1全选状态;
|
|
|
+ }else{
|
|
|
+ this.saveData.map(v=>{
|
|
|
+ id.push(v.id);
|
|
|
});
|
|
|
+ passData.id = id;
|
|
|
+ passData.produce =produce;
|
|
|
+ }
|
|
|
this.produceList.map(m=>{
|
|
|
|
|
|
if(m.id==item.id){
|
|
@@ -818,7 +937,7 @@ export default {
|
|
|
})
|
|
|
console.log(item)
|
|
|
if(item.isChoosed){
|
|
|
- this.axios.post('/api/station_get_order_produce',{id,produce}).then(res=>{
|
|
|
+ this.axios.post('/api/station_get_order_produce',{...passData}).then(res=>{
|
|
|
if(res.code==200){
|
|
|
this.rownoList = res.data;
|
|
|
this.produceID = item.id;
|
|
@@ -909,14 +1028,28 @@ export default {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- console.log(this.selectedObj)
|
|
|
+ if(this.selectedAll){
|
|
|
+ if(!row.isChoosed){
|
|
|
+ this.cancelData.push(row)
|
|
|
+ }else{
|
|
|
+ this.cancelData.map((v,index)=>{
|
|
|
+ if(v.id == row.id){
|
|
|
+ this.cancelData.splice(index,1)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(this.saveData)
|
|
|
+ console.log(this.cancelData)
|
|
|
// this.selectedObj = row;
|
|
|
},
|
|
|
goCheckPage() {
|
|
|
- localStorage.setItem("printInfo", JSON.stringify(this.selectedInfo));
|
|
|
+
|
|
|
+ localStorage.setItem("printInfo", JSON.stringify(this.selectedInfo));
|
|
|
this.$router.push({
|
|
|
- path: "/cms/ChipPrintScreen/ChipPrintScreenCheck",
|
|
|
+ path: "/cms/ChipPrintScreen/ChipPrintScreenCheck"
|
|
|
});
|
|
|
+
|
|
|
},
|
|
|
handleSelectionClick(row, obj) {
|
|
|
row.list.map((v) => (v.isCurrent = false));
|
|
@@ -989,11 +1122,11 @@ export default {
|
|
|
|
|
|
if (this.isWideScreen) {
|
|
|
this.page_index =1;
|
|
|
- this.page_size = 12;
|
|
|
+ // this.page_size = 12;
|
|
|
this.enterWideScreen();
|
|
|
} else {
|
|
|
this.page_index =1;
|
|
|
- this.page_size = 6;
|
|
|
+ // this.page_size = 6;
|
|
|
this.exitWideScreen();
|
|
|
}
|
|
|
this.getChipDetail();
|
|
@@ -1084,6 +1217,20 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ handleGetType(row){
|
|
|
+ this.axios.post('/api/station_get_type',{order_no:row}).then(res=>{
|
|
|
+ if(res.code == 200){
|
|
|
+ this.employeeList = res.data.employee_list;
|
|
|
+ this.employeeList.map(item=>{
|
|
|
+ item.isChoosed = false;
|
|
|
+ })
|
|
|
+ this.produceList = res.data.produce_list;
|
|
|
+ this.produceList.map(item=>{
|
|
|
+ item.isChoosed = false;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
//项目、图号确认
|
|
|
handleSelectionComfirm(row) {
|
|
|
console.log(`row`, row);
|
|
@@ -1101,18 +1248,7 @@ export default {
|
|
|
order_no = v.order_no;
|
|
|
}
|
|
|
})
|
|
|
- this.axios.post('/api/station_get_type',{order_no}).then(res=>{
|
|
|
- if(res.code == 200){
|
|
|
- this.employeeList = res.data.employee_list;
|
|
|
- this.employeeList.map(item=>{
|
|
|
- item.isChoosed = false;
|
|
|
- })
|
|
|
- this.produceList = res.data.produce_list;
|
|
|
- this.produceList.map(item=>{
|
|
|
- item.isChoosed = false;
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ this.handleGetType(order_no);
|
|
|
} else if (row.type == 2) {
|
|
|
this.selectedInfo.url_number = this.chooseUrlNo.url_number;
|
|
|
this.selectedInfo.product_id = this.chooseUrlNo.product_id;
|
|
@@ -1141,6 +1277,19 @@ export default {
|
|
|
console.log(`res`, res);
|
|
|
res.data.data.map((v) => (v.isChoosed = false));
|
|
|
this.contentData = res.data.data;
|
|
|
+ if(this.selectedAll){
|
|
|
+ this.contentData.map(v=>{
|
|
|
+ v.isChoosed = true;
|
|
|
+ })
|
|
|
+ this.contentData.map(v=>{
|
|
|
+ this.cancelData.map(m=>{
|
|
|
+ if(v.id == m.id){
|
|
|
+ v.isChoosed=false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
this.contentData.map(v=>{
|
|
|
this.saveData.map(m=>{
|
|
|
if(v.id==m.id){
|
|
@@ -1247,7 +1396,7 @@ export default {
|
|
|
// this.finishWork = false;
|
|
|
},
|
|
|
handleOk() {
|
|
|
- if (this.saveData.length==0) {
|
|
|
+ if (this.saveData.length==0&&!this.selectedAll) {
|
|
|
return this.$Message.warning("请选择数据");
|
|
|
}
|
|
|
// if (this.selectedObj.type == 1 && this.selectedObj.un_print == 0) {
|
|
@@ -1277,28 +1426,29 @@ export default {
|
|
|
this.rownoList = [];
|
|
|
this.finishWork = false;
|
|
|
},
|
|
|
- handleOkComfirm(row) {
|
|
|
- this.axios({
|
|
|
- method: "post",
|
|
|
- url: "/api/station_complete",
|
|
|
- data: {
|
|
|
- order_no: this.selectedInfo.order_no,
|
|
|
- product_id: this.selectedInfo.product_id,
|
|
|
- rows: this.selectedInfo.rows,
|
|
|
- num: this.selectedObj.ok_num,
|
|
|
- id: row.id,
|
|
|
- },
|
|
|
- }).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.okModal = false;
|
|
|
- this.getChipDetail();
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
+ // handleOkComfirm(row) {
|
|
|
+ // this.axios({
|
|
|
+ // method: "post",
|
|
|
+ // url: "/api/station_complete",
|
|
|
+ // data: {
|
|
|
+ // order_no: this.selectedInfo.order_no,
|
|
|
+ // product_id: this.selectedInfo.product_id,
|
|
|
+ // rows: this.selectedInfo.rows,
|
|
|
+ // num: this.selectedObj.ok_num,
|
|
|
+ // id: row.id,
|
|
|
+ // },
|
|
|
+ // }).then((res) => {
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.okModal = false;
|
|
|
+ // this.getChipDetail();
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // },
|
|
|
//行号确认
|
|
|
handleRowNoComfirm() {
|
|
|
this.selectedInfo.rows = JSON.parse(JSON.stringify(this.chooseLineNo));
|
|
|
this.selectionRownolModal = false;
|
|
|
+ this.page_index = 1;
|
|
|
this.getChipDetail();
|
|
|
},
|
|
|
onInput(value) {
|
|
@@ -1342,19 +1492,19 @@ export default {
|
|
|
keyboardPrintTap(value) {
|
|
|
let max = this.selectedObj.on_print + this.selectedObj.un_print;
|
|
|
this.selectedObj.print_num =
|
|
|
- (this.selectedObj.print_num ? this.selectedObj.print_num : "") +
|
|
|
+ Number((this.selectedObj.print_num ? this.selectedObj.print_num : "") +
|
|
|
"" +
|
|
|
- value;
|
|
|
+ value);
|
|
|
if (this.selectedObj.print_num * 1 > max) {
|
|
|
this.selectedObj.print_num = max;
|
|
|
}
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
keyboardPrintDele() {
|
|
|
- this.selectedObj.print_num = (this.selectedObj.print_num + "").substring(
|
|
|
+ this.selectedObj.print_num = Number((this.selectedObj.print_num + "").substring(
|
|
|
0,
|
|
|
this.selectedObj.print_num.length - 1
|
|
|
- );
|
|
|
+ ));
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
keyboardTap(value) {
|
|
@@ -1831,8 +1981,6 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
},
|
|
|
- // 监听属性 类似于data概念
|
|
|
- computed: {},
|
|
|
// 监控data中的数据变化
|
|
|
watch: {},
|
|
|
beforeCreate() {}, // 生命周期 - 创建之前
|
|
@@ -1872,7 +2020,7 @@ export default {
|
|
|
width: 30%;
|
|
|
}
|
|
|
.fullscreen-content-select-block:nth-child(3) {
|
|
|
- width: 20%;
|
|
|
+ width: 30%;
|
|
|
}
|
|
|
}
|
|
|
.fullscreen-content-choose {
|
|
@@ -1992,16 +2140,40 @@ export default {
|
|
|
}
|
|
|
.selection-print-modal {
|
|
|
.selection-print-modal-body {
|
|
|
+ font-size: 0.5rem;
|
|
|
+ height: 4.5rem;
|
|
|
.selection-print-modal-body-top {
|
|
|
display: flex;
|
|
|
justify-content: space-around;
|
|
|
align-items: center;
|
|
|
margin: 0.5rem 0;
|
|
|
+ /deep/.ivu-input-number-handler{
|
|
|
+ height: 20.5px;
|
|
|
+ }
|
|
|
+ // /deep/.ivu-input-number-input-warp{
|
|
|
+ // margin: auto 0;
|
|
|
+ // /deep/.ivu-input-number-input{
|
|
|
+ // margin: auto 0;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}
|
|
|
.selection-print-modal-body-info {
|
|
|
padding-top: 16px;
|
|
|
border-top: 1px solid #e8eaec;
|
|
|
text-align: center;
|
|
|
+ button{
|
|
|
+ height: 2em;
|
|
|
+ font-size: 1em;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .selection-print-modal-body-footer{
|
|
|
+ height: 1rem;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ button{
|
|
|
+ height: 1.5em;
|
|
|
+ font-size: 3em;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -2060,4 +2232,15 @@ export default {
|
|
|
background-color: #2d8cf0;
|
|
|
}
|
|
|
}
|
|
|
+.printRow{
|
|
|
+ // display: none;
|
|
|
+}
|
|
|
+@media print {
|
|
|
+ .printRow{
|
|
|
+ display: block;
|
|
|
+ width: 100%;
|
|
|
+ .printRow_content{
|
|
|
+ page-break-after: always;
|
|
|
+ }
|
|
|
+ }}
|
|
|
</style>
|