|
@@ -7,6 +7,8 @@
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div class="add-customer-btn">
|
|
|
+ <el-button type="info" @click="getData" size="small">刷新资料
|
|
|
+ </el-button>
|
|
|
<el-button type="primary" size="small" :disabled="form.status>0" v-if="detailData.status == 1"
|
|
|
class="el-button--small-yh " @click.stop="openEdit">编辑
|
|
|
</el-button>
|
|
@@ -19,8 +21,11 @@
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">提交审核</el-dropdown-item>
|
|
|
+ <el-dropdown-item v-if="roleName=='admin'" :disabled="form.status<1" @click.native="revokeCheck">撤销审核</el-dropdown-item>
|
|
|
<el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审核进度
|
|
|
</el-dropdown-item>
|
|
|
+ <el-dropdown-item v-if="$route.query.check" :disabled="form.status==3" @click.native="check">审批数据
|
|
|
+ </el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</div>
|
|
@@ -29,11 +34,11 @@
|
|
|
<trade-card title="基础信息">
|
|
|
<avue-form ref="form" class="trading-form" v-model="form" :option="option">
|
|
|
<template slot="purchaserId">
|
|
|
- <crop-select v-model="form.purchaserId" corpType="KH" :refresh="false" @getCorpData="getKHData"
|
|
|
- :disabled="detailData.status == 1"></crop-select>
|
|
|
+ <crop-select ref="purchaser" v-model="form.purchaserId" corpType="KH" :refresh="false"
|
|
|
+ @getCorpData="getKHData" :disabled="detailData.status == 1"></crop-select>
|
|
|
</template>
|
|
|
<template slot="corpId">
|
|
|
- <crop-select v-model="form.corpId" corpType="GYS" :refresh="false" @getCorpData="getGYSData"
|
|
|
+ <crop-select ref="corpId" v-model="form.corpId" corpType="GYS" :refresh="false" @getCorpData="getGYSData"
|
|
|
:disabled="detailData.status == 1"></crop-select>
|
|
|
</template>
|
|
|
<template slot="storageId">
|
|
@@ -42,6 +47,15 @@
|
|
|
clearable @change="storagetreeChange">
|
|
|
</el-cascader>
|
|
|
</template>
|
|
|
+ <template slot-scope="{column}" slot="purchaserIdLabel">
|
|
|
+ <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{column}" slot="corpIdLabel">
|
|
|
+ <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{column}" slot="storageIdLabel">
|
|
|
+ <span style="color: #409EFF;cursor: pointer" @click.stop="addData('storage')">{{column.label}}</span>
|
|
|
+ </template>
|
|
|
</avue-form>
|
|
|
</trade-card>
|
|
|
<trade-card title="出库明细">
|
|
@@ -62,6 +76,12 @@
|
|
|
<el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
|
|
|
:disabled="detailData.status == 1" circle></el-button>
|
|
|
</template>
|
|
|
+ <template slot="storageIdHeader" slot-scope="{column}">
|
|
|
+ <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="itemIdHeader" slot-scope="{column}">
|
|
|
+ <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
|
|
|
+ </template>
|
|
|
<template slot="oneCode" slot-scope="{ row, index }">
|
|
|
<el-popover placement="right" width="160" trigger="click">
|
|
|
<el-image style="width: 160px; height: 80px" :src="row.oneCode" :fit="fit"></el-image>
|
|
@@ -105,7 +125,7 @@
|
|
|
</trade-card>
|
|
|
<fee-info ref="feeInfo" :orderFeesList="orderFeesList" :disabled="detailData.status == 1"
|
|
|
feeUrl="/blade-purchase-sales/entranceOrder/removeOrderFees" :optionType="'CMY'" :itemType="'D'"
|
|
|
- :inCropId="true" :tabShow="2" @beforeFinance="beforeFinance" :delType="2" :billingShow="false" />
|
|
|
+ :inCropId="true" @beforeFinance="beforeFinance" :delType="2" :billingShow="false" />
|
|
|
<!-- <upload-file ref="uploadFile" title="合同附件" :disabled="detailData.status == 1" :orderFilesList="orderFilesList"
|
|
|
delUrl="" /> -->
|
|
|
<containerTitle title="上传附件"></containerTitle>
|
|
@@ -117,23 +137,31 @@
|
|
|
<check-schedule :checkId="form.id" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun">
|
|
|
</check-schedule>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
|
|
|
+ :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
|
|
|
+ <check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun">
|
|
|
+ </check>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods, financingExcess } from "@/api/purchasingManagement/inStock";
|
|
|
+import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods, financingExcess, revokeWarehousing } from "@/api/purchasingManagement/inStock";
|
|
|
import tableOption from "./config/customerContact.json";
|
|
|
import feeInfo from "@/components/fee-info/main";
|
|
|
import checkSchedule from "../../../components/check/checkSchedule";
|
|
|
import uploadFile from "@/components/upload-file/main";
|
|
|
import { getToken } from "@/util/auth";
|
|
|
-import { contrastObj, contrastList } from "@/util/contrastData";
|
|
|
+import { contrastObj, contrastList, contrastList2 } from "@/util/contrastData";
|
|
|
import { getCurrentDate } from "@/util/date";
|
|
|
+import check from "@/components/check/check";
|
|
|
export default {
|
|
|
name: "detailsPageEdit",
|
|
|
data() {
|
|
|
return {
|
|
|
+ checkData: {},
|
|
|
+ checkDialog: false,
|
|
|
form: {},
|
|
|
checkScheduleDialog: false,
|
|
|
tableOption: {},
|
|
@@ -247,6 +275,7 @@ export default {
|
|
|
olditemsVOList: [],
|
|
|
oldorderFeesList: [],
|
|
|
oldorderFilesList: [],
|
|
|
+ roleName:localStorage.getItem("roleName")
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
@@ -257,7 +286,8 @@ export default {
|
|
|
components: {
|
|
|
feeInfo,
|
|
|
checkSchedule,
|
|
|
- uploadFile
|
|
|
+ uploadFile,
|
|
|
+ check
|
|
|
},
|
|
|
async created() {
|
|
|
if (this.detailData.status == 1) {
|
|
@@ -287,6 +317,26 @@ export default {
|
|
|
this.getAllWorkDicts()
|
|
|
},
|
|
|
methods: {
|
|
|
+ check() {
|
|
|
+ this.checkData = this.$route.query.check
|
|
|
+ this.checkDialog = true
|
|
|
+ },
|
|
|
+ //关闭审核
|
|
|
+ choceCheckFun() {
|
|
|
+ this.checkDialog = false;
|
|
|
+ },
|
|
|
+ getData() {
|
|
|
+ getAllgoods().then(res => {
|
|
|
+ this.findObject(this.tableOption.column, "itemId").dicData =
|
|
|
+ res.data.data;
|
|
|
+ })
|
|
|
+ getStoragetree().then(res => {
|
|
|
+ this.storagetreeList = res.data.data;
|
|
|
+ })
|
|
|
+ this.getStorage()
|
|
|
+ this.$refs.purchaser.refreshData()
|
|
|
+ this.$refs.corpId.refreshData()
|
|
|
+ },
|
|
|
getAllWorkDicts() {
|
|
|
getAllgoods().then(res => {
|
|
|
this.findObject(this.tableOption.column, "itemId").dicData =
|
|
@@ -401,9 +451,9 @@ export default {
|
|
|
delete e.id
|
|
|
})
|
|
|
this.form = res.data.data;
|
|
|
- this.itemsVOList = res.data.data.itemsVOList.filter(item => item.isIssue == 0);
|
|
|
+ this.itemsVOList = res.data.data.itemsVOList.filter(item => item.isIssue == 1);
|
|
|
this.oldform = this.deepClone(res.data.data);
|
|
|
- this.olditemsVOList = this.deepClone(res.data.data.itemsVOList.filter(item => item.isIssue == 0));
|
|
|
+ this.olditemsVOList = this.deepClone(res.data.data.itemsVOList.filter(item => item.isIssue == 1));
|
|
|
this.getStorage()
|
|
|
})
|
|
|
.finally(() => {
|
|
@@ -470,7 +520,7 @@ export default {
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
- this.buttonLoading = true
|
|
|
+ this.subLoading = true
|
|
|
const data = {
|
|
|
id: this.form.id,
|
|
|
checkType: 'CK',
|
|
@@ -485,9 +535,10 @@ export default {
|
|
|
this.viewDisabled = true
|
|
|
this.approverDisabled = true
|
|
|
}
|
|
|
+ }).finally(() => {
|
|
|
+ this.subLoading = false
|
|
|
+ this.getDetail(this.form.id)
|
|
|
})
|
|
|
- }).finally(() => {
|
|
|
- this.buttonLoading = false
|
|
|
})
|
|
|
} else {
|
|
|
this.$confirm("此订单余额不足,是否继续确认提交审核?", {
|
|
@@ -495,7 +546,7 @@ export default {
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
- this.buttonLoading = true
|
|
|
+ this.subLoading = true
|
|
|
const data = {
|
|
|
id: this.form.id,
|
|
|
checkType: 'CK',
|
|
@@ -510,9 +561,10 @@ export default {
|
|
|
this.viewDisabled = true
|
|
|
this.approverDisabled = true
|
|
|
}
|
|
|
+ }).finally(() => {
|
|
|
+ this.subLoading = false
|
|
|
+ this.getDetail(this.form.id)
|
|
|
})
|
|
|
- }).finally(() => {
|
|
|
- this.buttonLoading = false
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -525,7 +577,7 @@ export default {
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
- this.buttonLoading = true
|
|
|
+ this.subLoading = true
|
|
|
const data = {
|
|
|
id: this.form.id,
|
|
|
checkType: 'CK',
|
|
@@ -542,7 +594,8 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}).finally(() => {
|
|
|
- this.buttonLoading = false
|
|
|
+ this.subLoading = false
|
|
|
+ this.getDetail(this.form.id)
|
|
|
})
|
|
|
} else {
|
|
|
this.$confirm("此订单余额不足,是否继续确认提交审核?", {
|
|
@@ -550,7 +603,7 @@ export default {
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
- this.buttonLoading = true
|
|
|
+ this.subLoading = true
|
|
|
const data = {
|
|
|
id: this.form.id,
|
|
|
checkType: 'CK',
|
|
@@ -565,14 +618,40 @@ export default {
|
|
|
this.viewDisabled = true
|
|
|
this.approverDisabled = true
|
|
|
}
|
|
|
+ }).finally(() => {
|
|
|
+ this.subLoading = false
|
|
|
+ this.getDetail(this.form.id)
|
|
|
})
|
|
|
- }).finally(() => {
|
|
|
- this.buttonLoading = false
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ revokeCheck() {
|
|
|
+ this.$confirm("确定撤销审核此订单?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ let orderFeesList = this.$refs.feeInfo.submitData();
|
|
|
+ this.subLoading = true;
|
|
|
+ let data = {
|
|
|
+ ...this.form,
|
|
|
+ billType: 'CK',
|
|
|
+ itemsVOList: this.itemsVOList,
|
|
|
+ orderFeesList: orderFeesList,
|
|
|
+ orderFilesList: this.orderFilesList
|
|
|
+ };
|
|
|
+ revokeWarehousing(data).then(res => {
|
|
|
+ if (res.data.success) {
|
|
|
+ this.$message.success("操作成功!")
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ this.subLoading = false
|
|
|
+ this.getDetail(this.form.id)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
getTemplate() {
|
|
|
window.open(`/api/trade-purchase/woodHarvestingCloud/export-template?${this.website.tokenHeader}=${getToken()}`)
|
|
|
},
|
|
@@ -582,7 +661,7 @@ export default {
|
|
|
if (
|
|
|
contrastObj(this.form, this.oldform) ||
|
|
|
contrastList(this.itemsVOList, this.olditemsVOList) ||
|
|
|
- contrastList(orderFeesList, this.oldorderFeesList) ||
|
|
|
+ contrastList2(orderFeesList, this.oldorderFeesList) ||
|
|
|
contrastList(this.orderFilesList, this.oldorderFilesList)
|
|
|
) {
|
|
|
this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
|
|
@@ -624,6 +703,19 @@ export default {
|
|
|
moveDown(row, index) {
|
|
|
this.itemsVOList[index] = this.itemsVOList.splice(index + 1, 1, row)[0]
|
|
|
},
|
|
|
+ addData(row) {
|
|
|
+ if (row == 'purchaserId') {
|
|
|
+ this.$router.push(`/basicData/customerInformation/index`);
|
|
|
+ } else if (row == 'corpId') {
|
|
|
+ this.$router.push(`/basicData/customerManagement/supplierMaterial/index`);
|
|
|
+ } else if (row == 'storage') {
|
|
|
+ this.$router.push(`/basicData/basicStorageType/index`);
|
|
|
+ } else if (row == 'storageId') {
|
|
|
+ this.$router.push(`/basicData/basicStorageDesc/index`);
|
|
|
+ } else if (row == 'itemId') {
|
|
|
+ this.$router.push(`/basicData/commodityType/index`);
|
|
|
+ }
|
|
|
+ },
|
|
|
async saveColumn() {
|
|
|
const inSave = await this.saveColumnData(
|
|
|
this.getColumnName(191),
|
|
@@ -675,10 +767,12 @@ export default {
|
|
|
::v-deep .select-component {
|
|
|
display: flex !important;
|
|
|
}
|
|
|
+
|
|
|
::v-deep .el-table .cell {
|
|
|
- padding: 0 2px !important;
|
|
|
+ padding: 0 2px !important;
|
|
|
}
|
|
|
+
|
|
|
::v-deep .avue-crud .el-table .el-form-item__label {
|
|
|
- left: -1px;
|
|
|
+ left: -1px;
|
|
|
}
|
|
|
</style>
|