|
@@ -25,7 +25,7 @@
|
|
|
icon="el-icon-folder-add"
|
|
|
@click="confirmReceipt"
|
|
|
:loading="btnLoading"
|
|
|
- :disabled="disabled"
|
|
|
+ :disabled="disabled || !form.id"
|
|
|
>确认入库</el-button>
|
|
|
<el-button
|
|
|
v-else
|
|
@@ -42,6 +42,7 @@
|
|
|
size="small"
|
|
|
@click="copyDoc"
|
|
|
:loading="btnLoading"
|
|
|
+ v-if="false"
|
|
|
>复制单据</el-button>
|
|
|
<el-button
|
|
|
type="primary"
|
|
@@ -114,6 +115,7 @@
|
|
|
type="info"
|
|
|
icon="el-icon-printer"
|
|
|
size="small"
|
|
|
+ @click="openReport"
|
|
|
>报表打印</el-button>
|
|
|
</template>
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
@@ -346,14 +348,22 @@
|
|
|
>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <!-- 报表-->
|
|
|
+ <report-dialog
|
|
|
+ :switchDialog="switchDialog"
|
|
|
+ :reportId="form.id"
|
|
|
+ reportName="办公用品-入库"
|
|
|
+ @onClose="onClose()"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import tableOption from "./config/customerContact.json";
|
|
|
import goodsOption from "./config/commodity.json";
|
|
|
-import {getDeptLazyTree,
|
|
|
- getGoods,} from "@/api/basicData/customerInquiry";
|
|
|
+// import {getDeptLazyTree,
|
|
|
+// getGoods,} from "@/api/basicData/customerInquiry";
|
|
|
+import {getDeptLazyTree, getList as getGoods} from "@/api/basicData/commodityType";
|
|
|
import {
|
|
|
isDiscount,
|
|
|
isPercentage,
|
|
@@ -371,6 +381,7 @@ import {dataDetail,
|
|
|
cancelReceipt,} from "@/api/officeSupplies/warehousing";
|
|
|
import { contrastObj, contrastList } from "@/util/contrastData";
|
|
|
import {customerList as storageList} from "@/api/basicData/basicStorageDesc";
|
|
|
+import reportDialog from "@/components/report-dialog/main";
|
|
|
|
|
|
export default {
|
|
|
name: "detail",
|
|
@@ -379,6 +390,9 @@ export default {
|
|
|
type: Object
|
|
|
}
|
|
|
},
|
|
|
+ components: {
|
|
|
+ reportDialog
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
disabled: false,
|
|
@@ -537,9 +551,15 @@ export default {
|
|
|
storageList().then(res => {
|
|
|
this.storageOptions = res.data.data.records;
|
|
|
})
|
|
|
+ getUserInfo().then(res => {
|
|
|
+ this.$set(this.form, 'stockUser', res.data.data.id);
|
|
|
+ this.$set(this.form, 'stockDept', res.data.data.deptId);
|
|
|
+ })
|
|
|
+ this.$set(this.form, 'stockTime', getCurrentDate()); // 默认当前日期
|
|
|
this.getWorkDicts('unit').then(res => {
|
|
|
this.unitOption = res.data.data;
|
|
|
})
|
|
|
+ this.$set(this.form, 'status', 3);
|
|
|
|
|
|
if (this.detailData.query) {
|
|
|
this.disabled = true;
|
|
@@ -599,7 +619,7 @@ export default {
|
|
|
openEdit() {
|
|
|
this.disabled = false;
|
|
|
this.option.column.map(e => {
|
|
|
- if (this.checkDisabled) {
|
|
|
+ if (this.confirmDisabled) {
|
|
|
this.$set(e, 'disabled', true)
|
|
|
} else {
|
|
|
if (e.prop != 'sysNo') {
|
|
@@ -765,7 +785,7 @@ export default {
|
|
|
onLoad(page, params = {}) {
|
|
|
let obj = this.deepClone(Object.assign(params, this.search));
|
|
|
this.loading = true;
|
|
|
- getGoods(page.currentPage, page.pageSize, this.treeDeptId, obj)
|
|
|
+ getGoods(page.currentPage, page.pageSize, obj, this.treeDeptId)
|
|
|
.then(res => {
|
|
|
const data = res.data.data;
|
|
|
this.page.total = data.total;
|
|
@@ -942,6 +962,14 @@ export default {
|
|
|
storageChange(row) {
|
|
|
this.$set(row, 'storageName', this.storageOptions.find(item => item.id == row.storageId).cname);
|
|
|
},
|
|
|
+ // 报表
|
|
|
+ openReport() {
|
|
|
+ this.switchDialog =! this.switchDialog;
|
|
|
+ },
|
|
|
+ // 报表关闭
|
|
|
+ onClose(val) {
|
|
|
+ this.switchDialog = val;
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|