|
@@ -19,8 +19,11 @@
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item :disabled="form.status > 0 || approvalStatus" @click.native="pleaseCheck">请核数据
|
|
|
</el-dropdown-item>
|
|
|
- <el-dropdown-item disabled>审核进度</el-dropdown-item>
|
|
|
+ <el-dropdown-item :disabled="!form.approvalStatus"
|
|
|
+ @click.native="checkScheduleDialog = true, checkId = form.id">审核进度</el-dropdown-item>
|
|
|
<el-dropdown-item disabled>撤销请核</el-dropdown-item>
|
|
|
+ <el-dropdown-item v-if="checkDisabled && form.approvalStatus == 'S'" @click.native="openCheckDialog">审批
|
|
|
+ </el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
<el-button type="success" :disabled="!form.id" size="small" @click="copyDoc" :loading="btnLoading" v-if="false">
|
|
@@ -103,6 +106,16 @@
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
+ <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>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -121,7 +134,8 @@ import { getDeptTree } from "@/api/system/dept";
|
|
|
import { getCurrentDate } from "@/util/date";
|
|
|
import { dataDetail, typeSave, removeGoods, pleaseCheck, getGoodsDescList } from "@/api/standAlone/saleLeads";
|
|
|
import { contrastObj, contrastList } from "@/util/contrastData";
|
|
|
-
|
|
|
+import check from "@/components/check/check";
|
|
|
+import checkSchedule from "@/components/check/checkSchedule";
|
|
|
export default {
|
|
|
name: "detail",
|
|
|
props: {
|
|
@@ -129,6 +143,10 @@ export default {
|
|
|
type: Object
|
|
|
}
|
|
|
},
|
|
|
+ components: {
|
|
|
+ check,
|
|
|
+ checkSchedule,
|
|
|
+ },
|
|
|
data() {
|
|
|
const validateRemark = (rule, value, callback) => {
|
|
|
if (this.form.status == 2 && !this.form.remarks) {
|
|
@@ -138,6 +156,11 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
return {
|
|
|
+ checkData: {},
|
|
|
+ checkDialog: false,
|
|
|
+ batchNo: '',
|
|
|
+ checkId: '',
|
|
|
+ checkScheduleDialog: false,
|
|
|
approvalStatus: false,
|
|
|
disabled: false,
|
|
|
checkDisabled: false,
|
|
@@ -332,6 +355,8 @@ export default {
|
|
|
this.queryData(this.detailData.id);
|
|
|
} else if (this.detailData.check) {
|
|
|
this.disabled = true;
|
|
|
+ this.checkDisabled = true;
|
|
|
+ this.batchNo = this.detailData.check.batchNo
|
|
|
this.option.column.map(e => {
|
|
|
this.$set(e, 'disabled', true)
|
|
|
})
|
|
@@ -347,6 +372,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ openCheckDialog() {
|
|
|
+ this.checkData = this.detailData.check
|
|
|
+ this.checkDialog = true;
|
|
|
+ },
|
|
|
+ choceCheckFun() {
|
|
|
+ this.checkDialog = false;
|
|
|
+ },
|
|
|
+ choceScheduleFun() {
|
|
|
+ this.checkScheduleDialog = false
|
|
|
+ },
|
|
|
khEdit() {
|
|
|
this.$router.push('/basicData/customerInformation/index')
|
|
|
},
|
|
@@ -359,7 +394,6 @@ export default {
|
|
|
delete this.form.itemList;
|
|
|
this.oldForm = { ...this.form };
|
|
|
this.oldDataList = [...this.dataList];
|
|
|
- this.checkDisabled = this.form.status > 0 ? true : false;
|
|
|
this.approvalStatus = this.form.approvalStatus == "S" || this.form.approvalStatus == "A" ? true : false;
|
|
|
if (this.form.status > 0) {
|
|
|
this.option.column.map(e => {
|
|
@@ -371,6 +405,14 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
pleaseCheck() {
|
|
|
+ if (this.dataList.length == 0) {
|
|
|
+ return this.$message.error('沟通记录为空不能提交')
|
|
|
+ }
|
|
|
+ for (let i = 0; i < this.dataList.length; i++) {
|
|
|
+ if (!this.dataList[i].id) {
|
|
|
+ return this.$message.error('沟通记录未保存不能提交')
|
|
|
+ }
|
|
|
+ }
|
|
|
this.$confirm("您确定提交此次申请吗?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
@@ -404,13 +446,6 @@ export default {
|
|
|
// 编辑按钮触发
|
|
|
openEdit() {
|
|
|
this.disabled = false;
|
|
|
- this.option.column.map(e => {
|
|
|
- if (this.checkDisabled) {
|
|
|
- this.$set(e, 'disabled', true)
|
|
|
- } else {
|
|
|
- this.$set(e, 'disabled', false)
|
|
|
- }
|
|
|
- })
|
|
|
},
|
|
|
// 复制
|
|
|
copyDoc() {
|
|
@@ -419,7 +454,7 @@ export default {
|
|
|
submit() {
|
|
|
let data = {
|
|
|
...this.form,
|
|
|
- itemList:this.dataList
|
|
|
+ itemList: this.dataList
|
|
|
}
|
|
|
this.$router.push({
|
|
|
path: '/workManagement/main-items/list',
|