diff --git a/build/cp.js b/build/cp.js new file mode 100644 index 0000000..46a7902 --- /dev/null +++ b/build/cp.js @@ -0,0 +1,109 @@ +var fs = require('fs'); +var readline = require('readline'); +var os = require('os'); +var path = require('path'); + +// Node.js readline 逐行读取、写入文件内容的示例 +// https://www.jb51.net/article/135706.htm +// nodejs读取文件、按行读取 +// https://blog.csdn.net/weixin_42171955/article/details/100156212 + +var strInputFileName = '../dist/index.html'; +var strOutputFileName = 'E:\\code\\lou\\application\\admin\\view\\order_main\\add.html'; +var strOutputFileName2 = 'E:\\code\\lou\\application\\admin\\view\\order_main\\edit.html'; + +var fRead = fs.createReadStream(strInputFileName); +var fWrite = fs.createWriteStream(strOutputFileName); +var fWrite2 = fs.createWriteStream(strOutputFileName2); + +fRead.on('end', () => { + console.log('end'); +}); + +var objReadline = readline.createInterface({ + input: fRead, + output: fWrite, + terminal: false +}); +objReadline.on('line', (strLine) => { + let strTemp = `${strLine}`; + let strTemp2 = `${strLine}`; + fWrite.write(strTemp); + fWrite2.write(strTemp2); +}); + + +objReadline.on('close', () => { + console.log('readline close...'); +}); +function removeDir(dir) { + let files = fs.readdirSync(dir) + for(var i=0;i - {{ dataObj.room_memo }} + @@ -181,7 +181,7 @@ - {{ dataObj.plan_mome }} + @@ -337,7 +337,7 @@ - {{ dataObj.room_memo }} + @@ -354,7 +354,7 @@ - {{ dataObj.plan_mome }} + @@ -365,270 +365,269 @@ diff --git a/src/components/hotelother.vue b/src/components/hotelother.vue index 14b6394..457c341 100644 --- a/src/components/hotelother.vue +++ b/src/components/hotelother.vue @@ -28,7 +28,7 @@ @@ -103,7 +103,8 @@ prop="supplier_id" label="供应商"> - + - {{dataObjTemp.item_memo}} + @@ -171,7 +172,7 @@ @@ -191,8 +192,8 @@ - + @@ -245,7 +246,8 @@ prop="supplier_id" label="供应商"> - + - {{dataObjTemp.item_memo}} + @@ -310,7 +312,14 @@ export default { name: "hotelother", - props: {supplier_idList: Array, cf_itemOpt: Array, userOpt: Array, type: String, saleCount: Number, dataObj: Object}, + props: { + supplier_idList: Array, + cf_itemOpt: Array, + userOpt: Array, + type: String, + saleCount: Number, + dataObj: Object + }, data() { return { dataObjTemp: this.$lo.cloneDeep(this.dataObj), @@ -357,7 +366,7 @@ price: '', cost: '', count: '', - customer_comments: '', + customer_comments: '', supplier_id: '' }) this.dataObj.purchasePriceList = purchasePriceList; @@ -369,7 +378,7 @@ let data = this.cf_itemOpt.find((item) => { return item.id == id }) - console.log(data) + console.log(data) data.item_name = data.name this.dataObjTemp = Object.assign(this.dataObjTemp, data); }, @@ -385,7 +394,8 @@ this.dataObj.purchasePriceList.forEach((item) => { this.$set(item, 'supplier_id', value) }) - this.$set(this.dataObj, 'supplier_id', value) + this.dataObj.supplier_id = value + this.$set(this.dataObj, 'supplier_id', value) } }, changeNote(value) { @@ -393,7 +403,8 @@ this.dataObj.purchasePriceList.forEach((item) => { this.$set(item, 'customer_comments', value) }) - this.$set(this.dataObj, 'customer_comments', value) + this.dataObj.customer_comments = value + this.$set(this.dataObj, 'customer_comments', value) } }, arraySpanMethod({row, column, rowIndex, columnIndex}) {