|
@@ -402,9 +402,10 @@
|
|
|
<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>
|
|
@@ -456,7 +457,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div slot="footer">
|
|
|
+ <div slot="footer" class="selection-print-modal-body-footer">
|
|
|
<Button
|
|
|
@click="printModal = false"
|
|
|
type="primary"
|
|
@@ -465,8 +466,11 @@
|
|
|
返回
|
|
|
</Button>
|
|
|
<Button @click="handlePrintComfirm(selectedObj)" type="primary">
|
|
|
- 确认
|
|
|
- </Button>
|
|
|
+ 芯片打印
|
|
|
+ </Button>
|
|
|
+ <Button @click="Print(selectedObj)" type="primary">
|
|
|
+ 标签打印
|
|
|
+ </Button>
|
|
|
</div>
|
|
|
</Modal>
|
|
|
<Modal
|
|
@@ -500,20 +504,34 @@
|
|
|
:total="modal_room_total"
|
|
|
/>
|
|
|
</div>
|
|
|
- <div slot="footer">
|
|
|
+ <div slot="footer" style="display:flex;justify-content: space-around;">
|
|
|
<Button
|
|
|
@click="handleRoomCancel"
|
|
|
type="primary"
|
|
|
- style="margin-right: 10px"
|
|
|
+ style="margin-right: 10px;width:20%;height:60px;font-size:29px"
|
|
|
>
|
|
|
返回
|
|
|
</Button>
|
|
|
- <Button @click="handlePrintComfirm(selectedObj, 1)" type="primary">
|
|
|
- 确认
|
|
|
- </Button>
|
|
|
+ <Button @click="handlePrintComfirm(selectedObj, 1)" type="primary"
|
|
|
+ style="width:20%;height:60px;font-size:29px">
|
|
|
+ 芯片打印
|
|
|
+ </Button>
|
|
|
+ <Button @click="Print(selectedObj, 1)" type="primary" style="width:20%;height:60px;font-size:29px">
|
|
|
+ 标签打印
|
|
|
+ </Button>
|
|
|
</div>
|
|
|
</Modal>
|
|
|
- </Modal></div>
|
|
|
+ </Modal>
|
|
|
+ <div ref='printRow' class="printRow">
|
|
|
+ <div v-for="(item,index) in tagPrintList" :key="index" class="printRow_content" style="width:380px">
|
|
|
+ <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>
|
|
|
|
|
|
<script>
|
|
@@ -529,6 +547,7 @@ export default {
|
|
|
data() {
|
|
|
// 这里存放数据
|
|
|
return {
|
|
|
+ tagPrintList:[],
|
|
|
show: false,
|
|
|
show2: false,
|
|
|
show3: false,
|
|
@@ -598,6 +617,50 @@ export default {
|
|
|
this.getChipDetail();
|
|
|
},
|
|
|
methods: {
|
|
|
+ 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.fullscreenModals = false;
|
|
|
this.$forceUpdate();
|
|
@@ -1232,19 +1295,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) {
|
|
@@ -1646,6 +1709,8 @@ export default {
|
|
|
}
|
|
|
.selection-rowno-modal {
|
|
|
.selection-rowno-modal-body {
|
|
|
+ font-size: 0.5rem;
|
|
|
+ height: 4.5rem;
|
|
|
.selection-rowno-modal-body-block {
|
|
|
margin: 0.5rem 0;
|
|
|
text-align: center;
|
|
@@ -1664,9 +1729,21 @@ export default {
|
|
|
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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}}
|
|
|
.icon-wrapper {
|
|
|
position: relative;
|
|
|
font-size: 0.25rem;
|
|
@@ -1722,4 +1799,22 @@ export default {
|
|
|
background-color: #2d8cf0;
|
|
|
}
|
|
|
}
|
|
|
+.printRow{
|
|
|
+ display: none;
|
|
|
+}
|
|
|
+@media print {
|
|
|
+ .printRow{
|
|
|
+ display: block;
|
|
|
+ width: 100%;
|
|
|
+ margin-top: 10mm;
|
|
|
+ .printRow_content{
|
|
|
+ page-break-after: always;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ @page{
|
|
|
+
|
|
|
+margin:10mm 1mm
|
|
|
+
|
|
|
+}
|
|
|
+ }
|
|
|
</style>
|