|
@@ -149,16 +149,8 @@
|
|
|
style="padding: 0 60px;margin-left: 15px">提交监盘</a-button>
|
|
|
</div>
|
|
|
<!-- 盘点打印确认 -->
|
|
|
- <printModal
|
|
|
- :openModal="visiblePrint"
|
|
|
- :content="printContent"
|
|
|
- :okText="printOkText"
|
|
|
- cancelText="打印预览"
|
|
|
- :isCancel="isPrintCancel"
|
|
|
- :spinning="spinningPrint"
|
|
|
- @close="visiblePrint=false"
|
|
|
- @ok="printOkText == '好的' ? visiblePrint=false : handlePrint('print')"
|
|
|
- @fail="handlePrint('preview')" />
|
|
|
+ <print-modal :openModal="visiblePrint" nowType="CHECK_WAREHOUSE_SUPERVISE" :itemData="detail" @ok="handlePrint" @close="visiblePrint=false" />
|
|
|
+ <div id="print"></div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -166,8 +158,8 @@
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import tablePagination from '@/views/common/tablePagination.vue'
|
|
|
-import printModal from '@/views/common/auditModal.vue'
|
|
|
-import { printFun, exportExcel } from '@/libs/JGPrint.js'
|
|
|
+import printModal from '../makeInventory/printModal.vue'
|
|
|
+import { printFun } from '@/libs/JGPrint.js'
|
|
|
import { checkWarehouseDetail, checkWarehouseDetailList, checkWarehouseDetailCount, checkWarehouseDetailPrint, checkWarehousePrintCheck, checkWarehouseDetailSave, checkWarehouseSupervise, checkWarehouseReCheck } from '@/api/checkWarehouse'
|
|
|
export default {
|
|
|
name: 'SupervisionDiskCheck',
|
|
@@ -207,10 +199,7 @@ export default {
|
|
|
foldState: false, // 是否折叠列表
|
|
|
productTotal: null, // 合计
|
|
|
spinningPrint: false,
|
|
|
- visiblePrint: false,
|
|
|
- printContent: '',
|
|
|
- printOkText: '',
|
|
|
- isPrintCancel: false
|
|
|
+ visiblePrint: false
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -396,24 +385,23 @@ export default {
|
|
|
this.spinning = false
|
|
|
if (res.status == 200) {
|
|
|
if (res.data && res.data == 0) { // 无产品
|
|
|
- this.printContent = '打印模板内容是所有有盈亏的产品,此单盘点人盘点无盈亏记录,无法打印'
|
|
|
- this.printOkText = '好的'
|
|
|
- this.isPrintCancel = false
|
|
|
- this.visiblePrint = true
|
|
|
+ this.$info({
|
|
|
+ title: '提示',
|
|
|
+ content: '打印模板内容是所有有盈亏的产品,此单盘点人盘点无盈亏记录,无法打印',
|
|
|
+ centered: true
|
|
|
+ })
|
|
|
} else { // 有产品
|
|
|
- this.printContent = '打印范围 —— 有盈亏(批次合并)'
|
|
|
- this.printOkText = '立即打印'
|
|
|
- this.isPrintCancel = true
|
|
|
+ this.detail.printContent = '打印范围 —— 有盈亏(批次合并)'
|
|
|
this.visiblePrint = true
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
// 打印预览/快捷打印
|
|
|
- handlePrint (type) {
|
|
|
+ handlePrint (objs, type) {
|
|
|
const _this = this
|
|
|
_this.spinningPrint = true
|
|
|
- const params = { checkWarehouseSn: this.$route.params.sn, type: 'CHECK_WAREHOUSE_SUPERVISE' }
|
|
|
+ const params = { checkWarehouseSn: this.$route.params.sn, ...objs }
|
|
|
printFun(checkWarehouseDetailPrint, params, type, '盘点单', () => { _this.spinningPrint = false })
|
|
|
}
|
|
|
},
|