瀏覽代碼

Merge branch 'test' of https://git.agilestar.cn/spfm-group/spfm-market-front into test

wgp 3 年之前
父節點
當前提交
11d88237f8

+ 685 - 0
src/pages/main/advertising/acceptance.vue

@@ -0,0 +1,685 @@
+<template>
+    <div>
+        <div class="container">
+            <el-form
+                :model="infolist"
+                ref="infolist"
+                :rules="rules"
+                class="container-box"
+                label-width="80px"
+            >
+                <div>
+                    <div class="section2">
+                        <a
+                            href="#"
+                            style="margin: 20px 0;margin-right: 20px;"
+                            @click="dialogApplication(1)"
+                            >验收清单</a
+                        >
+                        <a
+                            href="#"
+                            style="margin: 20px 0;margin-right: 20px;"
+                            @click="dialogApplication(2)"
+                            >发货回执</a
+                        >
+                    </div>
+                    <div>
+                        <el-form-item class="info-line online">
+                            <span>验收说明</span>
+                            <el-input
+                                v-model="examDescription"
+                                type="textarea"
+                                :rows="4"
+                            ></el-input>
+                        </el-form-item>
+                    </div>
+
+                    <div>
+                        <el-form-item class="info-line online">
+                            <span>验收证明</span>
+                            <myUpload
+                                @uploadBack="uploadBack"
+                                :fileInfo="fileInfo"
+                                :fileList="fileInfo.fileList"
+                            >
+                            </myUpload>
+                        </el-form-item>
+                    </div>
+                </div>
+
+                <div class="t-footer t-footer1">
+                    <el-button
+                        type="primary"
+                        style="width: 120px"
+                        @click="dialogCli(1)"
+                        >完 成</el-button
+                    >
+                    <el-button @click="dialogCli(2)" style="width: 120px"
+                        >取 消</el-button
+                    >
+                </div>
+            </el-form>
+        </div>
+        <el-dialog
+            title="验收清单"
+            :visible.sync="ysListDialogStatus"
+            width="50%"
+            :destroy-on-close="true"
+            :modal-append-to-body="false"
+            :close-on-click-modal="false"
+        >
+            <el-form
+                :model="infolist"
+                ref="infolist"
+                :rules="rules"
+                style="height: 50vh;overflow-y: scroll; width:100%"
+                :fullscreen="true"
+            >
+                <div class="info-line">
+                    <el-table
+                        :data="tableData"
+                        style="width: 100%;"
+                        border
+                        size="large"
+                        
+                    >
+                        <el-table-column prop="id" label="物料ID">
+                        </el-table-column>
+                        <el-table-column prop="regionName" label="地市公司">
+                        </el-table-column>
+                        <el-table-column prop="countyName" label="区县名称">
+                        </el-table-column>
+                        <el-table-column prop="channelCode" label="渠道编码">
+                        </el-table-column>
+                        <el-table-column prop="channelName" label="渠道名称">
+                        </el-table-column>
+                        <el-table-column prop="sceneName" label="场景">
+                        </el-table-column>
+                        <el-table-column prop="metirialType" label="物料类别">
+                        </el-table-column>
+                        <el-table-column prop="metirialCode" label="物料编码">
+                        </el-table-column>
+                        <el-table-column prop="metirialName" label="物料名称">
+                        </el-table-column>
+                        <el-table-column prop="unit" label="物料单位">
+                        </el-table-column>
+                        <el-table-column prop="size" label="规格尺寸">
+                        </el-table-column>
+                        <el-table-column prop="length" label="长">
+                        </el-table-column>
+                        <el-table-column prop="width" label="宽">
+                        </el-table-column>
+                        <el-table-column prop="direction" label="横竖">
+                        </el-table-column>
+                        <el-table-column prop="coefficient" label="系数">
+                        </el-table-column>
+                        <el-table-column prop="price" label="单价">
+                        </el-table-column>
+                        <el-table-column
+                            prop="quantity"
+                            label="数量"
+                            width="100"
+                        >
+                        </el-table-column>
+                        <el-table-column prop="priority" label="优先级">
+                        </el-table-column>
+                        <el-table-column label="结算金额" width="140px" prop="settlementAmount">
+                            <template slot-scope="scope">
+                            <div>
+                                {{
+                                    scope.row.quantity *
+                                        scope.row.price *
+                                        scope.row.coefficient
+                                }}
+                            </div>
+                        </template>
+                        </el-table-column>
+                    </el-table>
+                </div>
+            </el-form>
+
+            <div class="t-footer">
+                <el-button type="primary" @click="downloadExcel">下载</el-button
+                >
+                
+                <el-button @click="ysListDialogStatus = false">取 消</el-button>
+            </div>
+        </el-dialog>
+        <el-dialog
+            title="发货回执"
+            :visible.sync="feedbackListDialogStatus"
+            width="30%"
+            :destroy-on-close="true"
+            :modal-append-to-body="false"
+            :close-on-click-modal="false"
+        >
+            <el-form
+                :model="infolist"
+                ref="infolist"
+                :rules="rules"
+                style="height: 20vh;"
+            >
+                <div class="info-line">
+                    <!-- <a :href="feedbackList">{{ feedbackList }}</a> -->
+                    {{ feedbackList }}
+                </div>
+            </el-form>
+
+            <div class="t-footer">
+                <!-- <el-button type="primary" @click="dialogSubmit()"
+                    >确 定</el-button
+                > -->
+                <el-button @click="feedbackListDialogStatus = false"
+                    >取 消</el-button
+                >
+            </div>
+        </el-dialog>
+        <myMessage
+            :messTit="messTit"
+            @closeMessage="closeMessage(1)"
+            :centerDialogVisible="centerDialogVisible"
+            v-if="centerDialogVisible"
+        ></myMessage>
+    </div>
+</template>
+<script>
+import mySearch from "../../../components/search.vue";
+import myUpload from "../../../components/upload.vue";
+import deptTreeOnly from "../../../components/deptTreeOnly.vue";
+
+export default {
+    components: {
+        mySearch,
+        myUpload,
+        deptTreeOnly
+    },
+    data() {
+        const terminalTypeName = (rule, value, callback) => {
+            if (!this.infolist.tit) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        return {
+            rules: {
+                terminalTypeName: [
+                    {
+                        required: true,
+                        trigger: "blur",
+                        validator: terminalTypeName
+                    }
+                ]
+            },
+            fullscreen: false,
+            tableData: [],
+            disableStatus: false,
+            infolist: {},
+            terminal: "758639528378826752",
+            userInfo: {},
+            params: {},
+            attList: [],
+            loadinged: false,
+            options: [],
+            materType: "",
+            scene: "",
+            fileInfo: {
+                // type: "img",
+                limit: 50,
+                url: "/market/cknowledgeatt/upload",
+                fileList: []
+            },
+            infomaterType: [],
+            // metirialName: "",
+            regionsts: false,
+            multipleSelection: [],
+            centerDialogVisible: false,
+            delid: "",
+            uploadstatus: false,
+            userListOpt: [],
+            ysListDialogStatus: false,
+            feedbackListDialogStatus: false,
+            examDescription: "",
+            examList: {},
+            feedbackList: ""
+        };
+    },
+    methods: {
+        dialogApplication(v) {
+            if (v === 1) {
+                //验收清单
+                this.ysListDialogStatus = true;
+                this.$http({
+                    url: "/market/advSubtask/getYsqd",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json"
+                    },
+                    data: { 
+                        woId: this.params.woId,
+                        cityWoId: this.params.cityWoId,
+                        countryWoId: this.params.countyWoId
+                        }
+                }).then(res => {
+                    this.tableData = res.data;
+                    // this.feedbackList = res.data.receipt;
+
+                });
+
+            } else if (v === 2) {
+                this.feedbackListDialogStatus = true;
+                this.$http({
+                    url: "/market/advSubtask/getReceipt",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json"
+                    },
+                    data: { id: this.params.cityWoId }
+                }).then(res => {
+                    this.feedbackList = res.data.receipt;
+                });
+            }
+        },
+        //添加
+        dialogCli(v) {
+            if (v === 1) {
+                let fileList = [];
+                this.attList.forEach(item => {
+                    fileList.push({
+                        id: item.fileCode,
+                        fileCode: item.fileCode,
+                        fileName: item.fileName
+                    });
+                });
+                // this.examList.id = "1";
+                // this.examList.woCityId = this.params.cityWoId;
+                // this.examList.id = this.params.countyWoId;
+                // this.examList.woId = this.params.woId;
+
+                this.examList.woId = this.params.woId,
+                this.examList.woCityId = this.params.cityWoId,
+                this.examList.id = this.params.countyWoId
+                this.examList.attList = JSON.stringify(fileList);
+                this.examList.remark = this.examDescription;
+                this.submitInfo(
+                    "/market/cadvBusiMetirialWo/acceptance",
+                    this.examList
+                );
+            } else if (v === 2) {
+                this.fileInfo.fileList = [];
+                this.infolist = {};
+                this.attList = [];
+                return;
+            }
+        },
+        submitInfo(u, v) {
+            let _this = this;
+            this.$refs.infolist.validate(valid => {
+                if (valid) {
+                    this.loadinged = true;
+                    this.$http({
+                        url: u,
+                        method: "post",
+                        headers: {
+                            "Content-Type": "application/json"
+                        },
+                        data: v
+                    }).then(res => {
+                        this.loadinged = false;
+                        if (res.data.result === 2) {
+                            _this.$message({
+                                message: res.data.desc,
+                                type: "error"
+                            });
+                        } else if (res.data.result === 1) {
+                            _this.$message({
+                                message: res.data.desc,
+                                type: "error"
+                            });
+                        } else {
+                            _this.$message({
+                                message: "成功",
+                                type: "success"
+                            });
+
+                            // _this.getList();
+                            this.attList = [];
+                            this.fileInfo.fileList = [];
+                            this.examDescription = "";
+                            this.$router.push("/materialApplication");
+                        }
+                    });
+                }
+            });
+        },
+        downloadExcel(){
+            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"
+                            "验收清单" + ".xlsx"
+                        );
+                    } else {
+                        /* 火狐谷歌的文件下载方式 */
+                        var blob = new Blob([res.data]);
+                        var downloadElement = document.createElement("a");
+                        var href = window.URL.createObjectURL(blob);
+                        downloadElement.href = href;
+                        downloadElement.download = "验收清单" + ".xlsx";
+                        document.body.appendChild(downloadElement);
+                        downloadElement.click();
+                        document.body.removeChild(downloadElement);
+                        window.URL.revokeObjectURL(href);
+                    }
+                });
+        },
+        closedia() {
+            this.infolist = {};
+
+            this.ysListDialogStatus = false;
+            this.feedbackListDialogStatus = false;
+        },
+
+        getUser() {
+            this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+        },
+        uploadBack(v) {
+            this.attList = v;
+        },
+
+        // getList() {
+        //     this.$http({
+        //         url: "/market/cadvBusiMetirialWo/getInitiateInitialization",
+        //         method: "post",
+        //         headers: {
+        //             "Content-Type": "application/json"
+        //         },
+        //         data: {}
+        //     }).then(res => {
+        //     });
+        // }
+    },
+    mounted() {
+        if (JSON.stringify(this.$route.query) != "{}") {
+            this.params.cityWoId = this.$route.query.cityWoId;
+            this.params.countyWoId = this.$route.query.countyWoId;
+            this.params.woId = this.$route.query.woId;
+        }
+        // this.getList(this.params);
+        this.getUser();
+    },
+    watch: {
+        $route() {
+            // this.getList(this.params);
+        }
+    },
+    created() {}
+};
+</script>
+<style scoped lang="scss">
+a {
+    text-decoration: none;
+    color: #169bd5;
+    cursor: pointer;
+}
+.img-box {
+    height: calc(100vh - 240px);
+    overflow-y: scroll;
+
+    .boximg {
+        display: flex;
+        flex-wrap: wrap;
+        margin-top: 20px;
+
+        div {
+            display: inline-block;
+            width: 18%;
+            margin-right: 2%;
+            margin-bottom: 20px;
+            overflow: hidden;
+            border: 1px solid #ddd;
+            border-radius: 3px;
+            background: #fff;
+            position: relative;
+            height: 100px;
+
+            img {
+                width: 100%;
+                position: absolute;
+                top: 0;
+                bottom: 0;
+                margin: auto;
+                // height: 100%;
+            }
+        }
+    }
+}
+
+.boximgc {
+    display: flex;
+    flex-wrap: wrap;
+    width: calc(100% - 80px) !important;
+    margin-left: 80px;
+
+    div {
+        display: inline-block;
+        width: 18% !important;
+        margin-right: 2%;
+        margin-bottom: 20px;
+        overflow: hidden;
+        border: 1px solid #ddd;
+        border-radius: 3px;
+        background: #fff;
+        position: relative;
+        height: 100px;
+
+        img {
+            width: 100%;
+            position: absolute;
+            top: 0;
+            bottom: 0;
+            margin: auto;
+            // height: 100%;
+        }
+    }
+}
+
+.typebox {
+    div {
+        border: 1px solid #ddd;
+        border-top: transparent;
+
+        span {
+            display: inline-block;
+            width: 20%;
+            line-height: 30px;
+            padding: 10px;
+            vertical-align: top;
+        }
+
+        .big {
+            width: 35%;
+            // background: #f4f4f4;
+        }
+
+        .small {
+            width: 5%;
+            text-align: center;
+            // border-right: 1px solid #ddd;
+        }
+
+        .gys {
+            width: 40%;
+        }
+    }
+}
+
+.t-footer {
+    text-align: center;
+    padding-right: 20px;
+    margin-top: 20px;
+}
+.t-footer1 {
+    padding-right: 0;
+    margin-top: 80px;
+}
+.onetab {
+    padding: 20px;
+    height: calc(100% - 180px);
+}
+
+.titbox {
+    div {
+        float: right;
+
+        i {
+            font-size: 22px;
+            margin-left: 20px;
+            cursor: pointer;
+        }
+    }
+}
+
+.tabbox {
+    margin-top: 15px;
+}
+
+.pageBox {
+    text-align: right;
+    margin-top: 10px;
+}
+
+.info-line {
+    width: 100%;
+    display: block;
+    // padding-left: 20px;
+
+    div {
+        width: 60%;
+        display: inline-block;
+    }
+
+    span {
+        width: 80px;
+        display: inline-block;
+        text-align: left;
+
+        i {
+            color: red;
+            display: inline-block;
+            padding-right: 5px;
+        }
+    }
+
+    .el-select,
+    .el-input {
+        width: calc(100% - 100px);
+    }
+
+    .el-checkbox-group {
+        border: 1px solid #ddd;
+        padding-left: 20px;
+        height: 40px;
+        width: calc(100% - 100px);
+        border-radius: 5px;
+    }
+}
+
+.online {
+    width: 100%;
+
+    .el-select {
+        width: calc(100% - 100px);
+    }
+
+    span {
+        vertical-align: top;
+    }
+
+    .el-textarea {
+        width: 60%;
+    }
+}
+
+.section2 {
+    display: flex;
+    align-items: center;
+    margin-bottom: 20px;
+    button {
+        margin-bottom: 0 !important;
+    }
+    h3 {
+        margin-right: 40px;
+    }
+}
+/deep/.online .el-form-item__content {
+    width: 100%;
+    margin-left: 0 !important;
+}
+
+/deep/.el-upload {
+    width: 100% !important;
+    padding: 0 !important;
+}
+.el-row {
+    margin: 0 !important;
+}
+.tree {
+    width: calc(50% - 60px) !important;
+    display: inline-block;
+    margin-right: 20px;
+    height: 300px;
+    overflow-y: scroll;
+
+    .el-icon-error {
+        float: right;
+        font-size: 20px;
+        margin-top: 9px;
+        cursor: pointer;
+    }
+}
+
+.treeUser {
+    margin: 0;
+    border: 1px solid #ddd;
+
+    p {
+        background: #f4f4f4;
+        padding: 0 20px;
+        margin-bottom: 5px;
+    }
+}
+
+.treeUserb {
+    width: calc(100% - 100px);
+    border: 1px solid #ddd;
+    background: #f4f4f4;
+    border-radius: 3px;
+    height: auto;
+    overflow: hidden;
+
+    p {
+        display: inline-block;
+        padding: 0 20px;
+        margin-bottom: 5px;
+    }
+}
+/deep/.container .el-upload-dragger {
+    height: 120px !important;
+}
+.upload-demo {
+    width: 60% !important;
+}
+</style>

+ 689 - 0
src/pages/main/advertising/acceptanceSituation.vue

@@ -0,0 +1,689 @@
+<template>
+    <fullscreen :fullscreen.sync="fullscreen" class="container">
+        <div class="container-box">
+            <div class="section2">
+                <el-button
+                    type="primary"
+                    @click="dialogApplication(1)"
+                    style="width: 100px;margin-right: 20px;margin-bottom: 20px;"
+                    v-if="companyFlag == 0"
+                    >审批</el-button
+                >
+                <el-button
+                    type="primary"
+                    @click="dialogApplication(2)"
+                    style="width: 100px;margin-right: 20px;margin-bottom: 20px;"
+                    v-if="companyFlag == 1 && isSubmitBtnShow"
+                    >提交</el-button
+                >
+                <el-button
+                    type="primary"
+                    @click="dialogApplication(3)"
+                    style="width: 100px;margin-right: 20px;margin-bottom: 20px;"
+                    v-if="companyFlag == 1"
+                    >发货回执</el-button
+                >
+            </div>
+            <div class="tabbox">
+                <el-table
+                    height="calc(100% - 40px)"
+                    class="com-table"
+                    ref="multipleTable"
+                    :data="tableData"
+                    tooltip-effect="dark"
+                    size="small"
+                    border
+                    style="width: 100%"
+                    v-loading="loading"
+                    @selection-change="tableSelectionChange"
+                >
+
+                    <!-- <el-table-column type="selection" width="55" v-if="companyFlag == 0" :selectable="selectable">
+                    </el-table-column> -->
+                    <el-table-column prop="countryName" label="区县名称">
+                    </el-table-column>
+                    <el-table-column prop="nextOpName" label="验收人">
+                    </el-table-column>
+                    <el-table-column prop="optime" label="验收时间">
+                    </el-table-column>
+                    <el-table-column prop="remark" label="验收说明">
+                    </el-table-column>
+                    
+                    <el-table-column label="附件" align="center">
+                        <template slot-scope="scope">
+                            <a
+                                style="width: 70px; display: inline-block; color:#169BD5; cursor:pointer"
+                                @click="applicationCli(1, scope.row)"
+                                >导出</a
+                            >
+                            <a
+                                style="width: 70px; display: inline-block; color:#169BD5; cursor:pointer"
+                                @click="applicationCli(2, scope.row)"
+                                v-if="companyFlag == 1 && scope.row.sts == 3 && isSubmitBtnShow"
+                                >打回</a
+                            >
+                        </template>
+                    </el-table-column>
+                </el-table>
+                <el-pagination
+                    class="pageBox"
+                    @current-change="currchange"
+                    layout="prev, pager, next"
+                    background
+                    :total="total"
+                >
+                </el-pagination>
+            </div>
+        </div>
+        <el-dialog
+            :title="titname"
+            :visible.sync="approvalDialogStatus"
+            width="30%"
+            :destroy-on-close="true"
+            :modal-append-to-body="false"
+            :close-on-click-modal="false"
+            :before-close="closedia"
+        >
+            <div v-loading="loadinged">
+                <el-form
+                    :model="approvalinfolist"
+                    ref="approvalinfolist"
+                    :rules="rules"
+                >
+                    <el-form-item
+                        class="info-line online"
+                        style="margin-left: 10%"
+                    >
+                        <el-radio-group v-model="approvalinfolist.opinionradio">
+                            <el-radio :label="1">同意</el-radio>
+                            <el-radio :label="2">打回</el-radio>
+                        </el-radio-group>
+                    </el-form-item>
+                    <!-- <el-form-item
+                        class="info-line online"
+                        style="text-align: center"
+                    >
+                        <el-input
+                            v-model="approvalinfolist.opinion"
+                            placeholder="审批意见"
+                            type="textarea"
+                            :rows="2"
+                        ></el-input>
+                    </el-form-item> -->
+                </el-form>
+
+                <div slot="footer" class="dialog-footer myfooter">
+                    <el-button @click="closedia">取 消</el-button>
+                    <el-button type="primary" @click="dialogCli(1)"
+                        >确 定</el-button
+                    >
+                </div>
+            </div>
+        </el-dialog>
+        
+        <el-dialog
+            title="发货回执"
+            :visible.sync="feedbackDialogStatus"
+            width="30%"
+            :destroy-on-close="true"
+            :modal-append-to-body="false"
+            :close-on-click-modal="false"
+            :before-close="closedia"
+        >
+            <div v-loading="loadinged">
+                <el-form
+                    :model="approvalinfolist"
+                    ref="approvalinfolist"
+                    :rules="rules"
+                >
+                    <el-form-item class="info-line online" style="text-align: center">
+                        <span>发货回执</span>
+                        <el-input
+                            v-model="feedbackInfo"
+                            placeholder="发货回执"
+                            type="textarea"
+                            :rows="2"
+                        ></el-input>
+                    </el-form-item>
+                </el-form>
+
+                <div slot="footer" class="dialog-footer myfooter">
+                    <el-button @click="closedia">取 消</el-button>
+                    <el-button type="primary" @click="dialogCli(3)">确 定</el-button>
+                    
+                </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"
+            :centerDialogVisible="centerDialogVisible"
+            v-if="centerDialogVisible"
+        ></myMessage>
+    </fullscreen>
+</template>
+<script>
+import mySearch from "../../../components/search.vue";
+import myMessage from "../../../components/myMessage.vue";
+import toolList from "../../../components/toolList";
+import myUpload from "../../../components/upload";
+import uploadDown from "../../../components/uploadDown";
+import { MessageBox } from "element-ui";
+
+export default {
+    components: {
+        mySearch,
+        myMessage,
+        toolList,
+        myUpload,
+        uploadDown,
+        MessageBox
+    },
+    data() {
+        const regionName = (rule, value, callback) => {
+            if (!this.infolist.regionName) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const advTypeDesc = (rule, value, callback) => {
+            if (!this.infolist.advTypeDesc) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        return {
+            loginNo: JSON.parse(sessionStorage.userInfo).loginNo,
+            rules: {
+                regionName: [
+                    {
+                        required: true,
+                        trigger: "change",
+                        validator: regionName
+                    }
+                ],
+                advTypeDesc: [
+                    {
+                        required: true,
+                        trigger: "change",
+                        validator: advTypeDesc
+                    }
+                ]
+            },
+            searchList: [
+                // {
+                //     type: 'input',
+                //     tit: '物料名称',
+                //     value: '',
+                //     width: '48%',
+                // },
+                {
+                    type: "sel",
+                    tit: "物料类别",
+                    value: "",
+                    width: "98%",
+                    options: []
+                }
+                // {
+                //     type: 'input',
+                //     tit: '地市名称',
+                //     value: '',
+                //     width: '98%',
+                // },
+            ],
+            tooltit: "物料申请审核",
+            fullscreen: false,
+            total: 0,
+            pageSize: 1,
+            tableData: [],
+            dialogStatus: false,
+            disableStatus: false,
+            applicationDialogStatus: false,
+            titname: "",
+            infolist: {},
+            approvalinfolist: {
+                opinionradio: 1
+            },
+            userInfo: {},
+            params: {},
+            centerDialogVisible: false,
+            messTit: "",
+            delid: "",
+            loading: false,
+            loadinged: false,
+            fileInfo: {
+                limit: 10,
+                url: "/market/cwo/upload",
+                fileList: []
+            },
+            infoApply: {},
+            rovaList: [],
+            woNoArr: [],
+            feedbackDialogStatus: false,
+            feedbackInfo: "",
+            datalist: {
+                url: "/market/cadvBusiMetirialWo/checkExport",
+                type: 2
+            },
+            attStatus: false,
+            companyFlag: "",
+            isSubmitBtnShow: false,
+            step: {},
+            passedList:[],
+            approvalDialogStatus: false,
+            yzInfo:{}
+        };
+    },
+    methods: {
+        tableSelectionChange(val, row) {
+            this.multipleSelection = val;
+        },
+        selectable(row, index){
+            if(row.sts == 4){
+                return false
+            }else{
+                return true
+            }
+        },
+        closedia() {
+            this.infolist = {};
+            this.dialogStatus = false;
+            this.applicationDialogStatus = false;
+            this.approvalinfolist = {};
+            this.feedbackDialogStatus = false;
+            this.approvalDialogStatus = false;
+            this.approvalinfolist.opinionradio = "1";
+            this.attStatus = false;
+        },
+        //获取列表
+        getList(v, n) {
+            this.pageSize = n;
+            let _this = this;
+            // this.loading = true;
+            this.tableData = [];
+            // v.assigneeNo = this.loginNo;
+            this.$http({
+                url:
+                    "/market/advSubtask/queryCountry",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                    page: '{"pageNo":"' + n + '","pageSize":"10"}'
+                },
+                data: v
+            }).then(res => {
+                this.tableData = res.data.body.pageList;
+                this.companyFlag = res.data.body.companyFlag
+                this.total = res.data.totalRecord;
+                this.loading = false;
+                // this.tableData.forEach(item => {
+                //     if(item.sts == 3){
+
+                //     }
+                // });
+                let finishData = []
+                finishData = this.tableData.filter(item=>{
+                    // if(this.params.pcId == 1 && this.companyFlag == 1){
+                    //     return item.sts == 3
+                    // }else if(this.params.pcId == 2 || this.params.pcId == 3){
+                    //     return item.sts == 4
+                    // } 
+                    return item.sts == 3    
+                })
+
+                if(this.tableData.length == finishData.length){
+                    this.isSubmitBtnShow = true
+                }
+
+            }); 
+        },
+        // 分页
+        currchange(v) {
+            this.pageSize = v;
+            this.getList(this.params, this.pageSize);
+        },
+        // 审批/提交
+        dialogApplication(v){
+            if(v === 1){
+
+                //批量,复选框提示
+                // if (this.multipleSelection == undefined ||this.multipleSelection == "") 
+                // {
+
+                //     MessageBox.alert("请至少选择一条进行审批", "温馨提示", {
+                //         confirmButtonText: "确定"
+                //     });
+                // } else 
+                // {
+                //     this.titname = "审批";
+                //     this.approvalDialogStatus = true;
+                // }
+
+                this.titname = "审批";
+                this.approvalDialogStatus = true;
+
+            }else if(v === 2){
+                let info = {};
+                // info.id = this.params.countyWoId;
+                info.id = this.params.cityWoId;
+                info.woId = this.params.woId;
+                this.submitInfo("/market/cadvBusiMetirialWo/ystj", info);
+
+            }else if(v===3){
+                this.feedbackDialogStatus = true;
+            }
+        },
+        // 导出/打回
+        applicationCli(v, n){
+            if(v === 1){
+                this.attStatus = true;
+                this.datalist.attList = JSON.parse(n.attList);
+            }else if(v === 2){
+                let info = {};
+                // info.id = this.params.countyWoId;
+                info.id = n.id;
+                info.woId = this.params.woId;
+                this.submitInfo("/market/cadvBusiMetirialWo/dh", info);
+            }
+        },
+        //省审批验收
+        dialogCli(v) {
+            if(v === 1){
+                // this.yzInfo.mkAdvBusiMetirialWoCountryList = this.multipleSelection;
+
+                    this.yzInfo.mkAdvBusiMetirialWoCountryList = this.tableData;
+                    this.yzInfo.woId = this.params.woId;
+                
+                //同意
+                if (this.approvalinfolist.opinionradio == 1) {
+                    this.yzInfo.sts = "1";
+                    
+                    this.submitInfo(
+                        "/market/cadvBusiMetirialWo/provYsdh",this.yzInfo
+                        );
+                    this.approvalDialogStatus = false;
+
+                } //驳回
+                else if (this.approvalinfolist.opinionradio == 2) {
+                    
+                    this.yzInfo.sts = "2";
+                    this.submitInfo(
+                        "/market/cadvBusiMetirialWo/provYsdh",this.yzInfo
+                        );
+                    this.approvalDialogStatus = false;
+                }
+            }else if (v === 3) {
+                this.feedbackDialogStatus = false;
+                let feedback = {};
+                feedback.receipt = this.feedbackInfo;
+                feedback.id = this.params.cityWoId;
+
+                this.submitInfo("market/advSubtask/deliveryReceipt", feedback);
+            }
+        },
+        submitInfo(u, v) {
+            let _this = this;
+            this.$http({
+                url: u,
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json"
+                },
+                data: v
+            }).then(res => {
+                if (res.data.result === 1) {
+                    _this.$message({
+                        message: res.data.desc,
+                        type: "error"
+                    });
+                } else if (res.data.result === 2) {
+                    _this.$message({
+                        message: res.data.desc,
+                        type: "error"
+                    });
+                } else {
+                    _this.$message({
+                        message: "成功",
+                        type: "success"
+                    });
+                    _this.getList(this.params, this.pageSize);
+                    _this.$router.push("/materialApplication");
+                    // this.isSubmitBtnShow = false;
+                }
+            });
+        },
+        closeMessage(v) {
+            this.centerDialogVisible = false;
+            let _this = this;
+            if (v === 1) {
+                _this
+                    .$http({
+                        url: "/bpm/api/deleteBpmPrePlugin",
+                        method: "post",
+                        headers: {
+                            "Content-Type": "application/json"
+                        },
+                        data: {
+                            id: this.delid
+                        }
+                    })
+                    .then(res => {
+                        if (res.data.result === 1) {
+                            _this.$message({
+                                message: res.data.desc,
+                                type: "error"
+                            });
+                        } else {
+                            _this.$message({
+                                message: "删除成功",
+                                type: "success"
+                            });
+                            _this.getList(this.params, this.pageSize);
+                        }
+                    });
+            }
+        },
+        //删除
+        delLine(v) {
+            this.centerDialogVisible = true;
+            this.messTit = "即将删除此条数据, 是否删除?";
+            this.delid = v.id;
+        },
+        //文件返回值
+        uploadBack(v) {
+        },
+        //功能栏
+        iconCli(v) {
+            if (v === 1) {
+                this.getList(this.params, this.pageSize);
+            }
+            if (v === 2) {
+                this.fullscreen = !this.fullscreen;
+            }
+        },
+        getUser() {
+            this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+        }
+    },
+    mounted() {
+        //地址栏不带参
+        // if (JSON.stringify(this.$route.params) != "{}") {
+        //     this.params.cityWoId = this.$route.params.cityWoId;
+        //     this.params.countyWoId = this.$route.params.countyWoId;
+        //     this.params.woId = this.$route.params.woId;
+        //     this.params.pcId = this.$route.params.pcId;
+        // }
+        //地址栏带参
+        // if (JSON.stringify(this.$route.query) != "{}") {
+        //     this.params.cityWoId = this.$route.query.cityWoId;
+        //     this.params.countyWoId = this.$route.query.countyWoId;
+        //     this.params.woId = this.$route.query.woId;
+        //     this.params.pcId = this.$route.query.pcId;
+        // }
+        this.getList(this.params, 1);
+        this.getUser();
+
+        let jumpParams = JSON.parse(sessionStorage.getItem("jumpParams"))
+        this.params.cityWoId = jumpParams.cityWoId;
+        this.params.countyWoId = jumpParams.countyWoId;
+        this.params.woId = jumpParams.woId;
+        this.params.pcId = jumpParams.pcId;
+    },
+    watch: {
+        $route() {
+            this.getList(this.params, 1);
+        }
+    },
+    created() {}
+};
+</script>
+<style scoped lang="scss">
+.onetab {
+    margin-bottom: 20px;
+    padding: 0 20px;
+}
+
+.titbox {
+    div {
+        float: right;
+
+        i {
+            font-size: 22px;
+            margin-left: 20px;
+            cursor: pointer;
+        }
+    }
+}
+
+.tabbox {
+    margin-top: 15px;
+}
+
+.pageBox {
+    text-align: right;
+    margin-top: 10px;
+}
+
+.info-line {
+    width: 100%;
+    display: block;
+    padding-left: 20px;
+
+    div {
+        width: 50%;
+        display: inline-block;
+    }
+
+    span {
+        width: 80px;
+        display: inline-block;
+        text-align: left;
+
+        i {
+            color: red;
+            display: inline-block;
+            padding-right: 5px;
+        }
+    }
+
+    .el-select,
+    .el-input {
+        width: calc(100% - 100px);
+    }
+}
+
+.online {
+    width: 100%;
+
+    .el-select {
+        width: calc(100% - 100px);
+    }
+
+    span {
+        vertical-align: top;
+    }
+
+    .el-textarea {
+        width: calc(100% - 100px);
+    }
+}
+.adv-type {
+    margin-top: 20px;
+    display: flex;
+    justify-content: space-between;
+    flex-wrap: wrap;
+    // border: 1px solid #ddd;
+    border-radius: 5px;
+    padding: 20px;
+    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+    div {
+        width: 33%;
+        text-align: center;
+        height: 80px;
+        overflow: hidden;
+        min-width: 100px;
+        cursor: pointer;
+        padding-top: 10px;
+        margin: 10px 0;
+    }
+    div:hover {
+        background: #cfe8fc;
+        border-radius: 5px;
+    }
+    span {
+        width: 100%;
+        display: inline-block;
+        height: 40px;
+        // line-height: 40px;
+        i {
+            color: #0074d9;
+            font-size: 36px;
+        }
+    }
+}
+.section2 {
+    display: flex;
+    align-items: center;
+    margin: 40px 0;
+    button {
+        margin-bottom: 0 !important;
+    }
+    h3 {
+        margin-right: 40px;
+    }
+}
+</style>

文件差異過大導致無法顯示
+ 1211 - 1130
src/pages/main/advertising/businessHall.vue


+ 22 - 22
src/pages/main/advertising/contractCap.vue

@@ -12,6 +12,7 @@
                     size="medium"
                     type="primary"
                     @click="dialogCheck(3)"
+                    v-if="userInfo.countyName == null && userInfo.cityName != null"
                     >添加
                 </el-button>
             </div>
@@ -109,7 +110,7 @@
         <el-dialog
             :title="titname"
             :visible.sync="dialogStatus"
-            width="50%"
+            width="40%"
             :destroy-on-close="true"
             :modal-append-to-body="false"
             :close-on-click-modal="false"
@@ -117,8 +118,8 @@
         >
             <div v-loading="loadinged">
                 <el-form :model="infolist" ref="infolist" :rules="rules">
-                    <div class="info-line">
-                        <el-form-item prop="regionCode">
+                    <div class="info-line" style="width: 50%; margin: 0 auto;">
+                        <!-- <el-form-item prop="regionCode">
                             <span>地市名称</span>
                             <el-select
                                 :popper-append-to-body="false"
@@ -135,15 +136,15 @@
                                 >
                                 </el-option>
                             </el-select>
-                        </el-form-item>
-                        <el-form-item prop="secbuyPreAccount">
+                        </el-form-item> -->
+                        <el-form-item prop="secbuyPreAccount" style="width: 100%;">
                             <span>二采预算总额</span>
                             <el-input
                                 v-model="infolist.secbuyPreAccount"
                                 placeholder="二采预算总额"
                             ></el-input>
                         </el-form-item>
-                        <el-form-item prop="secbuyLastAccount">
+                        <el-form-item prop="secbuyLastAccount" style="width: 100%;">
                             <span>二采剩余预算</span>
                             <el-input
                                 v-model="infolist.secbuyLastAccount"
@@ -151,14 +152,14 @@
                                 :disabled="secbuyLastDisableStatus"
                             ></el-input>
                         </el-form-item>
-                        <el-form-item prop="secbuySchedule">
+                        <!-- <el-form-item prop="secbuySchedule">
                             <span>使用进度</span>
                             <el-input
-                                v-model="secbuySchedule"
+                                v-model="infolist.secbuySchedule"
                                 placeholder="使用进度"
                                 disabled
                             ></el-input>
-                        </el-form-item>
+                        </el-form-item> -->
                         <!-- <el-form-item prop="secbuyCostAccount">
                             <span>二采使用</span>
                             <el-input v-model="infolist.secbuyCostAccount" placeholder="二采累计使用" disabled></el-input>
@@ -196,12 +197,14 @@
 import mySearch from "../../../components/search.vue";
 import myMessage from "../../../components/myMessage.vue";
 import toolList from "../../../components/toolList";
+import { MessageBox } from "element-ui";
 
 export default {
     components: {
         mySearch,
         myMessage,
-        toolList
+        toolList,
+        MessageBox
     },
     data() {
         const regionCode = (rule, value, callback) => {
@@ -293,14 +296,14 @@ export default {
         };
     },
     computed: {
-        secbuySchedule: function() {
-            this.infolist.secbuySchedule = (this.infolist.secbuyPreAccount - this.infolist.secbuyLastAccount) / this.infolist.secbuyPreAccount;
-            this.infolist.secbuySchedule = parseFloat(this.infolist.secbuySchedule).toFixed(2);
-            if(isNaN(this.infolist.secbuySchedule)){
-                this.infolist.secbuySchedule = ''
-            }
-            return this.infolist.secbuySchedule;
-        }
+        // secbuySchedule: function() {
+        //     this.infolist.secbuySchedule = (this.infolist.secbuyPreAccount - this.infolist.secbuyLastAccount) / this.infolist.secbuyPreAccount;
+        //     this.infolist.secbuySchedule = ((parseFloat(this.infolist.secbuySchedule)*100).toFixed(2));
+        //     if(isNaN(this.infolist.secbuySchedule)){
+        //         this.infolist.secbuySchedule = ''
+        //     }
+        //     return this.infolist.secbuySchedule;
+        // }
     },
     methods: {
         closedia() {
@@ -395,6 +398,7 @@ export default {
                 );
                 this.infolist.areaCode = this.areaCode;
                 this.infolist.areaName = this.areaName;
+                
                 if (this.titname === "添加") {
                     this.submitInfo("/market/cadvContract/add");
                 } else if (this.titname === "编辑") {
@@ -481,7 +485,6 @@ export default {
         },
         //文件返回值
         uploadBack(v) {
-            console.log(v);
         },
         //功能栏
         iconCli(v) {
@@ -526,7 +529,6 @@ export default {
         },
         getUser() {
             this.userInfo = JSON.parse(window.sessionStorage.userInfo);
-            console.log(this.userInfo);
             this.$http({
                 url: "/sysmgr/regionComp/queryList",
                 method: "post",
@@ -538,12 +540,10 @@ export default {
                 }
             }).then(res => {
                 // this.regionOpt = res.data;
-                // console.log(res.data);
                 if (
                     this.userInfo.countyName == null && this.userInfo.cityName == null
                 ) {
                     this.regionOpt = res.data;
-                    console.log(res.data);
                 } else if (this.userInfo.countyName == null && this.userInfo.cityName != null) {
                     this.regionOpt = res.data.filter(item => {
                         return item.compName == this.userInfo.cityName;

+ 43 - 14
src/pages/main/advertising/materialApplication.vue

@@ -36,9 +36,10 @@
                             <!-- <el-button size="mini" type="primary" @click="dialogCheck(2,scope.row)">修改</el-button> -->
                             <el-button size="mini" type="primary" @click="jump(2, scope.row)">查看</el-button>
                             <!-- <el-button size="mini" type="primary" @click="jump(1, scope.row)" v-if="loginNoStr == scope.row.nextOpNo && scope.row.woSts == 0">审批</el-button>                             -->
-                           <el-button size="mini" type="primary" @click="jump(1, scope.row)" v-if="loginNoStr == scope.row.nextOpNo">审批</el-button> 
-                            <el-button size="mini" type="primary" @click="jump(3, scope.row)" v-if="(scope.row.provinceCity == 1 && scope.row.nextStep ==7) || (scope.row.provinceCity == 2 && scope.row.nextStep == 11)">子任务列表</el-button>
-                            <el-button size="mini" type="danger" @click="delLine(scope.row)" v-if="loginNoStr == scope.row.opNo && ((scope.row.provinceCity == 1 && scope.row.nextStep <= 7) || (scope.row.provinceCity == 2 && scope.row.nextStep <= 11))">删除</el-button>
+                           <el-button size="mini" type="primary" @click="jump(1, scope.row)" v-if="(loginNoStr == scope.row.nextOpNo && ((scope.row.provinceCity == 1 && scope.row.nextStep != 12) || (scope.row.provinceCity == 2 && scope.row.nextStep != 10) || (scope.row.provinceCity == 3 && scope.row.nextStep != 11))) && (scope.row.sts != 2 && scope.row.sts != 3)">审批</el-button> 
+                            <el-button size="mini" type="primary" @click="jump(3, scope.row)" v-if="(loginNoStr == scope.row.nextOpNo && ((scope.row.provinceCity == 1 && scope.row.nextStep ==7) || (scope.row.provinceCity == 1 && scope.row.nextStep ==11) || (scope.row.provinceCity == 2 && scope.row.nextStep == 9) || (scope.row.provinceCity == 3 && scope.row.nextStep == 10))) && (scope.row.sts != 3)">子任务列表</el-button>
+                            <el-button size="mini" type="danger" @click="delLine(scope.row)" v-if="(loginNoStr == scope.row.opNo && ((scope.row.provinceCity == 1 && scope.row.nextStep <= 7) || (scope.row.provinceCity == 2 && scope.row.nextStep <= 10) || (scope.row.provinceCity == 3 && scope.row.nextStep <= 11)) && (scope.row.sts != 3))">删除</el-button>
+                            <el-button size="mini" type="primary" @click="jump(4, scope.row)" v-if="((scope.row.provinceCity == 1 && scope.row.nextStep == 12) || (scope.row.provinceCity == 2 && scope.row.nextStep == 10) || (scope.row.provinceCity == 3 && scope.row.nextStep == 11)) && scope.row.countrySts != 3">验收</el-button>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -194,6 +195,7 @@
     import myMessage from "../../../components/myMessage.vue"
     import toolList from '../../../components/toolList'
 	import myUpload from '../../../components/upload'
+    
 
     export default {
         components: {
@@ -296,8 +298,9 @@
                     opinionradio: 1
                 },
                 stsArr: ['待审批','待确认','待验收','已完成'],
-                provinceCityArr:['省',"地市"],
+                provinceCityArr:['省',"地市","区县"],
                 loginNoStr: "",
+                cityWoId: "",
             }
         },
         methods: {
@@ -308,15 +311,45 @@
 				this.setabList('物料宣传申请','/materialApplicationadd');
 			},
             jump(v, n){
-                // console.log(v.id);
                 if(v === 1){
-                    this.$router.push("/materialApplicationExa?id="+ n.id + "")
+                    // this.$router.push("/materialApplicationExa?id=" + n.id + "");
+                    this.$router.push({
+                                path: '/materialApplicationExa',
+                                query: {id: n.id, btnS: 1}
+                        })
+                    
                 }else if(v === 2){
                     this.$router.push("/materialApplicationDetail?id="+ n.id + "")
                 }else if(v === 3){
-                    this.$router.push("/subtaskList?id="+ n.id + "")
+                    if(n.provinceCity == 1 && n.nextStep ==7){
+                        let jumpParams = {cityWoId: n.cityWoId, countyWoId: n.countryWoId, woId: n.id, pcId: n.provinceCity};
+
+                        sessionStorage.setItem("jumpParams", JSON.stringify(jumpParams))
+                        this.$router.push({
+                                path: '/subtaskList',
+                                // query: { cityWoId: n.cityWoId, countyWoId: n.countryWoId, woId: n.id, }
+                                // path: '/subtaskList/:name',
+                                // name: 'subtaskList',
+                                // params: { cityWoId: n.cityWoId, countyWoId: n.countryWoId, woId: n.id, }
+                        })
+                        
+                    } else if((n.provinceCity == 1 && n.nextStep ==11) || (n.provinceCity == 2 && n.nextStep == 9) || (n.provinceCity == 3 && n.nextStep == 10)){
+                        this.$router.push({
+                                path: '/acceptanceSituation',
+                                query: { cityWoId: n.cityWoId, countyWoId: n.countryWoId, woId: n.id, pcId: n.provinceCity}
+
+                                // path: '/acceptanceSituation/:name',
+                                // name: 'acceptanceSituation',
+                                // params: { cityWoId: n.cityWoId, countyWoId: n.countryWoId, woId: n.id, pcId: n.provinceCity}
+                            })
+                    }
+                }else if(v === 4){
+                    // this.$router.push("/acceptance?cityWoId="+ n.cityWoId + "&countyWoId=" + n.countryWoId)
+                    this.$router.push({
+                                path: '/acceptance',
+                                query: { cityWoId: n.cityWoId, countyWoId: n.countryWoId, woId: n.id }
+                        })
                 }
-                
             },
             setabList(n, p) {
             	let params = {
@@ -354,11 +387,11 @@
                 }
                 timeFrom ? this.params.opTimeFrom = timeFrom : '';
                 timeTo ? this.params.opTimeTo = timeTo : '';
-                // console.log(this.params);
                 this.getList(this.params, this.pageSize);
             },
             //获取列表
             getList(v, n) {
+                
                 this.pageSize = n;
                 let _this = this;
                 this.loading = true;
@@ -373,8 +406,8 @@
                     data: v,
                 }).then((res) => {
                     this.tableData = res.data.body.pageList.data;
-                    console.log(res.data.body);
                     // this.total = res.data.totalRecord;
+                    
                     this.loading = false;
 
                 });
@@ -397,7 +430,6 @@
                     this.titname = '审批';
                     this.disableStatus = false;
                 }
-            //    console.log(n.woNo);
 				this.$http({
 				    url: '/bpm/api/taskInit',
 				    method: "post",
@@ -408,10 +440,8 @@
 				        woNo: n.woNo
 				    },
 				}).then((res) => {
-                    // console.log(res.data);
 
 				    this.infolist = Object.assign({}, res.data);
-                    // console.log(JSON.parse(this.infolist.params.wo));
 				    this.infoApply = JSON.parse(this.infolist.params.wo);
 
 					this.rovaList = res.data.taskList;
@@ -445,7 +475,6 @@
                 }
             },
             submitInfo(u) {
-                // console.log(this.infolist);
                 let _this = this;
                 //this.$refs.infolist.validate(valid => {
                     //if (valid) {

+ 227 - 61
src/pages/main/advertising/materialApplicationDetail.vue

@@ -3,10 +3,90 @@
         <div class="container-box">
             <toolList @iconCli="iconCli" :tooltit="tooltit"></toolList>
             <div class="search">
-                <mySearch
-                    :searchList="searchList"
-                    @searchInfo="searchInfo"
-                ></mySearch>
+                <el-form
+                :model="searchSection"
+                ref="searchSection"
+                :rules="rules"
+                v-loading="loadinged"
+            >
+                <div class="info-line search-box">    
+                    <el-form-item prop="regionCode">
+                        <span>地市名称</span>
+                        <el-select
+                            @change="changeSearch(1)"
+                            clearable
+                            v-model="searchSection.regionCode"
+                            placeholder="地市名称"
+                            @clear="clearSearch"
+                        >
+                            <el-option
+                                v-for="item in regionOpt"
+                                :key="item.compId"
+                                :label="item.compName"
+                                :value="item.compId"
+                            >
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item prop="countyCode">
+                        <span>区县名称</span>
+                        <el-select
+                            :popper-append-to-body="false"
+                            v-model="searchSection.countyCode"
+                            placeholder="区县名称"
+                            @change="changeSearch(2, $event)"
+                            clearable
+                        >
+                            <el-option
+                                v-for="item in countyOpt"
+                                :key="item.compId"
+                                :label="item.compName"
+                                :value="item.compId"
+                            >
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                     <el-form-item prop="metirialType">
+                        <span>物料类别</span>
+                        <el-select
+                            @change="changeSearch(3)"
+                            clearable
+                            v-model="searchSection.metirialType"
+                            placeholder="物料类别"
+                        >
+                            <el-option
+                                v-for="(items, index) in metirialTypeOpt"
+                                :key="index"
+                                :label="items"
+                                :value="items"
+                            >
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                   <el-form-item prop="stsId">
+                        <span>状态</span>
+                        <el-select
+                            @change="changeSearch(4)"
+                            clearable
+                            v-model="searchSection.stsId"
+                            placeholder="状态"
+                        >
+                            <el-option
+                                v-for="(items) in stsOpt"
+                                :key="items.stsId"
+                                :label="items.stsName"
+                                :value="items.stsId"
+                            >
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-button class="btn-check" size="medium" type="primary" plain icon="el-icon-search" @click="searchCli">搜索
+                </el-button>
+                </div>
+
+            </el-form>
+        
+            
             </div>
             <div class="section2">
                 <el-button
@@ -315,9 +395,9 @@ export default {
             depttype: 0,
             // 固定审批人员
             fixedDialogStatus: false,
-            userListOpt: [],
+            // userListOpt: [],
             cMkAdvMetirialWoInfoSubmit: {},
-            stsArr: ["待审批", "审批通过", "打回"],
+            stsArr: ["待审批", "审批通过", "打回", "待确认"],
             // 分发
             distributionDialogStatus: false,
             distributionRegionOpt: [],
@@ -327,7 +407,35 @@ export default {
                 url: "/market/cadvBusiMetirialWo/checkExport",
                 type: 2
             },
-            attStatus: false
+            attStatus: false,
+            stsOpt:[
+                {
+                    stsId: 0,
+                    stsName: "待审批",
+                },
+                {
+                    stsId: 1,
+                    stsName: "审批通过",
+                },
+                {
+                    stsId: 2,
+                    stsName: "打回",
+                }
+                ,
+                {
+                    stsId: 3,
+                    stsName: "待确认",
+                },
+                {
+                    stsId: 4,
+                    stsName: "已结束",
+                }
+            ],
+            //搜索
+            searchSection:{}, //搜索list
+            regionOpt:[],
+            countyOpt:[],
+            metirialTypeOpt:[],
         };
     },
     computed: {
@@ -358,12 +466,10 @@ export default {
         tableSelectionChange(val, row) {
             this.multipleSelection = val;
 
-            // console.log(val);
             // this.woNoArr=[]
             // this.multipleSelection.forEach(item => {
             //     this.woNoArr.push(item.woNo)
             // });
-            // console.log(this.multipleSelection);
         },
         closedia() {
             this.infolist = {};
@@ -374,12 +480,66 @@ export default {
             this.distributionDialogStatus = false;
             this.attStatus = false;
         },
+        
+        changeSearch(v, e) {
+            if (v === 1) {
+                this.searchSection.countyCode = ""
+                let regionSingle = this.regionOpt.filter(item=>{
+                    return item.compId == this.searchSection.regionCode
+                })
+                
+                this.$http({
+                    url: "/sysmgr/regionComp/queryList",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json"
+                    },
+                    data: {
+                        parentCompId: regionSingle[0].compId,
+                    }
+                }).then(res => {
+                    this.countyOpt = res.data;
+                    
+                });
+                
+            }else if(v===2){
+                this.searchSection.countyCode = e;
+                this.$forceUpdate();    
+            }
+            
+        },
+        clearSearch(){
+            this.params.metirialType = '';
+            
+            this.searchSection.regionCode ? this.params.regionCode = this.searchSection.regionCode : '';
+            this.searchSection.countyCode ? this.params.countyCode = this.searchSection.countyCode : '';
+            this.params.woSts = this.searchSection.stsId
+        },
+        //获取地市(搜索)
+        getRegion() {
+            this.$http({
+                url: "/sysmgr/regionComp/queryList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json"
+                },
+                data: {
+                    parentCompId: "0"
+                }
+            }).then(res => {
+                this.regionOpt = res.data;
+            });
+        },
         //搜索数据
-        searchInfo(v) {
-            this.params = {};
-            // v[0] ? this.params.metirialName = v[0] : '';
-            v[0] ? (this.params.regionName = v[0]) : "";
-            v[2] ? (this.params.metirialType = v[2]) : "";
+        searchCli(){
+            this.params = {}
+
+            this.searchSection.regionCode ? this.params.regionCode = this.searchSection.regionCode : '';
+            this.searchSection.countyCode ? this.params.countyCode = this.searchSection.countyCode : '';
+            this.searchSection.metirialType ? this.params.metirialType = this.searchSection.metirialType : '';
+            this.params.woSts = this.searchSection.stsId;
+            this.params.woId = this.$route.query.id;
+
             this.getList(this.params, this.pageSize);
         },
         //获取列表
@@ -398,30 +558,23 @@ export default {
                 },
                 data: v
             }).then(res => {
-                // console.log(res.data);
-                this.tableData = res.data.body.pageList.data;
-                this.userListOpt =
-                    res.data.body.queryCurrentAndNext.next.userList;
+                this.tableData = res.data.body.pageList;
+                // this.userListOpt =
+                //     res.data.body.step.next.userList;
                 this.total = res.data.totalRecord;
                 this.wo = res.data.body.wo;
                 this.datalist.attList = JSON.parse(this.wo.fileUrl);
-
-                this.searchList[0].options = [];
-                this.searchList[1].options = [];
-                this.searchList[2].options = [];
-                this.searchList[3].options = [];
                 
-            // Array.from(new Set(arr))
-                let temp = [];
+
+                let mOpt = []
                 this.tableData.forEach(item=>{
-                    temp.push({dataCode: item.metirialType, dataName: item.metirialType});
+                    mOpt.push(item.metirialType)
                 });
-                let map = new Map();
-                this.searchList[2].options =  temp.filter((temp) => !map.has(temp.metirialType) && map.set(temp.metirialType, 1));
-                // console.log(this.tableData);
+                this.metirialTypeOpt = Array.from(new Set(mOpt))
                 this.loading = false;
             });
         },
+        
         // 分页
         currchange(v) {
             this.pageSize = v;
@@ -449,9 +602,8 @@ export default {
                     headers: {
                         "Content-Type": "application/json"
                     },
-                    data: { mKAdvBusiMetirialWoStep: this.params.woId }
+                    data: { woId: this.params.woId }
                 }).then(res => {
-                    console.log(res.data);
                     this.rovaList = res.data;
                 });
             } else if (v === 3) {
@@ -493,36 +645,35 @@ export default {
         },
         //添加
         dialogCli(v) {
-            // 1审批 2审批轨迹 3导出 4供应商 5任务分发
-            if (v === 1) {
-                this.approvalDialogStatus = false;
-                // let list = {};
-                this.cMkAdvMetirialWoInfoSubmit.mkAdvBusiMetirialWoInfoList = this.multipleSelection;
-                this.cMkAdvMetirialWoInfoSubmit.woId = this.params.woId;
-                this.cMkAdvMetirialWoInfoSubmit.remark = this.approvalinfolist.opinion;
-                if (this.approvalinfolist.opinionradio == 1) {
-                    this.cMkAdvMetirialWoInfoSubmit.woSts = "1";
-                    // console.log(list);
-                    if (this.userListOpt == null) {
-                        // 树形审批人
-                        this.checkexa = true;
-                    } else {
-                        // 固定审批人弹窗
-                        this.fixedDialogStatus = true;
-                    }
-                    // this.submitInfo("/market/cadvBusiMetirialWo/submitWo", list);
-                } else if (this.approvalinfolist.opinionradio == 2) {
-                    this.cMkAdvMetirialWoInfoSubmit.woSts = "2";
-                    this.checkexa = false;
-                    this.fixedDialogStatus = false;
+            //2审批轨迹 3导出 
+            // if (v === 1) {
+            //     this.approvalDialogStatus = false;
+            //     // let list = {};
+            //     this.cMkAdvMetirialWoInfoSubmit.mkAdvBusiMetirialWoInfoList = this.multipleSelection;
+            //     this.cMkAdvMetirialWoInfoSubmit.woId = this.params.woId;
+            //     this.cMkAdvMetirialWoInfoSubmit.remark = this.approvalinfolist.opinion;
+            //     if (this.approvalinfolist.opinionradio == 1) {
+            //         this.cMkAdvMetirialWoInfoSubmit.woSts = "1";
+            //         if (this.userListOpt == null) {
+            //             // 树形审批人
+            //             this.checkexa = true;
+            //         } else {
+            //             // 固定审批人弹窗
+            //             this.fixedDialogStatus = true;
+            //         }
+            //         // this.submitInfo("/market/cadvBusiMetirialWo/submitWo", list);
+            //     } else if (this.approvalinfolist.opinionradio == 2) {
+            //         this.cMkAdvMetirialWoInfoSubmit.woSts = "2";
+            //         this.checkexa = false;
+            //         this.fixedDialogStatus = false;
 
-                    console.log(this.cMkAdvMetirialWoInfoSubmit);
-                    this.submitInfo(
-                        "/market/cadvBusiMetirialWo/submitWo",
-                        this.cMkAdvMetirialWoInfoSubmit
-                    );
-                }
-            } else if (v === 2) {
+            //         this.submitInfo(
+            //             "/market/cadvBusiMetirialWo/submitWo",
+            //             this.cMkAdvMetirialWoInfoSubmit
+            //         );
+            //     }
+            // } else 
+            if (v === 2) {
                 this.approvalStepDialogStatus = false;
             } else if (v === 3) {
                 //
@@ -599,7 +750,6 @@ export default {
         },
         //文件返回值
         uploadBack(v) {
-            // console.log(v);
         },
         //功能栏
         iconCli(v) {
@@ -620,6 +770,7 @@ export default {
         }
         this.getList(this.params, 1);
         this.getUser();
+        this.getRegion();
     },
     watch: {
         $route() {
@@ -699,6 +850,21 @@ export default {
         width: calc(100% - 100px);
     }
 }
+.search{
+    width: 100%;
+    display: unset;
+    margin-top: 20px;
+}
+.search-box{
+    margin-top: 40px;
+    div{
+        width: 20%
+    }
+    .el-form{
+        width: 100%;
+    }
+
+}
 .adv-type {
     margin-top: 20px;
     display: flex;

+ 264 - 187
src/pages/main/advertising/materialApplicationExa.vue

@@ -3,30 +3,98 @@
         <div class="container-box">
             <toolList @iconCli="iconCli" :tooltit="tooltit"></toolList>
             <div class="search">
-                <mySearch
-                    :searchList="searchList"
-                    @searchInfo="searchInfo"
-                ></mySearch>
+                <el-form
+                :model="searchSection"
+                ref="searchSection"
+                :rules="rules"
+                v-loading="loadinged"
+            >
+                <div class="info-line search-box">    
+                    <el-form-item prop="regionCode">
+                        <span>地市名称</span>
+                        <el-select
+                            @change="changeSearch(1)"
+                            clearable
+                            v-model="searchSection.regionCode"
+                            placeholder="地市名称"
+                            @clear="clearSearch"
+                        >
+                            <el-option
+                                v-for="item in regionOpt"
+                                :key="item.compId"
+                                :label="item.compName"
+                                :value="item.compId"
+                            >
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item prop="countyCode">
+                        <span>区县名称</span>
+                        <el-select
+                            :popper-append-to-body="false"
+                            v-model="searchSection.countyCode"
+                            placeholder="区县名称"
+                            @change="changeSearch(2, $event)"
+                            clearable
+                        >
+                            <el-option
+                                v-for="item in countyOpt"
+                                :key="item.compId"
+                                :label="item.compName"
+                                :value="item.compId"
+                            >
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                     <el-form-item prop="metirialType">
+                        <span>物料类别</span>
+                        <el-select
+                            @change="changeSearch(3)"
+                            clearable
+                            v-model="searchSection.metirialType"
+                            placeholder="物料类别"
+                        >
+                            <el-option
+                                v-for="(items, index) in metirialTypeOpt"
+                                :key="index"
+                                :label="items"
+                                :value="items"
+                            >
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-button class="btn-check" size="medium" type="primary" plain icon="el-icon-search" @click="searchCli">搜索
+                </el-button>
+                </div>
+
+            </el-form>
+        
+            
             </div>
             <div class="section2">
                 <el-button
                     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)"
+                    v-if="
+                        (wo.provinceCity == 1 && wo.nextStep != 7 && wo.nextStep != 11) ||
+                            (wo.provinceCity == 2 && wo.nextStep != 9) ||
+                            (wo.provinceCity == 3 && wo.nextStep != 10)
+                    "
                     >审批</el-button
                 >
                 <el-button
                     type="primary"
                     @click="dialogApplication(2)"
                     style="margin-right: 20px;margin-bottom: 20px;"
+                    v-if="isBtnShow"
                     >审批轨迹</el-button
                 >
                 <el-button
                     type="primary"
                     @click="dialogApplication(3)"
                     style="margin-right: 20px;margin-bottom: 20px;"
-                    >导出</el-button
+                >导出</el-button
                 >
                 <el-button
                     type="primary"
@@ -34,30 +102,28 @@
                     style="margin-right: 20px;margin-bottom: 20px;"
                     v-if="
                         (step.serialNum == 3 && step.provinceCity == 1) ||
-                            (step.serialNum == 6 && step.provinceCity == 2)
+                            (step.serialNum == 5 && step.provinceCity == 2) ||
+                            (step.serialNum == 6 && step.provinceCity == 3)
                     "
-                    >供应商</el-button
+                >供应商</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)
+                        (((step.serialNum == 7 || step.serialNum == 11) && step.provinceCity == 1) ||
+                            (step.serialNum == 9 && step.provinceCity == 2) ||
+                            (step.serialNum == 10 && step.provinceCity == 3)) && isBtnShow
                     "
-                    >任务分发</el-button
+                >任务分发</el-button
                 >
-<<<<<<< HEAD
                 <a
                     style="margin-right:50px; color:#169BD5; cursor:pointer"
                     @click="attStatus = true"
                     v-if="wo.fileUrl != null"
-                    >下载附件</a
+                >下载附件</a
                 >
-=======
-                <a style="margin-right:50px; color:#169BD5; cursor:pointer" @click="attStatus = true;">下载附件</a>
->>>>>>> 3467b0ae790b859d7d683f21ae7570080f5a5210
 
                 <h3>预计总金额:{{ amountsum }}</h3>
                 <h3>总数: {{ countsum }}</h3>
@@ -120,8 +186,8 @@
                             <div>
                                 {{
                                     scope.row.quantity *
-                                        scope.row.price *
-                                        scope.row.coefficient
+                                    scope.row.price *
+                                    scope.row.coefficient
                                 }}
                             </div>
                         </template>
@@ -129,7 +195,7 @@
                     <el-table-column
                         prop="supplierName"
                         label="供应商"
-                        v-if="infolist.name != null"
+                        v-if="(infolist.name != null) || isSupplierShow"
                     >
                     </el-table-column>
                 </el-table>
@@ -184,7 +250,7 @@
                 <div slot="footer" class="dialog-footer myfooter">
                     <el-button @click="closedia">取 消</el-button>
                     <el-button type="primary" @click="dialogCli(1)"
-                        >确 定</el-button
+                    >确 定</el-button
                     >
                 </div>
             </div>
@@ -273,7 +339,7 @@
 
                 <div class="t-footer">
                     <el-button type="primary" @click="dialogCli(4)"
-                        >确 定</el-button
+                    >确 定</el-button
                     >
                     <el-button @click="closedia">取 消</el-button>
                 </div>
@@ -303,7 +369,6 @@
                                 v-model="infolist.distributionChoose"
                                 placeholder="任务分发"
                             >
-<<<<<<< HEAD
                                 <el-option
                                     v-for="(items,
                                     index) in distributionRegionOpt"
@@ -340,18 +405,10 @@
                         </el-form-item>
                     </div>
                 </el-form>
-=======
-                            </el-option>
-                        </el-select>
-                    </el-form-item>
-
-                </div>
-            </el-form>
->>>>>>> 3467b0ae790b859d7d683f21ae7570080f5a5210
 
                 <div class="t-footer">
                     <el-button type="primary" @click="dialogCli(5)"
-                        >确 定</el-button
+                    >确 定</el-button
                     >
                     <el-button @click="closedia">取 消</el-button>
                 </div>
@@ -397,10 +454,10 @@
 
                 <div class="t-footer">
                     <el-button type="primary" @click="dialogCli(6)"
-                        >确 定</el-button
+                    >确 定</el-button
                     >
                     <el-button @click="fixedDialogStatus = false"
-                        >取 消</el-button
+                    >取 消</el-button
                     >
                 </div>
             </div>
@@ -444,16 +501,12 @@
                     style="text-align: right;padding-bottom: 20px;"
                 >
                     <el-button type="primary" @click="dialogCli(7)"
-                        >确 定</el-button
+                    >确 定</el-button
                     >
                     <el-button @click="closedia">取 消</el-button>
                 </div>
             </div>
         </el-dialog>
-<<<<<<< HEAD
-=======
-
->>>>>>> 3467b0ae790b859d7d683f21ae7570080f5a5210
         <el-dialog
             title="附件"
             :visible.sync="attStatus"
@@ -466,7 +519,6 @@
             <div slot="title">
                 <div>
                     附件
-<<<<<<< HEAD
                     <i
                         class="el-icon-full-screen"
                         style="float: right; margin-right: 30px"
@@ -476,23 +528,11 @@
                             }
                         "
                     ></i>
-=======
-                    <i class="el-icon-full-screen" style="float: right; margin-right: 30px" @click="
-                () => {
-                  fullscreen = !fullscreen;
-                }"></i>
->>>>>>> 3467b0ae790b859d7d683f21ae7570080f5a5210
                 </div>
             </div>
             <div v-loading="loadinged">
                 <div style="margin: 10px 0">
-<<<<<<< HEAD
                     <uploadDown :datalist="datalist"></uploadDown>
-=======
-                    <uploadDown
-                        :datalist="datalist"
-                    ></uploadDown>
->>>>>>> 3467b0ae790b859d7d683f21ae7570080f5a5210
                 </div>
                 <div class="dialog-footer myfooter">
                     <el-button @click="attStatus = false">取 消</el-button>
@@ -511,32 +551,21 @@
 import mySearch from "../../../components/search.vue";
 import myMessage from "../../../components/myMessage.vue";
 import toolList from "../../../components/toolList";
-<<<<<<< HEAD
 import myUpload from "../../../components/upload";
 import deptTreeOnly from "../../../components/deptTreeOnly.vue";
 import { MessageBox } from "element-ui";
 import { Loading } from "element-ui";
-=======
-// import myUpload from "../../../components/upload";
-// import deptTreeOnly from "../../../components/deptTreeOnly.vue";
-// import { MessageBox } from "element-ui";
->>>>>>> 3467b0ae790b859d7d683f21ae7570080f5a5210
 import uploadDown from "../../../components/uploadDown";
 
 export default {
     components: {
         mySearch,
         myMessage,
-        // deptTreeOnly,
-        // MessageBox,
+        deptTreeOnly,
+        MessageBox,
         toolList,
-<<<<<<< HEAD
         myUpload,
         uploadDown
-=======
-        // myUpload,
-        uploadDown,
->>>>>>> 3467b0ae790b859d7d683f21ae7570080f5a5210
     },
     data() {
         const regionName = (rule, value, callback) => {
@@ -571,35 +600,7 @@ export default {
                     }
                 ]
             },
-            searchList: [
-                {
-                    type: "sel",
-                    tit: "地市",
-                    value: "",
-                    width: "32%",
-                    options: []
-                },
-                {
-                    type: "sel",
-                    tit: "区县",
-                    value: "",
-                    width: "32%",
-                    options: []
-                },
-                {
-                    type: "sel",
-                    tit: "物料类别",
-                    value: "",
-                    width: "32%",
-                    options: []
-                }
-                // {
-                //     type: 'input',
-                //     tit: '地市名称',
-                //     value: '',
-                //     width: '98%',
-                // },
-            ],
+            
             tooltit: "物料申请审核",
             fullscreen: false,
             total: 0,
@@ -646,8 +647,7 @@ export default {
             fixedDialogStatus: false,
             userListOpt: [],
             cMkAdvMetirialWoInfoSubmit: {},
-            stsArr: ["待审批", "审批通过", "打回"],
-<<<<<<< HEAD
+            stsArr: ["待审批", "审批通过", "打回", "待确认", "已结束"],
             // 分发
             distributionDialogStatus: false,
             distributionRegionOpt: [],
@@ -660,15 +660,37 @@ export default {
             attStatus: false,
             step: {},
             passedList:[],
-            multipleSelection:[]
-=======
-            wo:{},
-            datalist: {
-                url: "/market/cadvBusiMetirialWo/checkExport",
-                type: 2,
-            },
-            attStatus: false,
->>>>>>> 3467b0ae790b859d7d683f21ae7570080f5a5210
+            multipleSelection:[],
+            searchSection: {},
+            regionOpt:[],
+            countyOpt:[],
+            metirialTypeOpt:[],
+            compId:"0",
+            stsOpt:[
+                {
+                    stsId: 0,
+                    stsName: "待审批",
+                },
+                {
+                    stsId: 1,
+                    stsName: "审批通过",
+                },
+                {
+                    stsId: 2,
+                    stsName: "打回",
+                }
+                ,
+                {
+                    stsId: 3,
+                    stsName: "待确认",
+                },
+                {
+                    stsId: 4,
+                    stsName: "已结束",
+                }
+            ],
+            isSupplierShow: false,
+            isBtnShow: false,
         };
     },
     computed: {
@@ -698,34 +720,72 @@ export default {
     methods: {
         tableSelectionChange(val, row) {
             this.multipleSelection = val;
-            console.log(this.multipleSelection);
-            // console.log(val);
             // this.woNoArr=[]
             // this.multipleSelection.forEach(item => {
             //     this.woNoArr.push(item.woNo)
             // });
-            // console.log(this.multipleSelection);
         },
         closedia() {
             this.infolist = {};
+            this.searchSection={};
+            // this.approvalinfolist.opinionradio = "1";
+            // this.approvalinfolist.opinion = "";
             this.dialogStatus = false;
             this.approvalDialogStatus = false;
-            this.approvalinfolist = {};
+            // this.approvalinfolist = {};
             this.supplierDialogStatus = false;
             this.approvalStepDialogStatus = false;
-<<<<<<< HEAD
             this.distributionDialogStatus = false;
-=======
->>>>>>> 3467b0ae790b859d7d683f21ae7570080f5a5210
             this.attStatus = false;
+            this.fixedDialogStatus = false;
+            this.checkexa = false;
+
+            this.approvalinfolist.opinion = "";
+            this.approvalinfolist.opinionradio = 1;
+            
         },
-        //搜索数据
-        searchInfo(v) {
-            // this.params = {};
-            // v[0] ? this.params.metirialName = v[0] : '';
-            v[2] ? (this.params.metirialType = v[2]) : "";
-            // this.params.woId
-            this.getList(this.params, this.pageSize);
+        changeSearch(v, e) {
+            if (v === 1) {
+                this.searchSection.countyCode = ""
+                let regionSingle = this.regionOpt.filter(item=>{
+                    return item.compId == this.searchSection.regionCode
+                })
+                
+                this.$http({
+                    url: "/sysmgr/regionComp/queryList",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json"
+                    },
+                    data: {
+                        parentCompId: regionSingle[0].compId,
+                    }
+                }).then(res => {
+                    this.countyOpt = res.data;
+                });
+                
+            }else if(v===2){
+                this.searchSection.countyCode = e;
+                this.$forceUpdate();    
+            }
+            
+        },
+        clearSearch(){
+        },
+        //获取地市(搜索)
+        getRegion() {
+            this.$http({
+                url: "/sysmgr/regionComp/queryList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json"
+                },
+                data: {
+                    parentCompId: "0"
+                }
+            }).then(res => {
+                this.regionOpt = res.data;
+            });
         },
         //获取列表
         getList(v, n) {
@@ -743,45 +803,51 @@ export default {
                 },
                 data: v
             }).then(res => {
-<<<<<<< HEAD
-                // console.log(res.data.body);
                 // this.tableData = res.data.body.pageList.data;
-                res.data.body.pageList.data.forEach(item=>{
+                res.data.body.pageList.forEach(item=>{
+                    
+                    
                     if (item.woSts == '0') {
                         this.tableData.push(item);
                     } else if (item.woSts == '1') {
                         this.passedList.push(item);
                     }
+                    if(item.supplierName != null){
+                         this.isSupplierShow = true;
+                    }
                 });
                 this.userListOpt =
-                    res.data.body.queryCurrentAndNext.next.userList;
+                    res.data.body.step.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 = [];
+
+                // this.searchSection[2].options = [];
                 // Array.from(new Set(arr))
                 let temp = [];
                 this.tableData.forEach(item=>{
-                    temp.push({dataCode: item.metirialType, dataName: item.metirialType});
+                    temp.push(item.metirialType);
                 });
                 let map = new Map();
-                this.searchList[2].options =  temp.filter((temp) => !map.has(temp.metirialType) && map.set(temp.metirialType, 1));
-                
-                
-                
-=======
-                // console.log(res.data);
-                this.tableData = res.data.body.pageList.data;
-                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);
->>>>>>> 3467b0ae790b859d7d683f21ae7570080f5a5210
+                this.metirialTypeOpt =  temp.filter((temp) => !map.has(temp.metirialType) && map.set(temp.metirialType, 1));
+
+
+                this.params.regionCode = ""
                 this.loading = false;
-                
+
             });
         },
+        searchCli(){
+            this.params = {}
+
+            this.searchSection.regionCode ? this.params.regionCode = this.searchSection.regionCode : '';
+            this.searchSection.countyCode ? this.params.countyCode = this.searchSection.countyCode : '';
+            this.searchSection.metirialType ? this.params.metirialType = this.searchSection.metirialType : '';
+            this.params.woId = this.$route.query.id;
+
+            this.getList(this.params, this.pageSize);
+        },
         // 分页
         currchange(v) {
             this.pageSize = v;
@@ -792,48 +858,44 @@ export default {
         dialogApplication(v, n) {
             var _this = this;
             // 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 {
-                    if ((this.step.serialNum == 3 &&this.step.provinceCity == 1) ||(this.step.serialNum == 6 &&this.step.provinceCity == 2)) {
+                    if ((this.step.serialNum == 3 &&this.step.provinceCity == 1) ||(this.step.serialNum == 5 && this.step.provinceCity == 2)||(this.step.serialNum == 6 && this.step.provinceCity == 3)) {
                         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;
+                                "请先选择供应商再进行审批",
+                                "温馨提示",
+                                {
+                                    confirmButtonText: "确定"
+                                }
+                            );
+                            return;
                         }else{
                             this.titname = "审批";
                             this.approvalDialogStatus = true;
                         }
-                            
-                        
                     }else{
                             this.titname = "审批";
                             this.approvalDialogStatus = true;
                         }
-                    
                 }
             } else if (v === 2) {
                 // if (
@@ -856,16 +918,13 @@ export default {
                         headers: {
                             "Content-Type": "application/json"
                         },
-                        data: { mKAdvBusiMetirialWoStep: this.params.woId }
-                    }).then(res => {
-                        console.log(res);
-                    });
-<<<<<<< HEAD
+                        data: { woId: this.params.woId }
+                }).then(res => {
+                    this.rovaList = res.data;
+                });
                 // }
-=======
-                }
->>>>>>> 3467b0ae790b859d7d683f21ae7570080f5a5210
             } else if (v === 3) {
+                //导出
                 this.$http({
                     url: "/market/cadvBusiMetirialWo/export",
                     method: "post",
@@ -877,11 +936,7 @@ export default {
                 }).then(res => {
                     if (window.navigator && window.navigator.msSaveOrOpenBlob) {
                         let blob = new Blob([res.data], {
-<<<<<<< HEAD
                             type: "application/vnd.ms-excel"
-=======
-                            type: "application/vnd.ms-excel",
->>>>>>> 3467b0ae790b859d7d683f21ae7570080f5a5210
                         });
                         window.navigator.msSaveOrOpenBlob(
                             blob,
@@ -927,11 +982,20 @@ export default {
             } else if (v === 5) {
                 this.titname = "任务分发";
                 this.distributionDialogStatus = true;
-                let regionArr = [];
+                if(this.step.serialNum == 7 && this.step.provinceCity == 1){
+                    let regionArr = [];
                 this.tableData.forEach(item => {
                     regionArr.push(item.regionName);
                 });
                 this.distributionRegionOpt = [...new Set(regionArr)];
+                } else if((this.step.serialNum == 11 && this.step.provinceCity == 1)||(this.step.serialNum == 9 && this.step.provinceCity == 2)||(this.step.serialNum == 10 && this.step.provinceCity == 3)){
+                    let countyArr = [];
+                    this.tableData.forEach(item => {
+                        countyArr.push(item.countyName);
+                    });
+                    this.distributionRegionOpt = [...new Set(countyArr)];
+                }
+
             }
         },
 
@@ -941,7 +1005,7 @@ export default {
         //添加
         dialogCli(v) {
             this.dialogStatus = false;
-            // 1审批 2审批轨迹 3导出 4供应商 5任务分发 8附件
+            // 1审批 2审批轨迹 4供应商 5任务分发
             if (v === 1) {
                 this.approvalDialogStatus = false;
                 // let list = {};
@@ -950,7 +1014,6 @@ export default {
                 this.cMkAdvMetirialWoInfoSubmit.remark = this.approvalinfolist.opinion;
                 if (this.approvalinfolist.opinionradio == 1) {
                     this.cMkAdvMetirialWoInfoSubmit.woSts = "1";
-                    // console.log(list);
                     if (this.userListOpt == null) {
                         // 树形审批人
                         this.checkexa = true;
@@ -969,13 +1032,12 @@ export default {
                                 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.opinionradio = 1;
                                 this.approvalinfolist.opinion = "";
                             }else{
                                 this.fixedDialogStatus = true;
@@ -1004,13 +1066,12 @@ export default {
                                     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.opinionradio = 1;
                                     this.approvalinfolist.opinion = "";
                                 }else{
                                     this.fixedDialogStatus = true;
@@ -1021,7 +1082,6 @@ export default {
                         this.checkexa = false;
                         this.fixedDialogStatus = false;
 
-                        console.log(this.cMkAdvMetirialWoInfoSubmit);
                         this.submitInfo(
                             "/market/cadvBusiMetirialWo/submitWo",
                             this.cMkAdvMetirialWoInfoSubmit
@@ -1030,8 +1090,7 @@ export default {
                 }
             } else if (v === 2) {
                 this.approvalStepDialogStatus = false;
-            } else if (v === 3) {
-            } else if (v === 4) {
+            }else if (v === 4) {
                 this.supplierDialogStatus = false;
                 let supplierChoose = this.supplierOpt.filter(item => {
                     return item.name == this.infolist.name;
@@ -1044,23 +1103,17 @@ export default {
                 });
                 // this.multipleSelection.supplierName = supplierChoose[0].name;
                 // this.multipleSelection.supplierCode = supplierChoose[0].code;
-                // console.log(this.multipleSelection);
             } else if (v === 5) {
-<<<<<<< HEAD
                 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) {
-=======
-            }else if (v === 6) {
->>>>>>> 3467b0ae790b859d7d683f21ae7570080f5a5210
                 let userListSingle = "";
                 userListSingle = this.userListOpt.filter(item => {
                     return item.loginNameStr == this.infolist.loginNameStr;
@@ -1072,26 +1125,23 @@ export default {
                     userListSingle[0].loginNameStr;
                 this.fixedDialogStatus = false;
 
-                console.log(this.cMkAdvMetirialWoInfoSubmit);
                 this.submitInfo(
                     "/market/cadvBusiMetirialWo/submitWo",
                     this.cMkAdvMetirialWoInfoSubmit
                 );
                 userListSingle = "";
-                this.approvalinfolist.opinionradio = "1";
+                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;
-                // console.log(this.cMkAdvMetirialWoInfoSubmit);
                 this.checkexa = false;
                 this.submitInfo(
                     "/market/cadvBusiMetirialWo/submitWo",
                     this.cMkAdvMetirialWoInfoSubmit
                 );
                 this.treeListonly = {};
-                this.approvalinfolist.opinionradio = "1";
+                this.approvalinfolist.opinionradio = 1;
                 this.approvalinfolist.opinion = "";
             }
         },
@@ -1127,13 +1177,17 @@ export default {
 
 
                     if (this.tableData.length == this.multipleSelection.length) {
-                        this.$router.push("/materialApplication")
+                        this.$router.push("/materialApplication");
+                        return;
                     }
                     this.treeListonly = {}
                     this.infolist.distributionChoose = "";
                     _this.getList(this.params, this.pageSize);
                 }
                 // this.loading = false;
+                this.treeListonly = {};
+                this.approvalinfolist.opinionradio = 1;
+                this.approvalinfolist.opinion = "";
 
             });
         },
@@ -1176,7 +1230,6 @@ export default {
         },
         //文件返回值
         uploadBack(v) {
-            // console.log(v);
         },
         //功能栏
         iconCli(v) {
@@ -1194,9 +1247,18 @@ export default {
     mounted() {
         if (JSON.stringify(this.$route.query) != "{}") {
             this.params.woId = this.$route.query.id;
+            this.params.btnS = this.$route.query.btnS;
+            if(this.params.btnS == 1){
+                //确认结果路由
+                this.isBtnShow = true
+            }else if(this.params.btnS == 2){
+                //确认结果路由
+                this.isBtnShow = false
+            }
         }
         this.getList(this.params, 1);
         this.getUser();
+        this.getRegion();
     },
     watch: {
         $route() {
@@ -1276,6 +1338,21 @@ export default {
         width: calc(100% - 100px);
     }
 }
+.search{
+    width: 100%;
+    display: unset;
+    margin-top: 20px;
+}
+.search-box{
+    margin-top: 40px;
+    div{
+        width: 20%
+    }
+    .el-form{
+        width: 100%;
+    }
+
+}
 .adv-type {
     margin-top: 20px;
     display: flex;

+ 110 - 86
src/pages/main/advertising/materialApplicationadd.vue

@@ -413,6 +413,15 @@
         >
             <div v-loading="loadinged">
                 <el-form :model="infolist" ref="infolist" :rules="rules">
+                    <!-- <el-form-item
+                        class="info-line online"
+                        v-if="companyFlag == 1"
+                    >   
+                        <el-radio-group v-model="approvalDirection">
+                            <el-radio :label="1">区县市场部主任,区县总经理</el-radio>
+                            <el-radio :label="2">需求部门领导</el-radio>
+                        </el-radio-group>
+                    </el-form-item> -->
                     <el-form-item prop="visiblec" class="info-line online">
                         <span>审批人员</span>
                         <deptTreeOnly
@@ -433,6 +442,8 @@
                             </p>
                         </div>
                     </el-form-item>
+                    
+                    
                 </el-form>
 
                 <div
@@ -446,23 +457,25 @@
                 </div>
             </div>
         </el-dialog>
-        <myMessage
+        <!-- <myMessage
             :messTit="messTit"
             @closeMessage="closeMessage(1)"
             :centerDialogVisible="centerDialogVisible"
             v-if="centerDialogVisible"
-        ></myMessage>
+        ></myMessage> -->
     </div>
 </template>
 <script>
 import mySearch from "../../../components/search.vue";
 import myUpload from "../../../components/upload.vue";
 import deptTreeOnly from "../../../components/deptTreeOnly.vue";
+import myMessage from "../../../components/myMessage.vue";
 import { MessageBox } from "element-ui";
 
 export default {
     components: {
         mySearch,
+        myMessage,
         myUpload,
         deptTreeOnly,
         MessageBox
@@ -475,14 +488,14 @@ export default {
                 callback();
             }
         };
-        const orderCycleArr = (rule, value, callback) => {
-            if (this.infolist.orderCycleArr &&
-                this.infolist.orderCycleArr.length == 0) {
-                callback(new Error("不能为空"));
-            } else {
-                callback();
-            }
-        };
+        // const orderCycleArr = (rule, value, callback) => {
+        //     if (this.infolist.orderCycleArr &&
+        //         this.infolist.orderCycleArr.length == 0) {
+        //         callback(new Error("不能为空"));
+        //     } else {
+        //         callback();
+        //     }
+        // };
         const sceneName = (rule, value, callback) => {
             if (!this.infolist.sceneName) {
                 callback(new Error("不能为空"));
@@ -549,8 +562,8 @@ export default {
                         type: "array",
                         required: true,
                         trigger: "blur",
-                        validator: orderCycleArr
-                        // message: "不能为空"
+                        // validator: orderCycleArr
+                        message: "不能为空"
                     }
                 ],
                 sceneName: [
@@ -660,7 +673,8 @@ export default {
             fixedDialogStatus: false,
             userListOpt: [],
             list: {},
-            companyFlag: ""
+            companyFlag: "",
+            // approvalDirection: 1,
         };
     },
     computed: {
@@ -733,7 +747,6 @@ export default {
                         metirialType: this.infolist.metirialType
                     }
                 }).then(res => {
-                    console.log(res);
                     this.metirialOpt = res.data;
                 });
             } else if (v == 3) {
@@ -883,7 +896,6 @@ export default {
                     info.regionCodePks = this.infolist.regionCode.join(",");
                     info.countyCodePks = this.infolist.countyCode.join(",");
 
-                    console.log(info);
                     this.$http({
                         url: "/market/advBusiMetirial/queryList",
                         method: "post",
@@ -904,7 +916,6 @@ export default {
                         //     };
                         //     this.infomaterType = opt;
                         // } else {
-                            // console.log(res.data);
                             this.infomaterType = res.data;
 
                             this.infomaterType.forEach(item => {
@@ -918,13 +929,6 @@ export default {
                 }
             });
         },
-        // //选择供应商类型
-        // suppliercheck() {
-        //     this.infolist.supplier = [];
-        //     this.infolist.supplier = this.objcenter;
-        //     this.suppliersts = false;
-        // },
-
         //添加
         dialogCli(v) {
             this.$refs.infolist.validate(valid => {
@@ -1000,9 +1004,10 @@ export default {
 
                 this.submitInfo("/market/cadvBusiMetirialWo/add", this.list);
             } else if (v === 2) {
+
                 this.list.nextOpNo = this.treeListonly.leaderAuditNo;
                 this.list.nextOpName = this.treeListonly.leaderAuditName;
-                // console.log(this.list);
+                // this.list.typeNum = this.approvalDirection;
 
                 this.checkexa = false;
                 this.submitInfo("/market/cadvBusiMetirialWo/add", this.list);
@@ -1014,9 +1019,8 @@ export default {
         },
         submitInfo(u, v) {
             let _this = this;
-            // console.log("2222");
-            // this.$refs.infolist.validate(valid => {
-            //     if (valid) {
+            this.$refs.infolist.validate(valid => {
+                if (valid) {
                     this.loadinged = true;
                     this.$http({
                         url: u,
@@ -1052,8 +1056,8 @@ export default {
                         }
                         this.loadinged = false;
                     });
-                // }
-            // });
+                }
+            });
         },
         closedia() {
             this.infolist = {};
@@ -1083,41 +1087,62 @@ export default {
         },
         //删除
         delLine(v) {
-            this.centerDialogVisible = true;
-            this.messTit = "即将删除此条数据, 是否删除?";
-            this.delid = v.id;
-        },
-        closeMessage(v) {
-            this.centerDialogVisible = false;
-            let _this = this;
-            if (v === 1) {
-                _this
-                    .$http({
-                        url: "/market/cadvContract/del",
-                        method: "post",
-                        headers: {
-                            "Content-Type": "application/json"
-                        },
-                        data: {
-                            id: this.delid
-                        }
+            // this.centerDialogVisible = true;
+            // this.messTit = "即将删除此条数据, 是否删除?";
+            // this.delid = v.id;
+
+            MessageBox.confirm(
+                "确定删除选中项?","温馨提示", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: '取消'
+                }).then(() => {
+                    this.infomaterType = this.infomaterType.filter(item=>{
+                        return item.id != v.id
                     })
-                    .then(res => {
-                        if (res.data.result === 1) {
-                            _this.$message({
-                                message: res.data.desc,
-                                type: "error"
-                            });
-                        } else {
-                            _this.$message({
-                                message: "删除成功",
-                                type: "success"
-                            });
-                            _this.getList(this.params, this.pageSize);
-                        }
-                    });
-            }
+                    this.$message({
+                        type: 'info',
+                        message: '删除成功'
+                    })
+                })
+                .catch(action => {
+                    // this.$message({
+                    // type: 'info',
+                    // message: '取消按钮点击'
+                    // })
+                });
+                
         },
+        // closeMessage(v) {
+        //     this.centerDialogVisible = false;
+        //     let _this = this;
+        //     if (v === 1) {
+        //         _this
+        //             .$http({
+        //                 url: "/market/advBusiMetirial/del",
+        //                 method: "post",
+        //                 headers: {
+        //                     "Content-Type": "application/json"
+        //                 },
+        //                 data: {
+        //                     id: this.delid
+        //                 }
+        //             })
+        //             .then(res => {
+        //                 if (res.data.result === 1) {
+        //                     _this.$message({
+        //                         message: res.data.desc,
+        //                         type: "error"
+        //                     });
+        //                 } else {
+        //                     _this.$message({
+        //                         message: "删除成功",
+        //                         type: "success"
+        //                     });
+        //                     _this.getList();
+        //                 }
+        //             });
+        //     }
+        // },
         getUser() {
             this.userInfo = JSON.parse(window.sessionStorage.userInfo);
         },
@@ -1183,7 +1208,6 @@ export default {
                     });
                     if (res.data.body.wo.fileUrl != null) {
                         let fileList = JSON.parse(res.data.body.wo.fileUrl);
-
                         fileList.forEach(item => {
                             this.fileInfo.fileList.push({
                                 fileCode: item.fileCode,
@@ -1212,31 +1236,31 @@ export default {
         this.getUser();
         this.getList();
 
-        let info = {};
-        info.sceneName = '营业厅-常规物料';
-        info.metirialType = '侧翼灯箱';
-        info.metirialCode = 'A07' ;
+        // let info = {};
+        // info.sceneName = '营业厅-常规物料';
+        // info.metirialType = '侧翼灯箱';
+        // info.metirialCode = 'A07' ;
 
-        info.channelCodePks = "232344,23323,wgeg,qw";
-        info.regionCodePks = "304422,304423";
-        info.countyCodePks = "00440022002100000000,00440023002100000000";
+        // info.channelCodePks = "232344,23323,wgeg,qw";
+        // info.regionCodePks = "304422,304423";
+        // info.countyCodePks = "00440022002100000000,00440023002100000000";
         
-        this.$http({
-            url: "/market/advBusiMetirial/queryList",
-            method: "post",
-            headers: {
-                "Content-Type": "application/json"
-            },
-            data: info
-        }).then(res => {
-                this.infomaterType = res.data;
-                this.infomaterType.forEach(item => {
-                    this.amountsum += parseFloat(
-                        item.settlementAmount
-                    );
-                });
-            // }
-        });
+        // this.$http({
+        //     url: "/market/advBusiMetirial/queryList",
+        //     method: "post",
+        //     headers: {
+        //         "Content-Type": "application/json"
+        //     },
+        //     data: info
+        // }).then(res => {
+        //         this.infomaterType = res.data;
+        //         this.infomaterType.forEach(item => {
+        //             this.amountsum += parseFloat(
+        //                 item.settlementAmount
+        //             );
+        //         });
+        //     // }
+        // });
     },
     created() {}
 };

+ 15 - 16
src/pages/main/advertising/materiel.vue

@@ -11,7 +11,7 @@
                     class="btn-check"
                     size="medium"
                     type="primary"
-                    @click="dialogCheck(3)" v-if="userInfo.loginNo=='admin'"
+                    @click="dialogCheck(3)" v-if="userInfo.loginNo=='rensiying'"
                     >添加
                 </el-button>
             </div>
@@ -68,13 +68,13 @@
                             <el-button
                                 size="mini"
                                 type="primary"
-                                @click="dialogCheck(2, scope.row)" v-if="userInfo.loginNo=='admin'"
+                                @click="dialogCheck(2, scope.row)" v-if="userInfo.loginNo=='rensiying'"
                                 >修改</el-button
                             >
                             <el-button
                                 size="mini"
                                 type="danger"
-                                @click="delLine(scope.row)" v-if="userInfo.loginNo=='admin'"
+                                @click="delLine(scope.row)" v-if="userInfo.loginNo=='rensiying'"
                                 >删除</el-button
                             >
                         </template>
@@ -189,7 +189,7 @@
                             <el-input
                                 v-model="infolist.metirialCode"
                                 placeholder="物料编码"
-                                :disabled="disableStatus"
+                                :disabled="metirialCodeDisableStatus"
                             >
                             </el-input>
                         </el-form-item>
@@ -676,22 +676,22 @@ export default {
             //供应商
             suppOpt: [],
             usePlanceArr: [],
-            metirialTypeopt: []
+            metirialTypeopt: [],
+            metirialCodeDisableStatus: false,
             // scene:[]
         };
     },
     methods: {
         //处理所需数据
         verifall(v) {
-            for (let j = 0; j < this.suppOpt.length; j++) {
-                if (this.suppOpt[j].code == v) {
-                    this.infolist.supplierName = this.suppOpt[j].name;
-                }
-            }
+            // for (let j = 0; j < this.suppOpt.length; j++) {
+            //     if (this.suppOpt[j].code == v) {
+            //         this.infolist.supplierName = this.suppOpt[j].name;
+            //     }
+            // }
         },
         usePlance(v) {
             this.usePlanceArr = v;
-            // console.log(v);
 
             // 	let value = ''
             // 	if(v == '1'){
@@ -724,7 +724,6 @@ export default {
             v[0] ? (this.params.sceneName = v[0]) : "";
             v[1] ? (this.params.proviceFlagName = v[1]) : "";
             v[2] ? (this.params.metirialName = v[2]) : "";
-            console.log(v);
             this.getList(this.params, this.pageSize);
         },
         //获取列表
@@ -742,7 +741,6 @@ export default {
                 },
                 data: v
             }).then(res => {
-                console.log(res.data.data);
                 res.data.data.forEach(item => {
                     for (let i = 0; i < this.sceneopt.length; i++) {
                         if (this.sceneopt[i].dataCode == item.sceneName) {
@@ -768,12 +766,13 @@ export default {
             if (v === 1) {
                 this.titname = "查看";
                 this.disableStatus = true;
+                this.metirialCodeDisableStatus = true;
                 this.infolist.sceneName = this.infolist.sceneName.split("/");
                 return;
             } else if (v === 2) {
                 this.titname = "修改";
                 this.disableStatus = false;
-
+                this.metirialCodeDisableStatus = true;
                 this.infolist.sceneName = this.infolist.sceneName.split("/");
                 // this.usePlance(n.scene);
             } else if (v === 3) {
@@ -909,7 +908,6 @@ export default {
         },
         //文件返回值
         uploadBack(v) {
-            console.log(v);
         },
         //功能栏
         iconCli(v) {
@@ -928,7 +926,8 @@ export default {
                 headers: {
                     "Content-Type": "application/json"
                 },
-                data: { buyTypeCode: "2" }
+                // data: { buyTypeCode: "2" }
+                data: {}
             }).then(res => {
                 this.suppOpt = res.data;
             });

文件差異過大導致無法顯示
+ 585 - 0
src/pages/main/advertising/subtaskList.vue


+ 67 - 28
src/pages/main/advertising/supplier.vue

@@ -4,7 +4,7 @@
             <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
             <div class="search">
                 <!-- <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch> -->
-                <el-button class="btn-check" size="medium" type="primary" @click="dialogCheck(3)">添加
+                <el-button class="btn-check" size="medium" type="primary" @click="dialogCheck(3)" v-if="userInfo.loginNo=='rensiying'">添加
                 </el-button>
             </div>
             <div class="tabbox">
@@ -32,8 +32,8 @@
                     <el-table-column label="操作" width="160px" align="center">
                         <template slot-scope="scope">
                             <el-button size="mini" type="primary" @click="dialogCheck(1,scope.row)">查看</el-button>
-                            <el-button size="mini" type="primary" @click="dialogCheck(2,scope.row)">修改</el-button>
-                            <el-button size="mini" type="danger" @click="delLine(scope.row)">删除</el-button>
+                            <el-button size="mini" type="primary" @click="dialogCheck(2,scope.row)" v-if="userInfo.loginNo=='rensiying'">修改</el-button>
+                            <el-button size="mini" type="danger" @click="delLine(scope.row)" v-if="userInfo.loginNo=='rensiying'">删除</el-button>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -44,7 +44,7 @@
         </div>
 
         <el-dialog :title="titname + '供应商'" :visible.sync="dialogStatus" width="50%" :destroy-on-close="true"
-            :modal-append-to-body="false" :close-on-click-modal="false" :before-close="closedia">
+            :modal-append-to-body="false" :close-on-click-modal="false" :before-close="closedia" :append-to-body="true" >
             <div v-loading="loadinged">
                 <el-form :model="infolist" ref="infolist" :rules="rules">
 					
@@ -79,12 +79,12 @@
 						</el-form-item>
 						<el-form-item prop="contractSignTime">
 						    <span>签订时间</span>
-						    <el-date-picker v-model="infolist.contractSignTime" type="date" placeholder="签订时间">
+						    <el-date-picker v-model="infolist.contractSignTime" type="datetime" placeholder="签订时间" :disabled="disableStatus">
 						    </el-date-picker>
 						</el-form-item>
 						<el-form-item prop="contractEndTime">
 						    <span>截止时间</span>
-						    <el-date-picker v-model="infolist.contractEndTime" type="date" placeholder="截止时间">
+						    <el-date-picker v-model="infolist.contractEndTime" type="datetime" placeholder="截止时间" :disabled="disableStatus">
 						    </el-date-picker>
 						</el-form-item>
 						<!-- <el-form-item prop="type">
@@ -115,12 +115,14 @@
     //import mySearch from "../../../components/search.vue";
     import myMessage from "../../../components/myMessage.vue"
     import toolList from '../../../components/toolList'
+    import { MessageBox } from "element-ui";
 
     export default {
         components: {
             //mySearch,
             myMessage,
-            toolList
+            toolList,
+            MessageBox
         },
         data() {
             const name = (rule, value, callback) => {
@@ -172,20 +174,20 @@
                     callback()
                 }
             }
-			const contractSignTime = (rule, value, callback) => {
-                if (!this.infolist.contractSignTime) {
-                    callback(new Error('不能为空'))
-                } else {
-                    callback()
-                }
-            }
-            const contractEndTime = (rule, value, callback) => {
-                if (!this.infolist.contractEndTime) {
-                    callback(new Error('不能为空'))
-                } else {
-                    callback()
-                }
-            }
+			// const contractSignTime = (rule, value, callback) => {
+            //     if (!this.infolist.contractSignTime) {
+            //         callback(new Error('不能为空'))
+            //     } else {
+            //         callback()
+            //     }
+            // }
+            // const contractEndTime = (rule, value, callback) => {
+            //     if (!this.infolist.contractEndTime) {
+            //         callback(new Error('不能为空'))
+            //     } else {
+            //         callback()
+            //     }
+            // }
             return {
                 rules: {
                     name: [{
@@ -221,12 +223,14 @@
 					contractSignTime: [{
                         required: true,
                         trigger: 'change',
-                        validator: contractSignTime
+                        // validator: contractSignTime
+                        message: '不能为空',
                     }],
 					contractEndTime: [{
                         required: true,
                         trigger: 'change',
-                        validator: contractEndTime
+                        message: '不能为空',
+                        // validator: contractEndTime
                     }],
                     // buyTypeName: [{
                     //     required: true,
@@ -292,7 +296,8 @@
 						id:'2',
 						name:'二采'
 					}
-				]
+				],
+                supplierNameOrigin: ""
             }
         },
         methods: {
@@ -323,7 +328,6 @@
                     },
                     data: v,
                 }).then((res) => {
-                    console.log(res.data.data);
                     this.tableData = res.data.data;
                     this.total = res.data.totalRecord;
                     this.loading = false;
@@ -345,6 +349,8 @@
                 } else if (v === 2) {
                     this.titname = '修改';
                     this.disableStatus = false;
+                    this.supplierNameOrigin = this.infolist.name
+
                 } else if (v === 3) {
                     this.titname = '添加';
                     this.disableStatus = false;
@@ -364,9 +370,39 @@
                     this.infolist.contractSignTime = this.infolist.contractSignTime?this.$formatDate(this.infolist.contractSignTime, "YYYY-MM-DD"):'';
                     this.infolist.contractEndTime = this.infolist.contractEndTime?this.$formatDate(this.infolist.contractEndTime, "YYYY-MM-DD"):'';
                     if (this.titname === '添加') {
-                        this.submitInfo("/market/cadvSupplier/add");
+                           
+                            let supplierNameArr = this.tableData.filter(item => {
+                                    return item.name == this.infolist.name
+                                });
+                            if(parseFloat(this.infolist.cost) < parseFloat(this.infolist.lastCost)){
+                                MessageBox.alert("框架总额应>=框架剩余总额", "温馨提示", {
+                                    confirmButtonText: "确定"
+                                })
+                            }else if(supplierNameArr.length != 0){
+                                MessageBox.alert("该供应商已存在", "温馨提示", {
+                                    confirmButtonText: "确定"
+                                });
+                            }else{
+                                this.submitInfo("/market/cadvSupplier/add");
+                            }
+                            
+
+                        
                     } else if (this.titname === '修改') {
-                        this.submitInfo("/market/cadvSupplier/update", v);
+                            let supplierNameArr = this.tableData.filter(item => {
+                                    return item.name == this.infolist.name
+                                });
+                            if(parseFloat(this.infolist.cost) < parseFloat(this.infolist.lastCost)){
+                                MessageBox.alert("框架总额应>=框架剩余总额", "温馨提示", {
+                                    confirmButtonText: "确定"
+                                })
+                            }else if(this.supplierNameOrigin != this.infolist.name && supplierNameArr.length != 0){
+                                MessageBox.alert("该供应商已存在", "温馨提示", {
+                                    confirmButtonText: "确定"
+                                });
+                            }else{
+                                this.submitInfo("/market/cadvSupplier/update", v);
+                            }
                     }
                 }
             },
@@ -445,7 +481,6 @@
             },
             //文件返回值
             uploadBack(v) {
-                console.log(v)
             },
             //功能栏
             iconCli(v) {
@@ -543,4 +578,8 @@
     .container .search{
         justify-content: flex-end
     }
+    .myfooter{
+        display: flex;
+        justify-content: flex-end;
+    }
 </style>

+ 7 - 7
src/pages/main/budget/budgetIndex.vue

@@ -52,13 +52,13 @@
 						sts:0,
 						num:0
 					},
-					{
-						label: "预算回复",
-						path: "/recallAdmin",
-						name: "recallAdmin",
-						sts:0,
-						num:0
-					},
+					// {
+					// 	label: "预算回复",
+					// 	path: "/recallAdmin",
+					// 	name: "recallAdmin",
+					// 	sts:0,
+					// 	num:0
+					// },
 					{
 						label: "预算模板管理",
 						path: "/budgetList",