|
@@ -50,7 +50,18 @@
|
|
|
<td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.measureUnit || '' }}</td>
|
|
<td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.measureUnit || '' }}</td>
|
|
|
<td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.quantity || '' }}</td>
|
|
<td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.quantity || '' }}</td>
|
|
|
<td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.quantity || '' }}</td>
|
|
<td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.quantity || '' }}</td>
|
|
|
- <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.remark || '' }}</td>
|
|
|
|
|
|
|
+ <td style="border: 1px solid #000; padding: 8px; text-align: center;">
|
|
|
|
|
+ <span v-if="isPrint">{{ item.remark }}</span>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-else
|
|
|
|
|
+ type="textarea"
|
|
|
|
|
+ style="width: 100%; border: none;"
|
|
|
|
|
+ placeholder=""
|
|
|
|
|
+ v-model="item.remark"
|
|
|
|
|
+ class="input-with-select"
|
|
|
|
|
+ autosize
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </td>
|
|
|
<td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.saleOrderNo || '' }}</td>
|
|
<td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.saleOrderNo || '' }}</td>
|
|
|
<td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.produceRoutingName || '' }}</td>
|
|
<td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.produceRoutingName || '' }}</td>
|
|
|
</tr>
|
|
</tr>
|
|
@@ -97,6 +108,7 @@ export default {
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
|
visible: false,
|
|
visible: false,
|
|
|
|
|
+ isPrint: false,
|
|
|
row: {
|
|
row: {
|
|
|
customerName: '',
|
|
customerName: '',
|
|
|
contactPerson: '',
|
|
contactPerson: '',
|
|
@@ -157,7 +169,13 @@ export default {
|
|
|
console.log('detailList', this.detailList)
|
|
console.log('detailList', this.detailList)
|
|
|
},
|
|
},
|
|
|
confirm () {
|
|
confirm () {
|
|
|
- const printSection = document.getElementById('printSection');
|
|
|
|
|
|
|
+ this.isPrint = true;
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.print();
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ print() {
|
|
|
|
|
+ const printSection = document.getElementById('printSection');
|
|
|
// 创建打印任务
|
|
// 创建打印任务
|
|
|
const printWindow = window.open('', '_blank');
|
|
const printWindow = window.open('', '_blank');
|
|
|
printWindow.document.open();
|
|
printWindow.document.open();
|
|
@@ -169,6 +187,20 @@ export default {
|
|
|
printWindow.document.write(printSection.innerHTML);
|
|
printWindow.document.write(printSection.innerHTML);
|
|
|
printWindow.document.write('</body></html>');
|
|
printWindow.document.write('</body></html>');
|
|
|
printWindow.document.close();
|
|
printWindow.document.close();
|
|
|
|
|
+
|
|
|
|
|
+ // 监听打印窗口关闭事件,恢复输入框
|
|
|
|
|
+ printWindow.onbeforeunload = function() {
|
|
|
|
|
+ self.isPrint = false;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ printWindow.onunload = function() {
|
|
|
|
|
+ self.isPrint = false;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ printWindow.onafterprint = function() {
|
|
|
|
|
+ self.isPrint = false;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
printWindow.onload = function () {
|
|
printWindow.onload = function () {
|
|
|
printWindow.print();
|
|
printWindow.print();
|
|
|
};
|
|
};
|