|
@@ -12,6 +12,21 @@
|
|
|
</div>
|
|
|
<div class="add-customer-btn">
|
|
|
<el-button
|
|
|
+ v-if="checker && form.status != 3"
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ class="el-button--small-yh"
|
|
|
+ @click.stop="openCheckDialog">
|
|
|
+ 审批
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="form.status > 0"
|
|
|
+ @click.native="checkScheduleDialog = true,checkId=form.id"
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ class="el-button--small-yh"
|
|
|
+ >审核进度</el-button>
|
|
|
+ <el-button
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
class="el-button--small-yh"
|
|
@@ -20,22 +35,44 @@
|
|
|
>编 辑</el-button>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
+ v-if="!checkDisabled && confirmDisabled"
|
|
|
+ :disabled="!form.id || disabled"
|
|
|
+ size="small"
|
|
|
+ @click="pleaseCheck"
|
|
|
+ :loading="btnLoading"
|
|
|
+ class="el-button--small-yh"
|
|
|
+ >请核</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ v-if="form.status == 1"
|
|
|
+ :disabled="disabled"
|
|
|
+ size="small"
|
|
|
+ @click="repealCancel"
|
|
|
+ :loading="btnLoading"
|
|
|
+ >撤销请核</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
size="small"
|
|
|
style="margin-right: 8px;"
|
|
|
@click="dealerSubmit"
|
|
|
- :disabled="disabled"
|
|
|
+ :disabled="disabled || checkDisabled"
|
|
|
:loading="btnLoading"
|
|
|
v-if="form.id"
|
|
|
>
|
|
|
- {{ form.status == 0? '确认订单': form.status == 3? '撤销订单': '' }}
|
|
|
+ {{ form.confirmStatus == 0? '确认订单': form.confirmStatus == 3? '撤销订单': '' }}
|
|
|
</el-button>
|
|
|
<el-dropdown style="margin-right: 8px;">
|
|
|
<el-button type="warning" size="small">账单处理<i class="el-icon-arrow-down el-icon--right"></i></el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
+<!-- <el-dropdown-item-->
|
|
|
+<!-- @click.native="applySettlement('收费')"-->
|
|
|
+<!-- :disabled="disabled"-->
|
|
|
+<!-- >生成账单-->
|
|
|
+<!-- </el-dropdown-item>-->
|
|
|
<el-dropdown-item
|
|
|
- @click.native="applySettlement('收费')"
|
|
|
- :disabled="disabled"
|
|
|
- >生成账单
|
|
|
+ @click.native="openApplicationDialog"
|
|
|
+ :disabled="!form.id"
|
|
|
+ >查看账单
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
@@ -72,7 +109,7 @@
|
|
|
v-model="form.corpId"
|
|
|
@getCorpData="getCorpData"
|
|
|
corpType="KH"
|
|
|
- :disabled="disabled || confirmDisabled"
|
|
|
+ :disabled="disabled || confirmDisabled || checkDisabled"
|
|
|
/>
|
|
|
</template>
|
|
|
<template slot="belongToCorpId">
|
|
@@ -80,7 +117,7 @@
|
|
|
v-model="form.belongToCorpId"
|
|
|
@getCorpData="getGSData"
|
|
|
corpType="GS"
|
|
|
- :disabled="disabled || confirmDisabled"
|
|
|
+ :disabled="disabled || confirmDisabled || checkDisabled"
|
|
|
/>
|
|
|
</template>
|
|
|
<template slot="storageId">
|
|
@@ -88,7 +125,7 @@
|
|
|
v-model="form.storageId"
|
|
|
@returnBack="storageChange"
|
|
|
:configuration="configurationWarehouse"
|
|
|
- :disabled="disabled || confirmDisabled"/>
|
|
|
+ :disabled="disabled || confirmDisabled || checkDisabled"/>
|
|
|
</template>
|
|
|
<template slot="chargeMember">
|
|
|
<el-select
|
|
@@ -124,7 +161,7 @@
|
|
|
icon="el-icon-circle-plus-outline"
|
|
|
circle
|
|
|
size="mini"
|
|
|
- :disabled="disabled || !form.storageId || confirmDisabled"
|
|
|
+ :disabled="disabled || !form.storageId || confirmDisabled || checkDisabled"
|
|
|
@click="$refs.crud.rowCellAdd()"></el-button>
|
|
|
</template>
|
|
|
<template slot="menuLeft">
|
|
@@ -133,7 +170,7 @@
|
|
|
icon="el-icon-plus"
|
|
|
size="small"
|
|
|
@click.stop="newDetails"
|
|
|
- :disabled="disabled || !form.storageId || confirmDisabled"
|
|
|
+ :disabled="disabled || !form.storageId || confirmDisabled || checkDisabled"
|
|
|
>录入明细</el-button>
|
|
|
<el-button
|
|
|
type="info"
|
|
@@ -150,7 +187,7 @@
|
|
|
<el-upload
|
|
|
:action="baseURL"
|
|
|
:headers="headers"
|
|
|
- :disabled="disabled || confirmDisabled || !form.storageId"
|
|
|
+ :disabled="disabled || confirmDisabled || !form.storageId || checkDisabled"
|
|
|
:on-progress="uploading"
|
|
|
:show-file-list=false
|
|
|
:data="uploadParam"
|
|
@@ -164,7 +201,7 @@
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
icon="el-icon-upload"
|
|
|
- :disabled="disabled || confirmDisabled || !form.storageId"
|
|
|
+ :disabled="disabled || confirmDisabled || !form.storageId || checkDisabled"
|
|
|
>导 入</el-button>
|
|
|
</el-upload>
|
|
|
</template>
|
|
@@ -174,7 +211,7 @@
|
|
|
icon="el-icon-edit"
|
|
|
type="text"
|
|
|
@click="rowCell(row, index)"
|
|
|
- :disabled="disabled || confirmDisabled"
|
|
|
+ :disabled="disabled || confirmDisabled || checkDisabled"
|
|
|
>{{ row.$cellEdit ? "保存" : "修改" }}</el-button
|
|
|
>
|
|
|
<el-button
|
|
@@ -182,7 +219,7 @@
|
|
|
icon="el-icon-delete"
|
|
|
type="text"
|
|
|
@click="rowDel(row, index)"
|
|
|
- :disabled="disabled || confirmDisabled"
|
|
|
+ :disabled="disabled || confirmDisabled || checkDisabled"
|
|
|
>删除</el-button
|
|
|
>
|
|
|
</template>
|
|
@@ -340,7 +377,7 @@
|
|
|
:data="uploadData"
|
|
|
deleteUrl="/api/blade-client/corpsbank/update"
|
|
|
:enumerationValue="84"
|
|
|
- :disabled="disabled || confirmDisabled"
|
|
|
+ :disabled="disabled || confirmDisabled || checkDisabled"
|
|
|
/>
|
|
|
</div>
|
|
|
<!-- 商品弹窗-->
|
|
@@ -462,6 +499,60 @@
|
|
|
:params="historyParams"
|
|
|
@closeDialog="closeDialog"
|
|
|
/>
|
|
|
+ <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>
|
|
|
+ <el-dialog
|
|
|
+ append-to-body
|
|
|
+ title="审批进度"
|
|
|
+ class="el-dialogDeep"
|
|
|
+ :visible.sync="checkScheduleDialog"
|
|
|
+ width="40%"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :destroy-on-close="true"
|
|
|
+ :close-on-press-escape="false"
|
|
|
+ v-dialog-drag
|
|
|
+ >
|
|
|
+ <check-schedule
|
|
|
+ :checkId="checkId"
|
|
|
+ :batchNo="batchNo"
|
|
|
+ @choceScheduleFun="choceScheduleFun"
|
|
|
+ >
|
|
|
+ </check-schedule>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="申请记录"
|
|
|
+ append-to-body
|
|
|
+ class="el-dialogDeep"
|
|
|
+ :visible.sync="applicationDialog"
|
|
|
+ width="60%"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :destroy-on-close="true"
|
|
|
+ :close-on-press-escape="false"
|
|
|
+ v-dialog-drag
|
|
|
+ >
|
|
|
+ <bill-application
|
|
|
+ :billId="form.id"
|
|
|
+ @choceApplication="choceApplication"
|
|
|
+ >
|
|
|
+ </bill-application>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -474,7 +565,11 @@ import {getUserInfo} from "@/api/system/user";
|
|
|
import { gainUser } from "@/api/basicData/customerInquiry";
|
|
|
import {selectGoodsNum} from "@/api/basicData/inventoryAccount"; // 库存查询
|
|
|
import {detail as KHDetail} from "@/api/basicData/customerInformation";
|
|
|
-import {dataDetail, removeGoods, typeSave, getLotNo, dealerSubmit, historyPrice, itemDetail} from "@/api/dealer/sales";
|
|
|
+import {dataDetail, removeGoods,
|
|
|
+ typeSave, getLotNo,
|
|
|
+ dealerSubmit, historyPrice,
|
|
|
+ itemDetail, pleaseCheck,
|
|
|
+ repealCancel,} from "@/api/dealer/sales";
|
|
|
import reportDialog from "@/components/report-dialog/main";
|
|
|
import {
|
|
|
isDiscount,
|
|
@@ -483,6 +578,7 @@ import {
|
|
|
IntegerFormat
|
|
|
} from "@/util/validate";
|
|
|
import financialAccount from "../../../components/finance/financialAccount";
|
|
|
+import check from "@/components/check/check";
|
|
|
import checkSchedule from "@/components/check/checkSchedule";
|
|
|
import billApplication from "@/components/bill/billApplication";
|
|
|
import { customerList as feeList } from "@/api/basicData/basicFeesDesc";
|
|
@@ -504,6 +600,7 @@ export default {
|
|
|
reportDialog,
|
|
|
billApplication,
|
|
|
financialAccount,
|
|
|
+ check,
|
|
|
checkSchedule,
|
|
|
viewHistory,
|
|
|
},
|
|
@@ -604,6 +701,18 @@ export default {
|
|
|
span: 8,
|
|
|
},
|
|
|
{
|
|
|
+ label: "系统编号",
|
|
|
+ prop: "sysNo",
|
|
|
+ span: 8,
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "订单号",
|
|
|
+ prop: "orderNo",
|
|
|
+ span: 8,
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "备注",
|
|
|
prop: "orderRemark",
|
|
|
type: "textarea",
|
|
@@ -745,6 +854,14 @@ export default {
|
|
|
oldForm: {},
|
|
|
oldDataList: [],
|
|
|
oldUploadData: [],
|
|
|
+ checkDisabled: false, // 审核状态
|
|
|
+ checker: false,
|
|
|
+ checkId: '',
|
|
|
+ batchNo:'',
|
|
|
+ checkDialog: false,
|
|
|
+ checkScheduleDialog: false,
|
|
|
+ checkData: {},
|
|
|
+ applicationDialog: false, // 历史账单查看弹窗
|
|
|
}
|
|
|
},
|
|
|
async created() {
|
|
@@ -783,12 +900,17 @@ export default {
|
|
|
});
|
|
|
this.$set(this.form, 'businesDate', getCurrentDate());
|
|
|
this.$set(this.form, 'status', 0);
|
|
|
+ this.$set(this.form , 'confirmStatus', 0);
|
|
|
if (this.detailData.query) {
|
|
|
this.disabled = true;
|
|
|
this.option.column.map(e => {
|
|
|
this.$set(e, 'disabled', true)
|
|
|
})
|
|
|
this.queryData(this.detailData.id);
|
|
|
+ } else if (this.detailData.auditId) {
|
|
|
+ this.checker = true;
|
|
|
+ this.batchNo = this.detailData.check.batchNo
|
|
|
+ this.queryData(this.detailData.id);
|
|
|
} else {
|
|
|
this.dataList = [
|
|
|
{
|
|
@@ -829,7 +951,8 @@ export default {
|
|
|
storageId: this.form.storageId
|
|
|
}
|
|
|
}
|
|
|
- this.confirmDisabled = this.form.status == 3? true: false;
|
|
|
+ this.confirmDisabled = this.form.confirmStatus == 3? true: false;
|
|
|
+ this.checkDisabled = this.form.status > 0? true: false;
|
|
|
if (this.confirmDisabled) {
|
|
|
// this.option.column.map(e => {
|
|
|
// this.$set(e, 'disabled', true)
|
|
@@ -861,8 +984,8 @@ export default {
|
|
|
openEdit() {
|
|
|
this.disabled = false;
|
|
|
this.option.column.map(e => {
|
|
|
- if (this.confirmDisabled) {
|
|
|
- if (e.prop == 'businesDate') {
|
|
|
+ if (this.confirmDisabled || this.checkDisabled) {
|
|
|
+ if (e.prop == 'businesDate' || e.prop == 'sysNo' || e.prop == 'orderNo') {
|
|
|
this.$set(e, 'disabled', true)
|
|
|
} else {
|
|
|
this.$set(e, 'disabled', false)
|
|
@@ -1498,9 +1621,9 @@ export default {
|
|
|
dealerSubmit() {
|
|
|
if (this.verification()) {
|
|
|
let dealer;
|
|
|
- if (this.form.status == 0) {
|
|
|
+ if (this.form.confirmStatus == 0) {
|
|
|
dealer = 1;
|
|
|
- } else if (this.form.status == 3) {
|
|
|
+ } else if (this.form.confirmStatus == 3) {
|
|
|
dealer = 2;
|
|
|
}
|
|
|
this.btnLoading = true;
|
|
@@ -1622,6 +1745,69 @@ export default {
|
|
|
return true;
|
|
|
}
|
|
|
},
|
|
|
+ // 请核
|
|
|
+ pleaseCheck() {
|
|
|
+ if (this.verification()) {
|
|
|
+ const data = {
|
|
|
+ id : this.form.id,
|
|
|
+ checkType: 'xsqh',
|
|
|
+ url: '/dealer/sales/index',
|
|
|
+ pageStatus:"this.$store.getters.dealerSaleStatus",
|
|
|
+ pageLabel:"销售订单(D)",
|
|
|
+ checkFlag: 2,
|
|
|
+ }
|
|
|
+ this.btnLoading = true;
|
|
|
+ pleaseCheck(data).then(res => {
|
|
|
+ this.$message.success('请核成功')
|
|
|
+ this.queryData(this.form.id)
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message.error('请核失败')
|
|
|
+ }).finally(() => {
|
|
|
+ this.btnLoading = false;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ repealCancel(){
|
|
|
+ this.$confirm("您确定撤回此次申请吗?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const data = {
|
|
|
+ id : this.form.id,
|
|
|
+ checkType: 'xsqh',
|
|
|
+ pageLabel:"销售订单(D)",
|
|
|
+ checkFlag: 2,
|
|
|
+ }
|
|
|
+ this.pageLoading = true
|
|
|
+ repealCancel(data).then(res => {
|
|
|
+ this.$message.success('撤回成功')
|
|
|
+ this.queryData(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ this.pageLoading = false
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //打开审核
|
|
|
+ openCheckDialog(){
|
|
|
+ this.checkData = this.detailData.check
|
|
|
+ this.checkDialog = true;
|
|
|
+ },
|
|
|
+ //关闭审核
|
|
|
+ choceCheckFun(){
|
|
|
+ this.checkDialog = false;
|
|
|
+ },
|
|
|
+ choceScheduleFun(){
|
|
|
+ this.checkScheduleDialog = false
|
|
|
+ },
|
|
|
+ // 查看申请记录
|
|
|
+ openApplicationDialog(){
|
|
|
+ this.applicationDialog = true
|
|
|
+ },
|
|
|
+ //关闭记录
|
|
|
+ choceApplication(){
|
|
|
+ this.applicationDialog = false
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|