|
@@ -14,18 +14,18 @@
|
|
|
size="small">保存数据
|
|
|
</el-button>
|
|
|
<el-dropdown style="padding: 0 6px;line-height: 0">
|
|
|
- <el-button type="primary" size="small" :loading="buttonLoading" :disabled="!form.id">
|
|
|
- 审核处理<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ <el-button type="primary" size="small" :loading="subLoading" :disabled="!form.id">
|
|
|
+ 审批处理<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">审核数据</el-dropdown-item>
|
|
|
- <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审核进度
|
|
|
+ <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">审批数据</el-dropdown-item>
|
|
|
+ <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审批进度
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="customer-main">
|
|
|
+ <div class="customer-main" v-loading="subLoading">
|
|
|
<trade-card title="基础信息">
|
|
|
<avue-form ref="form" class="trading-form" v-model="form" :option="option">
|
|
|
<template slot="purchaserId">
|
|
@@ -112,6 +112,7 @@ 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 { getCurrentDate } from "@/util/date";
|
|
|
export default {
|
|
|
name: "detailsPageEdit",
|
|
|
data() {
|
|
@@ -197,7 +198,7 @@ export default {
|
|
|
span: 6
|
|
|
},
|
|
|
{
|
|
|
- label: "审核状态",
|
|
|
+ label: "审批状态",
|
|
|
prop: "status",
|
|
|
type: "select",
|
|
|
dataType: 'number',
|
|
@@ -382,6 +383,7 @@ export default {
|
|
|
delete res.data.data.createUserName
|
|
|
delete res.data.data.sysNo
|
|
|
delete res.data.data.status
|
|
|
+ res.data.data.stockTime=getCurrentDate()
|
|
|
res.data.data.itemsVOList.forEach(e => {
|
|
|
delete e.id
|
|
|
})
|
|
@@ -400,6 +402,11 @@ export default {
|
|
|
this.$refs["form"].validate((valid, done) => {
|
|
|
done();
|
|
|
if (valid) {
|
|
|
+ for (let i = 0; i < this.itemsVOList.length; i++) {
|
|
|
+ if (this.itemsVOList[i].$cellEdit) {
|
|
|
+ return this.$message.error('请保存明细')
|
|
|
+ }
|
|
|
+ }
|
|
|
let orderFeesList = this.$refs.feeInfo.submitData();
|
|
|
this.subLoading = true;
|
|
|
let data = {
|
|
@@ -436,59 +443,122 @@ export default {
|
|
|
},
|
|
|
//请核
|
|
|
auditCheck() {
|
|
|
- financingExcess({ id: this.form.purchaserId }).then(res => {
|
|
|
- if (res.data.data == '操作成功') {
|
|
|
- this.$confirm("确定审核此订单?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- this.buttonLoading = true
|
|
|
- const data = {
|
|
|
- id: this.form.id,
|
|
|
- checkType: 'CK',
|
|
|
- url: '/salesManagement/outStock/index',
|
|
|
- pageStatus: "this.$store.getters.entranceXsStatus",
|
|
|
- pageLabel: "出库管理",
|
|
|
- checkFlag: 2,
|
|
|
+ let orderFeesList = this.$refs.feeInfo.submitData();
|
|
|
+ if (orderFeesList.length == 0) {
|
|
|
+ this.$confirm("没有应收费用,是否继续提交?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ financingExcess({ id: this.form.purchaserId }).then(res => {
|
|
|
+ if (res.data.data == '操作成功') {
|
|
|
+ this.$confirm("确定审批此订单?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.buttonLoading = true
|
|
|
+ const data = {
|
|
|
+ id: this.form.id,
|
|
|
+ checkType: 'CK',
|
|
|
+ url: '/salesManagement/outStock/index',
|
|
|
+ pageStatus: "this.$store.getters.entranceXsStatus",
|
|
|
+ pageLabel: "出库管理",
|
|
|
+ checkFlag: 2,
|
|
|
+ }
|
|
|
+ checkWarehousing(data).then(res => {
|
|
|
+ if (res.data.success) {
|
|
|
+ this.$message.success("操作成功!")
|
|
|
+ this.viewDisabled = true
|
|
|
+ this.approverDisabled = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).finally(() => {
|
|
|
+ this.buttonLoading = false
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$confirm("此订单余额不足,是否继续确认提交审批?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.buttonLoading = true
|
|
|
+ const data = {
|
|
|
+ id: this.form.id,
|
|
|
+ checkType: 'CK',
|
|
|
+ url: '/salesManagement/outStock/index',
|
|
|
+ pageStatus: "this.$store.getters.entranceXsStatus",
|
|
|
+ pageLabel: "出库管理",
|
|
|
+ checkFlag: 2,
|
|
|
+ }
|
|
|
+ checkWarehousing(data).then(res => {
|
|
|
+ if (res.data.success) {
|
|
|
+ this.$message.success("操作成功!")
|
|
|
+ this.viewDisabled = true
|
|
|
+ this.approverDisabled = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).finally(() => {
|
|
|
+ this.buttonLoading = false
|
|
|
+ })
|
|
|
}
|
|
|
- checkWarehousing(data).then(res => {
|
|
|
- if (res.data.success) {
|
|
|
- this.$message.success("操作成功!")
|
|
|
- this.viewDisabled = true
|
|
|
- this.approverDisabled = true
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ financingExcess({ id: this.form.purchaserId }).then(res => {
|
|
|
+ if (res.data.data == '操作成功') {
|
|
|
+ this.$confirm("确定审批此订单?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.buttonLoading = true
|
|
|
+ const data = {
|
|
|
+ id: this.form.id,
|
|
|
+ checkType: 'CK',
|
|
|
+ url: '/salesManagement/outStock/index',
|
|
|
+ pageStatus: "this.$store.getters.entranceXsStatus",
|
|
|
+ pageLabel: "出库管理",
|
|
|
+ checkFlag: 2,
|
|
|
}
|
|
|
+ checkWarehousing(data).then(res => {
|
|
|
+ if (res.data.success) {
|
|
|
+ this.$message.success("操作成功!")
|
|
|
+ this.viewDisabled = true
|
|
|
+ this.approverDisabled = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).finally(() => {
|
|
|
+ this.buttonLoading = false
|
|
|
})
|
|
|
- }).finally(() => {
|
|
|
- this.buttonLoading = false
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.$confirm("此订单余额不足,是否继续确认提交审核?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- this.buttonLoading = true
|
|
|
- const data = {
|
|
|
- id: this.form.id,
|
|
|
- checkType: 'CK',
|
|
|
- url: '/salesManagement/outStock/index',
|
|
|
- pageStatus: "this.$store.getters.entranceXsStatus",
|
|
|
- pageLabel: "出库管理",
|
|
|
- checkFlag: 2,
|
|
|
- }
|
|
|
- checkWarehousing(data).then(res => {
|
|
|
- if (res.data.success) {
|
|
|
- this.$message.success("操作成功!")
|
|
|
- this.viewDisabled = true
|
|
|
- this.approverDisabled = true
|
|
|
+ } else {
|
|
|
+ this.$confirm("此订单余额不足,是否继续确认提交审批?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.buttonLoading = true
|
|
|
+ const data = {
|
|
|
+ id: this.form.id,
|
|
|
+ checkType: 'CK',
|
|
|
+ url: '/salesManagement/outStock/index',
|
|
|
+ pageStatus: "this.$store.getters.entranceXsStatus",
|
|
|
+ pageLabel: "出库管理",
|
|
|
+ checkFlag: 2,
|
|
|
}
|
|
|
+ checkWarehousing(data).then(res => {
|
|
|
+ if (res.data.success) {
|
|
|
+ this.$message.success("操作成功!")
|
|
|
+ this.viewDisabled = true
|
|
|
+ this.approverDisabled = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).finally(() => {
|
|
|
+ this.buttonLoading = false
|
|
|
})
|
|
|
- }).finally(() => {
|
|
|
- this.buttonLoading = false
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
getTemplate() {
|
|
|
window.open(`/api/trade-purchase/woodHarvestingCloud/export-template?${this.website.tokenHeader}=${getToken()}`)
|