diff --git a/src/api/production/generateReport.js b/src/api/production/generateReport.js
index f22fe6b..ccf374c 100644
--- a/src/api/production/generateReport.js
+++ b/src/api/production/generateReport.js
@@ -15,3 +15,5 @@ export const saveGenerateReportForSchedule = data => createAPI(`dailyPlan/saveGe
export const cancelJob = data => createAPI(`dailyPlan/cancelJob`, 'post', data);
export const searchReportedQty= data => createAPI(`dailyPlan/searchReportedQty`, 'post', data);
+
+export const getStockPrint= data => createAPI(`dailyPlan/getStockPrint`, 'post', data);
diff --git a/src/main.js b/src/main.js
index f716a9c..5ebe4ac 100644
--- a/src/main.js
+++ b/src/main.js
@@ -17,7 +17,7 @@ import i18n from '@/i18n/i18n'
import './directives'
import decimalUtil from '@/utils/decimalUtil'
import dayjs from 'dayjs';
-
+import getLodop from '@/utils/LodopFuncs.js'
Vue.component('downloadExcel', JsonExcel)
@@ -35,7 +35,7 @@ Vue.prototype.$http = httpRequest // ajax请求方法
Vue.prototype.isAuth = isAuth // 权限方法
Vue.prototype.decimalUtil = decimalUtil // 计算
Vue.prototype.dayjs = dayjs //时间格式化插件 2021-11-02
-
+Vue.prototype.getLodop = getLodop // 打印
// 保存整站vuex本地储存初始状态
window.SITE_CONFIG['storeState'] = cloneDeep(store.state)
diff --git a/src/views/modules/production/generateReport.vue b/src/views/modules/production/generateReport.vue
index 285f118..f250390 100644
--- a/src/views/modules/production/generateReport.vue
+++ b/src/views/modules/production/generateReport.vue
@@ -623,7 +623,8 @@
this.saveHeaderData.operatorId=currentData.operatorId
this.saveHeaderData.operatorName=currentData.operatorName
this.saveHeaderData.userId=this.$store.state.user.name
- this.saveHeaderData.planFinishTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00')
+
+
this.saveHeaderData.planStartTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00')
searchReportedQty(this.saveHeaderData).then(({data}) => {
this.qty1 = data.row.qtyReported;
@@ -688,8 +689,8 @@
}
this.fileName=this.photoDatas[this.num-1].attaFileNameDb;
this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")";
- // this.photoUrl='http://192.168.2.172/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
- this.photoUrl='http://192.168.1.83/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
+ this.photoUrl='http://192.168.2.172/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
+ // this.photoUrl='http://192.168.1.83/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
})
},
nextPicture(){
@@ -707,8 +708,8 @@
}
this.fileName=this.photoDatas[this.num-1].attaFileNameDb;
this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")";
- // this.photoUrl='http://192.168.2.172/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
- this.photoUrl='http://192.168.1.83/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
+ this.photoUrl='http://192.168.2.172/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
+ // this.photoUrl='http://192.168.1.83/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
},
lastPicture(){
if(this.photoDatas.length==0){
@@ -725,8 +726,8 @@
}
this.fileName=this.photoDatas[this.num-1].attaFileNameDb;
this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")";
- // this.photoUrl='http://192.168.2.172/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
- this.photoUrl='http://192.168.1.83/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
+ this.photoUrl='http://192.168.2.172/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
+ // this.photoUrl='http://192.168.1.83/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
},
},
diff --git a/src/views/modules/production/print_stock_label.js b/src/views/modules/production/print_stock_label.js
new file mode 100644
index 0000000..b2b2d4d
--- /dev/null
+++ b/src/views/modules/production/print_stock_label.js
@@ -0,0 +1,96 @@
+/*调用js打印标签*/
+import getLodop from '@/utils/LodopFuncs.js'
+/*打印材料卷标签*/
+export function printMaterialLabel(printList) {
+ const LODOP = getLodop()
+ if (LODOP) {
+ //LODOP.SET_LICENSES("", "AF8A5800B84BCC5218BCF67B92627BEA", "", "");
+ LODOP.SET_LICENSES("", "AF8A5800B84BCC5218BCF67B92627BEA", "", "");
+ // LODOP.SET_PRINTER_INDEXA("小标签打印机");
+ //循环调用打印机
+ for(let i = 0; i < printList.length; i++){
+ let printData = printList[i];
+ LODOP.NewPage();
+ LODOP.SET_PRINT_PAGESIZE(0,1000,700,"");
+ // LODOP.ADD_PRINT_BARCODE(3,31,86,61,"QRCode",printData.seqNo);
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,"WareHouseId:");
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,printData.wareHouseId);
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,"BatchNo:");
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,printData.batchNo);
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,"LocationId:");
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,printData.locationId);
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,"PartNo:");
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,printData.partNo);
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,"OrderNo:");
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,printData.orderNo);
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,"Qty:");
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,printData.qty);
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,"TransDate:");
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,printData.transDate);
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,"Manufactured by A&M Polymer");
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,"vender Code:");
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,"No.188 Taigu Road,Lili lndustrial Park,Wujiang District,Suzhou,China");
+ // LODOP.ADD_PRINT_TEXT(52,21,72,35,"Phone: 086-0512-63678826 Email: service@husenrubber.com");
+ //
+ //
+
+ LODOP.ADD_PRINT_BARCODE(11,244,208,140,"QRCode","1|RM|batchNo|locationid|80001");
+ LODOP.ADD_PRINT_TEXT(58,8,108,25,"WareHouseId:");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+ LODOP.ADD_PRINT_TEXT(58,110,140,25,printData.wareHouseId);
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+ LODOP.ADD_PRINT_TEXT(111,8,77,24,"BatchNo:");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+ LODOP.ADD_PRINT_TEXT(111,110,140,20,printData.batchNo);
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+ LODOP.ADD_PRINT_TEXT(84,8,98,25,"LocationId:");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+ LODOP.ADD_PRINT_TEXT(84,110,139,25,printData.locationId);
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+ LODOP.ADD_PRINT_TEXT(9,8,72,25,"PartNo:");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+ LODOP.ADD_PRINT_TEXT(9,110,136,25,printData.partNo);
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+ LODOP.ADD_PRINT_TEXT(136,8,82,25,"OrderNo:");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+ LODOP.ADD_PRINT_TEXT(136,110,141,25,printData.orderNo);
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+ LODOP.ADD_PRINT_TEXT(34,8,56,25,"Qty:");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+ LODOP.ADD_PRINT_TEXT(34,110,138,24,printData.qty);
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+ LODOP.ADD_PRINT_TEXT(162,8,92,25,"TransDate:");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+ LODOP.ADD_PRINT_TEXT(162,110,170,25,printData.transDate);
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+ LODOP.ADD_PRINT_TEXT(192,5,256,24,"Manufactured by A&M Polymer");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.ADD_PRINT_TEXT(192,259,109,25,"vender Code:");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.ADD_PRINT_TEXT(210,5,257,35,"No.188 Taigu Road,Lili lndustrial Park,Wujiang District,Suzhou,China");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.ADD_PRINT_TEXT(246,5,407,35,"Phone: 086-0512-63678826 Email: service@husenrubber.com");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
+ LODOP.ADD_PRINT_LINE(186,2,187,374,0,1);
+ }
+ LODOP.PRINT_DESIGN();
+ //LODOP.PREVIEW();
+ // LODOP.PRINT();
+ console.log("操作成功!")
+ }
+}
+
diff --git a/src/views/modules/production/searchDailyPlan.vue b/src/views/modules/production/searchDailyPlan.vue
index ac6d67a..b416688 100644
--- a/src/views/modules/production/searchDailyPlan.vue
+++ b/src/views/modules/production/searchDailyPlan.vue
@@ -136,7 +136,7 @@
} from "@/api/production.js"
export default {
- name: 'searchDailyPlan',
+ name: 'stockPrint',
data () {
return {
// 导出 start
diff --git a/src/views/modules/production/stockPrint.vue b/src/views/modules/production/stockPrint.vue
new file mode 100644
index 0000000..44caac4
--- /dev/null
+++ b/src/views/modules/production/stockPrint.vue
@@ -0,0 +1,273 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 物料编码
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+ 打印标签
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+