|
@@ -13,6 +13,7 @@
|
|
|
type="primary"
|
|
|
@click="dialogApplication(1)"
|
|
|
style="width: 80px;margin-right: 20px;margin-bottom: 20px;"
|
|
|
+ v-if="(wo.provinceCity == 1 && wo.nextStep != 7 && wo.nextStep != 11) || (wo.provinceCity == 2 && wo.nextStep != 11)"
|
|
|
>审批</el-button
|
|
|
>
|
|
|
<el-button
|
|
@@ -31,20 +32,35 @@
|
|
|
type="primary"
|
|
|
@click="dialogApplication(4)"
|
|
|
style="margin-right: 20px;margin-bottom: 20px;"
|
|
|
+ v-if="
|
|
|
+ (step.serialNum == 3 && step.provinceCity == 1) ||
|
|
|
+ (step.serialNum == 6 && step.provinceCity == 2)
|
|
|
+ "
|
|
|
>供应商</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
@click="dialogApplication(5)"
|
|
|
style="margin-right: 20px;margin-bottom: 20px;"
|
|
|
+ v-if="
|
|
|
+ (step.serialNum == 7 && step.provinceCity == 1) ||
|
|
|
+ (step.serialNum == 10 && step.provinceCity == 2)
|
|
|
+ "
|
|
|
>任务分发</el-button
|
|
|
>
|
|
|
- <h3>预计总金额:</h3>
|
|
|
- <h3>总数: 1000</h3>
|
|
|
+ <a
|
|
|
+ style="margin-right:50px; color:#169BD5; cursor:pointer"
|
|
|
+ @click="attStatus = true"
|
|
|
+ v-if="wo.fileUrl != null"
|
|
|
+ >下载附件</a
|
|
|
+ >
|
|
|
+
|
|
|
+ <h3>预计总金额:{{ amountsum }}</h3>
|
|
|
+ <h3>总数: {{ countsum }}</h3>
|
|
|
</div>
|
|
|
<div class="tabbox">
|
|
|
<el-table
|
|
|
- height="calc(100% - 40px)"
|
|
|
+ height="calc(100% - 140px)"
|
|
|
class="com-table"
|
|
|
ref="multipleTable"
|
|
|
:data="tableData"
|
|
@@ -53,7 +69,7 @@
|
|
|
border
|
|
|
style="width: 100%"
|
|
|
v-loading="loading"
|
|
|
- @select="tableSelectionChange"
|
|
|
+ @selection-change="tableSelectionChange"
|
|
|
>
|
|
|
<el-table-column type="selection" width="55">
|
|
|
</el-table-column>
|
|
@@ -95,21 +111,32 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="priority" label="优先级">
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="settlementAmount" label="结算金额">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{
|
|
|
+ scope.row.quantity *
|
|
|
+ scope.row.price *
|
|
|
+ scope.row.coefficient
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="supplier"
|
|
|
+ prop="supplierName"
|
|
|
label="供应商"
|
|
|
- v-if="supplierDialogStatus"
|
|
|
+ v-if="infolist.name != null"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-pagination
|
|
|
+ <!-- <el-pagination
|
|
|
class="pageBox"
|
|
|
@current-change="currchange"
|
|
|
layout="prev, pager, next"
|
|
|
background
|
|
|
:total="total"
|
|
|
>
|
|
|
- </el-pagination>
|
|
|
+ </el-pagination> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 审批 -->
|
|
@@ -182,25 +209,22 @@
|
|
|
border
|
|
|
style="width: 100%"
|
|
|
>
|
|
|
- <el-table-column prop="taskId" label="编号">
|
|
|
+ <el-table-column prop="woId" label="编号">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="taskName" label="环节">
|
|
|
+ <el-table-column prop="name" label="环节">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="assigneeName" label="处理人">
|
|
|
+ <el-table-column prop="opName" label="处理人">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="assigneeNo" label="处理人工号">
|
|
|
+ <el-table-column prop="opNo" label="处理人工号">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="opTime" label="处理时间">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="remark" label="备注">
|
|
|
+ <el-table-column prop="descs" label="备注">
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<div slot="footer" class="dialog-footer myfooter">
|
|
|
- <el-button @click="closedia">取 消</el-button>
|
|
|
- <el-button type="primary" @click="dialogCli(2)"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
+ <el-button @click="closedia">关 闭</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -252,53 +276,74 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<!-- 任务分发 -->
|
|
|
- <!-- <el-dialog
|
|
|
+ <el-dialog
|
|
|
:title="titname"
|
|
|
- :visible.sync="supplierDialogStatus"
|
|
|
- width="30%"
|
|
|
+ :visible.sync="distributionDialogStatus"
|
|
|
+ width="50%"
|
|
|
:destroy-on-close="true"
|
|
|
:modal-append-to-body="false"
|
|
|
:close-on-click-modal="false"
|
|
|
:before-close="closedia"
|
|
|
>
|
|
|
<div v-loading="loadinged">
|
|
|
- <el-form
|
|
|
- :model="infolist"
|
|
|
- ref="infolist"
|
|
|
- :rules="rules"
|
|
|
- style="height: 30vh;"
|
|
|
- >
|
|
|
- <div class="info-line">
|
|
|
- <el-form-item prop="" style="width: 100%">
|
|
|
- <span>供应商</span>
|
|
|
- <el-select
|
|
|
- @change="changeSearch(1)"
|
|
|
- clearable
|
|
|
- v-model="infolist.sceneName"
|
|
|
- placeholder="供应商"
|
|
|
- :disabled="disableStatus"
|
|
|
+ <el-form :model="infolist" ref="infolist" :rules="rules">
|
|
|
+ <div class="info-line">
|
|
|
+ <el-form-item
|
|
|
+ prop=""
|
|
|
+ style="width: 100%"
|
|
|
+ class="info-line online"
|
|
|
>
|
|
|
- <el-option
|
|
|
- v-for="(items, index) in sceneNameopt"
|
|
|
- :key="index"
|
|
|
- :label="items.sceneName"
|
|
|
- :value="items.sceneName"
|
|
|
+ <span>任务分发</span>
|
|
|
+ <el-select
|
|
|
+ clearable
|
|
|
+ v-model="infolist.distributionChoose"
|
|
|
+ placeholder="任务分发"
|
|
|
>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- </div>
|
|
|
- </el-form>
|
|
|
+ <el-option
|
|
|
+ v-for="(items,
|
|
|
+ index) in distributionRegionOpt"
|
|
|
+ :key="index"
|
|
|
+ :label="items"
|
|
|
+ :value="items"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ prop="visiblec"
|
|
|
+ style="width: 100%"
|
|
|
+ class="info-line online"
|
|
|
+ >
|
|
|
+ <span>审批人员</span>
|
|
|
+ <deptTreeOnly
|
|
|
+ class="tree"
|
|
|
+ @treeCheck="treeCheckonly"
|
|
|
+ :defaultList="defaultList"
|
|
|
+ :type="depttype"
|
|
|
+ :closeList="closeList"
|
|
|
+ ></deptTreeOnly>
|
|
|
+ <div class="tree treeUser">
|
|
|
+ <p>
|
|
|
+ {{ treeListonly.leaderAuditName }}
|
|
|
+ <i
|
|
|
+ v-if="treeListonly.leaderAuditName"
|
|
|
+ @click="deletes()"
|
|
|
+ class="el-icon-error"
|
|
|
+ ></i>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
|
|
|
- <div class="t-footer">
|
|
|
- <el-button type="primary" @click="dialogCli(3)"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
- <el-button @click="closedia">取 消</el-button>
|
|
|
- </div>
|
|
|
+ <div class="t-footer">
|
|
|
+ <el-button type="primary" @click="dialogCli(5)"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="closedia">取 消</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </el-dialog> -->
|
|
|
+ </el-dialog>
|
|
|
<!-- 选择固定审批人 -->
|
|
|
<el-dialog
|
|
|
title="选择审批人"
|
|
@@ -320,7 +365,6 @@
|
|
|
<el-form-item prop="" style="width: 100%">
|
|
|
<span>审批人员</span>
|
|
|
<el-select
|
|
|
- @change="changeSearch(4)"
|
|
|
clearable
|
|
|
v-model="infolist.loginNameStr"
|
|
|
placeholder="审批人员"
|
|
@@ -393,6 +437,38 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="附件"
|
|
|
+ :visible.sync="attStatus"
|
|
|
+ width="50%"
|
|
|
+ :destroy-on-close="true"
|
|
|
+ :modal-append-to-body="false"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :before-close="closedia"
|
|
|
+ >
|
|
|
+ <div slot="title">
|
|
|
+ <div>
|
|
|
+ 附件
|
|
|
+ <i
|
|
|
+ class="el-icon-full-screen"
|
|
|
+ style="float: right; margin-right: 30px"
|
|
|
+ @click="
|
|
|
+ () => {
|
|
|
+ fullscreen = !fullscreen;
|
|
|
+ }
|
|
|
+ "
|
|
|
+ ></i>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-loading="loadinged">
|
|
|
+ <div style="margin: 10px 0">
|
|
|
+ <uploadDown :datalist="datalist"></uploadDown>
|
|
|
+ </div>
|
|
|
+ <div class="dialog-footer myfooter">
|
|
|
+ <el-button @click="attStatus = false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
<myMessage
|
|
|
:messTit="messTit"
|
|
|
@closeMessage="closeMessage"
|
|
@@ -408,6 +484,8 @@ import toolList from "../../../components/toolList";
|
|
|
import myUpload from "../../../components/upload";
|
|
|
import deptTreeOnly from "../../../components/deptTreeOnly.vue";
|
|
|
import { MessageBox } from "element-ui";
|
|
|
+import { Loading } from "element-ui";
|
|
|
+import uploadDown from "../../../components/uploadDown";
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
@@ -416,7 +494,8 @@ export default {
|
|
|
deptTreeOnly,
|
|
|
MessageBox,
|
|
|
toolList,
|
|
|
- myUpload
|
|
|
+ myUpload,
|
|
|
+ uploadDown
|
|
|
},
|
|
|
data() {
|
|
|
const regionName = (rule, value, callback) => {
|
|
@@ -452,17 +531,25 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
searchList: [
|
|
|
- // {
|
|
|
- // type: 'input',
|
|
|
- // tit: '物料名称',
|
|
|
- // value: '',
|
|
|
- // width: '48%',
|
|
|
- // },
|
|
|
+ {
|
|
|
+ type: "sel",
|
|
|
+ tit: "地市",
|
|
|
+ value: "",
|
|
|
+ width: "32%",
|
|
|
+ options: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "sel",
|
|
|
+ tit: "区县",
|
|
|
+ value: "",
|
|
|
+ width: "32%",
|
|
|
+ options: []
|
|
|
+ },
|
|
|
{
|
|
|
type: "sel",
|
|
|
tit: "物料类别",
|
|
|
value: "",
|
|
|
- width: "98%",
|
|
|
+ width: "32%",
|
|
|
options: []
|
|
|
}
|
|
|
// {
|
|
@@ -483,7 +570,9 @@ export default {
|
|
|
approvalDialogStatus: false,
|
|
|
approvalStepDialogStatus: false,
|
|
|
titname: "",
|
|
|
- infolist: {},
|
|
|
+ infolist: {
|
|
|
+ distributionChoose: ""
|
|
|
+ },
|
|
|
approvalinfolist: {
|
|
|
opinionradio: 1
|
|
|
},
|
|
@@ -501,17 +590,10 @@ export default {
|
|
|
},
|
|
|
infoApply: {},
|
|
|
rovaList: [
|
|
|
- {
|
|
|
- taskId: "178456126588466",
|
|
|
- taskName: "流程发起",
|
|
|
- assigneeName: "某某",
|
|
|
- assigneeNo: "moumou",
|
|
|
- opTime: "2021-06-21 12:56:24",
|
|
|
- remark: "fff"
|
|
|
- }
|
|
|
],
|
|
|
woNoArr: [],
|
|
|
supplierOpt: [],
|
|
|
+ isSupplierTable: false,
|
|
|
// 树形弹窗
|
|
|
checkexa: false,
|
|
|
treeListonly: {},
|
|
@@ -523,13 +605,50 @@ export default {
|
|
|
fixedDialogStatus: false,
|
|
|
userListOpt: [],
|
|
|
cMkAdvMetirialWoInfoSubmit: {},
|
|
|
- stsArr: ["待审批", "审批通过", "打回"]
|
|
|
+ stsArr: ["待审批", "审批通过", "打回"],
|
|
|
+ // 分发
|
|
|
+ distributionDialogStatus: false,
|
|
|
+ distributionRegionOpt: [],
|
|
|
+ cWoInfoIssued: {},
|
|
|
+ wo: {},
|
|
|
+ datalist: {
|
|
|
+ url: "/market/cadvBusiMetirialWo/checkExport",
|
|
|
+ type: 2
|
|
|
+ },
|
|
|
+ attStatus: false,
|
|
|
+ step: {},
|
|
|
+ passedList:[],
|
|
|
+ multipleSelection:[]
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ amountsum: {
|
|
|
+ set() {},
|
|
|
+ get() {
|
|
|
+ var sum = 0;
|
|
|
+ this.tableData.forEach(item => {
|
|
|
+ sum += parseFloat(
|
|
|
+ item.price * item.quantity * item.coefficient
|
|
|
+ );
|
|
|
+ });
|
|
|
+ return sum.toFixed(2);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ countsum: {
|
|
|
+ set() {},
|
|
|
+ get() {
|
|
|
+ var sum = 0;
|
|
|
+ this.tableData.forEach(item => {
|
|
|
+ sum += parseFloat(item.quantity);
|
|
|
+ });
|
|
|
+ return sum;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
tableSelectionChange(val, row) {
|
|
|
this.multipleSelection = val;
|
|
|
-
|
|
|
+ console.log(this.multipleSelection);
|
|
|
// console.log(val);
|
|
|
// this.woNoArr=[]
|
|
|
// this.multipleSelection.forEach(item => {
|
|
@@ -543,21 +662,23 @@ export default {
|
|
|
this.approvalDialogStatus = false;
|
|
|
this.approvalinfolist = {};
|
|
|
this.supplierDialogStatus = false;
|
|
|
- // this.approvalinfolist =
|
|
|
this.approvalStepDialogStatus = false;
|
|
|
+ this.distributionDialogStatus = false;
|
|
|
+ this.attStatus = false;
|
|
|
},
|
|
|
//搜索数据
|
|
|
searchInfo(v) {
|
|
|
- this.params = {};
|
|
|
+ // this.params = {};
|
|
|
// v[0] ? this.params.metirialName = v[0] : '';
|
|
|
- v[0] ? (this.params.regionName = v[0]) : "";
|
|
|
+ v[2] ? (this.params.metirialType = v[2]) : "";
|
|
|
+ // this.params.woId
|
|
|
this.getList(this.params, this.pageSize);
|
|
|
},
|
|
|
//获取列表
|
|
|
getList(v, n) {
|
|
|
this.pageSize = n;
|
|
|
let _this = this;
|
|
|
- // this.loading = true;
|
|
|
+ this.loading = true;
|
|
|
this.tableData = [];
|
|
|
// v.assigneeNo = this.loginNo;
|
|
|
this.$http({
|
|
@@ -569,12 +690,34 @@ export default {
|
|
|
},
|
|
|
data: v
|
|
|
}).then(res => {
|
|
|
- // console.log(res.data);
|
|
|
- this.tableData = res.data.body.pageList.data;
|
|
|
+ // console.log(res.data.body);
|
|
|
+ // this.tableData = res.data.body.pageList.data;
|
|
|
+ res.data.body.pageList.data.forEach(item=>{
|
|
|
+ if (item.woSts == '0') {
|
|
|
+ this.tableData.push(item);
|
|
|
+ } else if (item.woSts == '1') {
|
|
|
+ this.passedList.push(item);
|
|
|
+ }
|
|
|
+ });
|
|
|
this.userListOpt =
|
|
|
res.data.body.queryCurrentAndNext.next.userList;
|
|
|
this.total = res.data.totalRecord;
|
|
|
+ this.wo = res.data.body.wo;
|
|
|
+ this.datalist.attList = JSON.parse(this.wo.fileUrl);
|
|
|
+ this.step = res.data.body.step;
|
|
|
+ this.searchList[2].options = [];
|
|
|
+ // Array.from(new Set(arr))
|
|
|
+ let temp = [];
|
|
|
+ this.tableData.forEach(item=>{
|
|
|
+ temp.push({dataCode: item.metirialType, dataName: item.metirialType});
|
|
|
+ });
|
|
|
+ let map = new Map();
|
|
|
+ this.searchList[2].options = temp.filter((temp) => !map.has(temp.metirialType) && map.set(temp.metirialType, 1));
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
this.loading = false;
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
// 分页
|
|
@@ -586,41 +729,63 @@ export default {
|
|
|
// 申请(new)
|
|
|
dialogApplication(v, n) {
|
|
|
var _this = this;
|
|
|
- // if(this.multipleSelection == undefined){
|
|
|
- // this.centerDialogVisible = true;
|
|
|
- // this.messTit = "请至少选择一条进行审批";
|
|
|
-
|
|
|
- // }else{
|
|
|
- // this.approvalDialogStatus = true;
|
|
|
- // this.titname = "审批";
|
|
|
- // this.disableStatus = false;
|
|
|
- // }
|
|
|
- if (!this.multipleSelection) this.multipleSelection = [];
|
|
|
+ // if (!this.multipleSelection) this.multipleSelection = [];
|
|
|
+
|
|
|
if (v === 1) {
|
|
|
if (
|
|
|
this.multipleSelection == undefined ||
|
|
|
this.multipleSelection == ""
|
|
|
) {
|
|
|
+
|
|
|
MessageBox.alert("请至少选择一条进行审批", "温馨提示", {
|
|
|
confirmButtonText: "确定"
|
|
|
});
|
|
|
+ // step.serialNum == 3 && step.provinceCity == 1) || (step.serialNum == 6 && step.provinceCity == 2
|
|
|
} else {
|
|
|
- this.titname = "审批";
|
|
|
- this.approvalDialogStatus = true;
|
|
|
+ if ((this.step.serialNum == 3 &&this.step.provinceCity == 1) ||(this.step.serialNum == 6 &&this.step.provinceCity == 2)) {
|
|
|
+ let n = 0;
|
|
|
+ this.multipleSelection.forEach(item=>{
|
|
|
+ // console.log(item);
|
|
|
+ if(item.supplierName == null || item.supplierName == undefined){
|
|
|
+
|
|
|
+ n =1;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(n==1){
|
|
|
+ MessageBox.alert(
|
|
|
+ "请先选择供应商再进行审批",
|
|
|
+ "温馨提示",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定"
|
|
|
+ }
|
|
|
+ );
|
|
|
+ return;
|
|
|
+ }else{
|
|
|
+ this.titname = "审批";
|
|
|
+ this.approvalDialogStatus = true;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.titname = "审批";
|
|
|
+ this.approvalDialogStatus = true;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
} else if (v === 2) {
|
|
|
- if (
|
|
|
- this.multipleSelection == undefined ||
|
|
|
- this.multipleSelection == ""
|
|
|
- ) {
|
|
|
- MessageBox.alert("请选择一条查看审批轨迹", "温馨提示", {
|
|
|
- confirmButtonText: "确定"
|
|
|
- });
|
|
|
- } else if (this.multipleSelection.length > 1) {
|
|
|
- MessageBox.alert("只能选择一条查看审批轨迹", "温馨提示", {
|
|
|
- confirmButtonText: "确定"
|
|
|
- });
|
|
|
- } else {
|
|
|
+ // if (
|
|
|
+ // this.multipleSelection == undefined ||
|
|
|
+ // this.multipleSelection == ""
|
|
|
+ // ) {
|
|
|
+ // MessageBox.alert("请选择一条查看审批轨迹", "温馨提示", {
|
|
|
+ // confirmButtonText: "确定"
|
|
|
+ // });
|
|
|
+ // } else if (this.multipleSelection.length > 1) {
|
|
|
+ // MessageBox.alert("只能选择一条查看审批轨迹", "温馨提示", {
|
|
|
+ // confirmButtonText: "确定"
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
this.titname = "审批轨迹";
|
|
|
this.approvalStepDialogStatus = true;
|
|
|
this.$http({
|
|
@@ -629,12 +794,53 @@ export default {
|
|
|
headers: {
|
|
|
"Content-Type": "application/json"
|
|
|
},
|
|
|
- data: {mKAdvBusiMetirialWoStep: this.params.woId}
|
|
|
+ data: { mKAdvBusiMetirialWoStep: this.params.woId }
|
|
|
}).then(res => {
|
|
|
console.log(res);
|
|
|
});
|
|
|
- }
|
|
|
+ // }
|
|
|
+ } else if (v === 3) {
|
|
|
+ this.$http({
|
|
|
+ url: "/market/cadvBusiMetirialWo/export",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json"
|
|
|
+ },
|
|
|
+ responseType: "blob",
|
|
|
+ data: { id: this.params.woId }
|
|
|
+ }).then(res => {
|
|
|
+ if (window.navigator && window.navigator.msSaveOrOpenBlob) {
|
|
|
+ let blob = new Blob([res.data], {
|
|
|
+ type: "application/vnd.ms-excel"
|
|
|
+ });
|
|
|
+ window.navigator.msSaveOrOpenBlob(
|
|
|
+ blob,
|
|
|
+ this.wo.bizName + ".xlsx"
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ /* 火狐谷歌的文件下载方式 */
|
|
|
+ var blob = new Blob([res.data]);
|
|
|
+ var downloadElement = document.createElement("a");
|
|
|
+ var href = window.URL.createObjectURL(blob);
|
|
|
+ downloadElement.href = href;
|
|
|
+ downloadElement.download = this.wo.bizName + ".xlsx";
|
|
|
+ document.body.appendChild(downloadElement);
|
|
|
+ downloadElement.click();
|
|
|
+ document.body.removeChild(downloadElement);
|
|
|
+ window.URL.revokeObjectURL(href);
|
|
|
+ }
|
|
|
+ });
|
|
|
} else if (v === 4) {
|
|
|
+ if (
|
|
|
+ this.multipleSelection == undefined ||
|
|
|
+ this.multipleSelection == ""
|
|
|
+ ) {
|
|
|
+ MessageBox.alert("请至少选择一条", "温馨提示", {
|
|
|
+ confirmButtonText: "确定"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ // step.serialNum == 3 && step.provinceCity == 1) || (step.serialNum == 6 && step.provinceCity == 2
|
|
|
+ }
|
|
|
this.titname = "选择供应商";
|
|
|
this.supplierDialogStatus = true;
|
|
|
this.$http({
|
|
@@ -650,13 +856,12 @@ export default {
|
|
|
});
|
|
|
} else if (v === 5) {
|
|
|
this.titname = "任务分发";
|
|
|
+ this.distributionDialogStatus = true;
|
|
|
let regionArr = [];
|
|
|
this.tableData.forEach(item => {
|
|
|
regionArr.push(item.regionName);
|
|
|
});
|
|
|
- let newRegionArr = [...new Set(regionArr)];
|
|
|
-
|
|
|
- // console.log(newRegionArr);
|
|
|
+ this.distributionRegionOpt = [...new Set(regionArr)];
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -676,22 +881,83 @@ export default {
|
|
|
if (this.approvalinfolist.opinionradio == 1) {
|
|
|
this.cMkAdvMetirialWoInfoSubmit.woSts = "1";
|
|
|
// console.log(list);
|
|
|
+ if (this.userListOpt == null) {
|
|
|
+ // 树形审批人
|
|
|
+ this.checkexa = true;
|
|
|
+ } else {
|
|
|
+
|
|
|
+ if (this.tableData.length != this.multipleSelection.length) {
|
|
|
+ this.fixedDialogStatus = false;
|
|
|
+ this.submitInfo(
|
|
|
+ "/market/cadvBusiMetirialWo/submitWo",
|
|
|
+ this.cMkAdvMetirialWoInfoSubmit
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ // 固定审批人弹窗
|
|
|
+ if (this.userListOpt.length == 1) {
|
|
|
+ this.cMkAdvMetirialWoInfoSubmit.nextOpNo = this.userListOpt[0].loginNoStr;
|
|
|
+ this.cMkAdvMetirialWoInfoSubmit.nextOpName = this.userListOpt[0].loginNameStr;
|
|
|
+ this.fixedDialogStatus = false;
|
|
|
|
|
|
+ // console.log(this.cMkAdvMetirialWoInfoSubmit);
|
|
|
+ this.submitInfo(
|
|
|
+ "/market/cadvBusiMetirialWo/submitWo",
|
|
|
+ this.cMkAdvMetirialWoInfoSubmit
|
|
|
+ );
|
|
|
+ // userListSingle = "";
|
|
|
+ this.approvalinfolist.opinionradio = "1";
|
|
|
+ this.approvalinfolist.opinion = "";
|
|
|
+ }else{
|
|
|
+ this.fixedDialogStatus = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
// this.submitInfo("/market/cadvBusiMetirialWo/submitWo", list);
|
|
|
} else if (this.approvalinfolist.opinionradio == 2) {
|
|
|
this.cMkAdvMetirialWoInfoSubmit.woSts = "2";
|
|
|
- // console.log(list);
|
|
|
- // this.submitInfo("/market/cadvBusiMetirialWo/submitWo", list);
|
|
|
- }
|
|
|
- if (this.userListOpt == null) {
|
|
|
- // 树形审批人
|
|
|
- this.checkexa = true;
|
|
|
- } else {
|
|
|
- // 固定审批人弹窗
|
|
|
- this.fixedDialogStatus = true;
|
|
|
+ if (this.tableData.length == this.multipleSelection.length && this.passedList.length > 0) {
|
|
|
+ if (this.userListOpt == null) {
|
|
|
+ // 树形审批人
|
|
|
+ this.checkexa = true;
|
|
|
+ } else {
|
|
|
+
|
|
|
+ if (this.tableData.length != this.multipleSelection.length) {
|
|
|
+ this.fixedDialogStatus = false;
|
|
|
+ this.submitInfo(
|
|
|
+ "/market/cadvBusiMetirialWo/submitWo",
|
|
|
+ this.cMkAdvMetirialWoInfoSubmit
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ // 固定审批人弹窗
|
|
|
+ if (this.userListOpt.length == 1) {
|
|
|
+ this.cMkAdvMetirialWoInfoSubmit.nextOpNo = this.userListOpt[0].loginNoStr;
|
|
|
+ this.cMkAdvMetirialWoInfoSubmit.nextOpName = this.userListOpt[0].loginNameStr;
|
|
|
+ this.fixedDialogStatus = false;
|
|
|
+
|
|
|
+ // console.log(this.cMkAdvMetirialWoInfoSubmit);
|
|
|
+ this.submitInfo(
|
|
|
+ "/market/cadvBusiMetirialWo/submitWo",
|
|
|
+ this.cMkAdvMetirialWoInfoSubmit
|
|
|
+ );
|
|
|
+ // userListSingle = "";
|
|
|
+ this.approvalinfolist.opinionradio = "1";
|
|
|
+ this.approvalinfolist.opinion = "";
|
|
|
+ }else{
|
|
|
+ this.fixedDialogStatus = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.checkexa = false;
|
|
|
+ this.fixedDialogStatus = false;
|
|
|
+
|
|
|
+ console.log(this.cMkAdvMetirialWoInfoSubmit);
|
|
|
+ this.submitInfo(
|
|
|
+ "/market/cadvBusiMetirialWo/submitWo",
|
|
|
+ this.cMkAdvMetirialWoInfoSubmit
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
- // this.checkexa = true;
|
|
|
- // console.log(param);
|
|
|
} else if (v === 2) {
|
|
|
this.approvalStepDialogStatus = false;
|
|
|
} else if (v === 3) {
|
|
@@ -710,19 +976,37 @@ export default {
|
|
|
// this.multipleSelection.supplierCode = supplierChoose[0].code;
|
|
|
// console.log(this.multipleSelection);
|
|
|
} else if (v === 5) {
|
|
|
+ this.cWoInfoIssued.nextOpNo = this.treeListonly.leaderAuditNo;
|
|
|
+ this.cWoInfoIssued.nextOpName = this.treeListonly.leaderAuditName;
|
|
|
+ this.cWoInfoIssued.woId = this.params.woId;
|
|
|
+ this.cWoInfoIssued.regionName = this.infolist.distributionChoose;
|
|
|
+ // console.log(this.cWoInfoIssued);
|
|
|
+ this.distributionDialogStatus = false;
|
|
|
+ this.submitInfo(
|
|
|
+ "/market/cadvBusiMetirialWo/issued",
|
|
|
+ this.cWoInfoIssued
|
|
|
+ );
|
|
|
} else if (v === 6) {
|
|
|
let userListSingle = "";
|
|
|
userListSingle = this.userListOpt.filter(item => {
|
|
|
return item.loginNameStr == this.infolist.loginNameStr;
|
|
|
});
|
|
|
|
|
|
- this.list.nextOpNo = userListSingle[0].loginNoStr;
|
|
|
- this.list.nextOpName = userListSingle[0].loginNameStr;
|
|
|
+ this.cMkAdvMetirialWoInfoSubmit.nextOpNo =
|
|
|
+ userListSingle[0].loginNoStr;
|
|
|
+ this.cMkAdvMetirialWoInfoSubmit.nextOpName =
|
|
|
+ userListSingle[0].loginNameStr;
|
|
|
this.fixedDialogStatus = false;
|
|
|
+
|
|
|
+ console.log(this.cMkAdvMetirialWoInfoSubmit);
|
|
|
this.submitInfo(
|
|
|
"/market/cadvBusiMetirialWo/submitWo",
|
|
|
this.cMkAdvMetirialWoInfoSubmit
|
|
|
);
|
|
|
+ userListSingle = "";
|
|
|
+ this.approvalinfolist.opinionradio = "1";
|
|
|
+ this.approvalinfolist.opinion = "";
|
|
|
+ // console.log(this.cMkAdvMetirialWoInfoSubmit);
|
|
|
} else if (v === 7) {
|
|
|
this.cMkAdvMetirialWoInfoSubmit.nextOpNo = this.treeListonly.leaderAuditNo;
|
|
|
this.cMkAdvMetirialWoInfoSubmit.nextOpName = this.treeListonly.leaderAuditName;
|
|
@@ -732,10 +1016,15 @@ export default {
|
|
|
"/market/cadvBusiMetirialWo/submitWo",
|
|
|
this.cMkAdvMetirialWoInfoSubmit
|
|
|
);
|
|
|
+ this.treeListonly = {};
|
|
|
+ this.approvalinfolist.opinionradio = "1";
|
|
|
+ this.approvalinfolist.opinion = "";
|
|
|
}
|
|
|
},
|
|
|
submitInfo(u, v) {
|
|
|
let _this = this;
|
|
|
+ // this.loading = true;
|
|
|
+ let loadingInstance = Loading.service()
|
|
|
this.$http({
|
|
|
url: u,
|
|
|
method: "post",
|
|
@@ -744,18 +1033,34 @@ export default {
|
|
|
},
|
|
|
data: v
|
|
|
}).then(res => {
|
|
|
+ loadingInstance.close()
|
|
|
if (res.data.result === 1) {
|
|
|
_this.$message({
|
|
|
message: res.data.desc,
|
|
|
type: "error"
|
|
|
});
|
|
|
+ }
|
|
|
+ if (res.data.result === 2) {
|
|
|
+ _this.$message({
|
|
|
+ message: res.data.desc,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
} else {
|
|
|
_this.$message({
|
|
|
message: "成功",
|
|
|
type: "success"
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
+ if (this.tableData.length == this.multipleSelection.length) {
|
|
|
+ this.$router.push("/materialApplication")
|
|
|
+ }
|
|
|
+ this.treeListonly = {}
|
|
|
+ this.infolist.distributionChoose = "";
|
|
|
_this.getList(this.params, this.pageSize);
|
|
|
}
|
|
|
+ // this.loading = false;
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
closeMessage(v) {
|
|
@@ -814,7 +1119,6 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
if (JSON.stringify(this.$route.query) != "{}") {
|
|
|
- // console.log(this.$route.query.id);
|
|
|
this.params.woId = this.$route.query.id;
|
|
|
}
|
|
|
this.getList(this.params, 1);
|