yangbifan 2 years ago
parent
commit
053ce9af97

+ 138 - 157
src/pages/main/advertising/contractCap.vue

@@ -3,195 +3,138 @@
         <div class="container-box">
             <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)"
-                    v-if="userInfo.countyName == null && userInfo.cityName != null"
-                    >添加
-                </el-button>
+                <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
+                <!-- <el-button class="btn-check" size="medium" type="primary" @click="dialogCheck(3)"
+                            v-if="advLeader">添加
+                        </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"
-                >
+                <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">
                     <el-table-column prop="regionName" label="地市名称">
                     </el-table-column>
                     <!-- <el-table-column prop="regionCode" label="地市编码">
-                    </el-table-column> -->
+                                </el-table-column> -->
                     <!-- <el-table-column prop="preAccount" label="一采预算">
-                    </el-table-column> -->
-                    <el-table-column
-                        prop="secbuyPreAccount"
-                        label="二采预算总额"
-                    >
+                                </el-table-column> -->
+                    <el-table-column prop="secbuyPreAccount" label="二采预算总额">
                     </el-table-column>
                     <!-- <el-table-column prop="costAccount" label="一采累计使用">
-                    </el-table-column> -->
+                                </el-table-column> -->
                     <!-- <el-table-column prop="secbuyCostAccount" label="二采累计使用">
-                    </el-table-column> -->
-                    <el-table-column
-                        prop="secbuyLastAccount"
-                        label="二采剩余预算"
-                    >
+                                </el-table-column> -->
+                    <el-table-column prop="secbuyLastAccount" label="二采剩余预算">
                     </el-table-column>
                     <el-table-column prop="secbuySchedule" label="使用进度">
                     </el-table-column>
-                    <el-table-column
-                        :label="item.supplierName"
-                        v-for="(item, index) in supplierArr"
-                        :key="index"
-                    >
+                    <el-table-column :label="item.supplierName" v-for="(item, index) in supplierArr" :key="index">
                         <template slot-scope="scope">
-                            <div
-                                v-if="
-                                    scope.row.cMkSupplierCumulativeAmounts.filter(
-                                        n => {
-                                            return (
-                                                n.supplierName ==
-                                                item.supplierName
-                                            );
-                                        }
-                                    ).length > 0
-                                "
-                            >
+                            <div v-if="
+                                scope.row.cMkSupplierCumulativeAmounts.filter(
+                                    n => {
+                                        return (
+                                            n.supplierName ==
+                                            item.supplierName
+                                        );
+                                    }
+                                ).length > 0
+                            ">
                                 {{ item.sumBudget }}
                             </div>
                         </template>
                     </el-table-column>
                     <!-- <el-table-column prop="advYearn" :label="advYearnLabel">
-					</el-table-column> -->
-                    <el-table-column label="操作" width="160px" align="center" v-if="userInfo.countyName == null && userInfo.cityName != null">
+            					</el-table-column> -->
+                    <el-table-column label="操作" width="160px" align="center" v-if="advLeader">
                         <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)" 
-                                v-if="userInfo.countyName == null && userInfo.cityName != null"
-                                >编辑</el-button>
+                                            size="mini"
+                                            type="primary"
+                                            @click="dialogCheck(1, scope.row)"
+                                            >查看</el-button
+                                        > -->
+                            <el-button size="mini" type="primary" @click="dialogCheck(2, scope.row)"
+                                v-if="advLeader">编辑</el-button>
                             <!-- <el-button
-                                size="mini"
-                                type="danger"
-                                @click="delLine(scope.row)" 
-                                >删除</el-button
-                            > -->
+                                            size="mini"
+                                            type="danger"
+                                            @click="delLine(scope.row)" 
+                                            >删除</el-button
+                                        > -->
                         </template>
                     </el-table-column>
                 </el-table>
                 <!-- <el-pagination
-                    class="pageBox"
-                    @current-change="currchange"
-                    layout="prev, pager, next"
-                    background
-                    :total="total"
-                >
-                </el-pagination> -->
+                                class="pageBox"
+                                @current-change="currchange"
+                                layout="prev, pager, next"
+                                background
+                                :total="total"
+                            >
+                            </el-pagination> -->
             </div>
         </div>
 
-        <el-dialog
-            :title="titname"
-            :visible.sync="dialogStatus"
-            width="40%"
-            :destroy-on-close="true"
-            :modal-append-to-body="false"
-            :close-on-click-modal="false"
-            :before-close="closedia"
-        >
+        <el-dialog :title="titname" :visible.sync="dialogStatus" width="40%" :destroy-on-close="true"
+            :modal-append-to-body="false" :close-on-click-modal="false" :before-close="closedia">
             <div v-loading="loadinged">
                 <el-form :model="infolist" ref="infolist" :rules="rules">
                     <div class="info-line" style="width: 50%; margin: 0 auto;">
                         <!-- <el-form-item prop="regionCode">
-                            <span>地市名称</span>
-                            <el-select
-                                :popper-append-to-body="false"
-                                v-model="infolist.regionCode"
-                                placeholder="地市名称"
-                                @change="verifcheck"
-                                :disabled="secbuyLastDisableStatus"
-                            >
-                                <el-option
-                                    v-for="item in regionOpt"
-                                    :key="item.compId"
-                                    :label="item.compName"
-                                    :value="item.compId"
-                                >
-                                </el-option>
-                            </el-select>
-                        </el-form-item> -->
+                                        <span>地市名称</span>
+                                        <el-select
+                                            :popper-append-to-body="false"
+                                            v-model="infolist.regionCode"
+                                            placeholder="地市名称"
+                                            @change="verifcheck"
+                                            :disabled="secbuyLastDisableStatus"
+                                        >
+                                            <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="secbuyPreAccount" style="width: 100%;">
                             <span>二采预算总额</span>
-                            <el-input
-                                v-model="infolist.secbuyPreAccount"
-                                placeholder="二采预算总额"
-                            ></el-input>
+                            <el-input v-model="infolist.secbuyPreAccount" placeholder="二采预算总额"></el-input>
                         </el-form-item>
                         <el-form-item prop="secbuyLastAccount" style="width: 100%;">
                             <span>二采剩余预算</span>
-                            <el-input
-                                v-model="infolist.secbuyLastAccount"
-                                placeholder="二采剩余预算"
-                            ></el-input>
+                            <el-input disabled v-model="infolist.secbuyLastAccount" placeholder="二采剩余预算"></el-input>
                         </el-form-item>
                         <!-- <el-form-item prop="secbuySchedule">
-                            <span>使用进度</span>
-                            <el-input
-                                v-model="infolist.secbuySchedule"
-                                placeholder="使用进度"
-                                disabled
-                            ></el-input>
-                        </el-form-item> -->
+                                        <span>使用进度</span>
+                                        <el-input
+                                            v-model="infolist.secbuySchedule"
+                                            placeholder="使用进度"
+                                            disabled
+                                        ></el-input>
+                                    </el-form-item> -->
                         <!-- <el-form-item prop="secbuyCostAccount">
-                            <span>二采使用</span>
-                            <el-input v-model="infolist.secbuyCostAccount" placeholder="二采累计使用" disabled></el-input>
-                        </el-form-item>
-						<el-form-item>
-						    <span>统计周期</span>
-						    <el-input v-model="infolist.advYearn" placeholder="统计周期" :disabled="disableStatus"></el-input>
-						</el-form-item> -->
+                                        <span>二采使用</span>
+                                        <el-input v-model="infolist.secbuyCostAccount" placeholder="二采累计使用" disabled></el-input>
+                                    </el-form-item>
+            						<el-form-item>
+            						    <span>统计周期</span>
+            						    <el-input v-model="infolist.advYearn" placeholder="统计周期" :disabled="disableStatus"></el-input>
+            						</el-form-item> -->
                     </div>
                 </el-form>
 
                 <div slot="footer" class="dialog-footer myfooter">
-                    <el-button
-                        type="primary"
-                        @click="dialogCli(2)"
-                        v-if="titname !== '查看'"
-                        >确 定</el-button
-                    >
-                    <el-button @click="dialogCli(1)" v-if="titname === '查看'"
-                        >确 定</el-button
-                    >
+                    <el-button type="primary" @click="dialogCli(2)" v-if="titname !== '查看'">确 定</el-button>
+                    <el-button @click="dialogCli(1)" v-if="titname === '查看'">确 定</el-button>
                     <el-button @click="dialogCli(1)">取 消</el-button>
                 </div>
             </div>
         </el-dialog>
-        <myMessage
-            :messTit="messTit"
-            @closeMessage="closeMessage"
-            :centerDialogVisible="centerDialogVisible"
-            v-if="centerDialogVisible"
-        ></myMessage>
-    </fullscreen>
+        <myMessage :messTit="messTit" @closeMessage="closeMessage" :centerDialogVisible="centerDialogVisible"
+            v-if="centerDialogVisible"></myMessage>
+</fullscreen>
 </template>
 <script>
 import mySearch from "../../../components/search.vue";
@@ -207,6 +150,7 @@ export default {
         MessageBox
     },
     data() {
+
         const regionCode = (rule, value, callback) => {
             if (!this.infolist.regionCode) {
                 callback(new Error("不能为空"));
@@ -230,6 +174,7 @@ export default {
         };
 
         return {
+            advLeader: false,
             rules: {
                 regionCode: [
                     {
@@ -297,20 +242,40 @@ export default {
         };
     },
     computed: {
-        // 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 = ''
+
+        //     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;
         //     }
-        //     return this.infolist.secbuySchedule;
-        // }
     },
     methods: {
         closedia() {
             this.infolist = {};
             this.dialogStatus = false;
         },
+        //获取权限
+        getJiangshuai() {
+            this.$http({
+                url: "/market/paraminfo/query",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: { paramKey: 'adv_leader' }
+            }).then(res => {
+                console.log(res);
+                console.log(res.data.paramValue);
+                console.log(this.userInfo.loginNo);
+                if (this.userInfo.loginNo === res.data.paramValue) {
+                    this.advLeader = true;
+                }
+
+            });
+        },
         //搜索数据
         searchInfo(v) {
             this.params = {};
@@ -332,6 +297,7 @@ export default {
                 },
                 data: v
             }).then(res => {
+                console.log(123);
                 if (
                     this.userInfo.countyName == null &&
                     this.userInfo.cityName == null
@@ -342,7 +308,14 @@ export default {
                         return item.regionName == this.userInfo.cityName;
                     });
                 }
-                
+                // console.log(this.tableData);
+                // this.tableData.map((item) => {
+                //     item.secbuySchedule = (item.secbuyPreAccount - item.secbuyLastAccount) / item.secbuyPreAccount;
+                //     item.secbuySchedule = ((parseFloat(item.secbuySchedule) * 100).toFixed(2));
+                //     if (isNaN(item.secbuySchedule)) {
+                //         item.secbuySchedule = ''
+                //     }
+                // })
                 this.total = res.data.totalRecord;
                 this.loading = false;
 
@@ -400,17 +373,17 @@ export default {
                 this.infolist.areaCode = this.areaCode;
                 this.infolist.areaName = this.areaName;
 
-                if(this.currentRole.length == 1){
-                   this.infolist.regionName = this.currentRole[0].compName;
-                   this.infolist.regionCode = this.currentRole[0].compId;
+                if (this.currentRole.length == 1) {
+                    this.infolist.regionName = this.currentRole[0].compName;
+                    this.infolist.regionCode = this.currentRole[0].compId;
                 }
 
                 if (this.titname === "添加") {
-                this.submitInfo("/market/cadvContract/add");
+                    this.submitInfo("/market/cadvContract/add");
                 } else if (this.titname === "编辑") {
                     this.submitInfo("/market/cadvContract/update", v);
                 }
-                
+
             }
         },
         submitInfo(u) {
@@ -436,7 +409,7 @@ export default {
                     }).then(res => {
                         this.loadinged = false;
                         if (res.data.result === 0) {
-                             _this.$message({
+                            _this.$message({
                                 message: "成功",
                                 type: "success"
                             });
@@ -546,7 +519,7 @@ export default {
                     parentCompId: "0"
                 }
             }).then(res => {
-                this.currentRole = res.data.filter(item=>{
+                this.currentRole = res.data.filter(item => {
                     return item.compName == this.userInfo.cityName
                 })
                 // if (
@@ -562,10 +535,18 @@ export default {
         }
     },
     mounted() {
+        this.getJiangshuai()
         this.getList({}, 1);
         this.getUser();
     },
-    created() {}
+    created() { },
+    watch: {
+        "infolist.secbuyPreAccount": {
+            handler(newVal) {
+                  this.infolist.secbuyLastAccount =  newVal -  this.infolist.costAccount
+            },
+        },
+    }
 };
 </script>
 <style scoped lang="scss">

+ 188 - 174
src/pages/main/advertising/index.vue

@@ -1,199 +1,213 @@
 <template>
-    <fullscreen :fullscreen.sync="fullscreen" class="container">
-        <div class="container-box">
-			
+	<fullscreen :fullscreen.sync="fullscreen" class="container">
+		<div class="container-box">
+
 			<!-- <h2>广告宣传费台账</h2>
-			<div class="adv-type">
-			    <div @click="jumpinfop('/publicityAccount',1,'宣传费台账')" v-if="lockFlag == 'updata'">
-			        <span><i class="el-icon-folder-opened"></i></span>
-			        <span>创建模板</span>
-			    </div>
-				<div @click="jumpinfop('/publicityAccount',2,'宣传费台账')">
-			        <span><i class="el-icon-folder-opened"></i></span>
-			        <span>录入/更新</span>
-			    </div>
-				<div @click="jumpinfop('/publicityAccount',3,'宣传费台账')" v-if="lockFlag == 'updata'">
-			        <span><i class="el-icon-folder-opened"></i></span>
-			        <span>查看/下载</span>
-			    </div>
-			</div> -->
+				<div class="adv-type">
+				    <div @click="jumpinfop('/publicityAccount',1,'宣传费台账')" v-if="lockFlag == 'updata'">
+				        <span><i class="el-icon-folder-opened"></i></span>
+				        <span>创建模板</span>
+				    </div>
+					<div @click="jumpinfop('/publicityAccount',2,'宣传费台账')">
+				        <span><i class="el-icon-folder-opened"></i></span>
+				        <span>录入/更新</span>
+				    </div>
+					<div @click="jumpinfop('/publicityAccount',3,'宣传费台账')" v-if="lockFlag == 'updata'">
+				        <span><i class="el-icon-folder-opened"></i></span>
+				        <span>查看/下载</span>
+				    </div>
+				</div> -->
 			<h2 class="font-ui" style="margin-top: 20px;">宣传物料管理</h2>
 			<div class="adv-type">
-			    <div class="wfour" @click="jumpinfo('/materialApplication','宣传物料申请及审批')">
-			        <span><i class="el-icon-folder-opened"></i></span>
-			        <span>宣传物料申请及审批</span>
-			    </div>
-				<!-- <div class="wfour" @click="jumpinfo('/materialApplicationc','市级物料申请')">
-			        <span><i class="el-icon-folder-opened"></i></span>
-			        <span>市级物料申请</span>
-			    </div>
-				<div class="wfour" @click="jumpinfo('/materialApplicationExa','物料申请审核')">
-				    <span><i class="el-icon-folder-opened"></i></span>
-				    <span>省级物料审批</span>
+				<div class="wfour" @click="jumpinfo('/materialApplication', '宣传物料申请及审批')">
+					<span><i class="el-icon-folder-opened"></i></span>
+					<span>宣传物料申请及审批</span>
 				</div>
-				<div class="wfour" @click="jumpinfo('/materialApplicationExac','物料申请审核')">
-				    <span><i class="el-icon-folder-opened"></i></span>
-				    <span>市级物料审批</span>
-				</div> -->
+				<!-- <div class="wfour" @click="jumpinfo('/materialApplicationc','市级物料申请')">
+				        <span><i class="el-icon-folder-opened"></i></span>
+				        <span>市级物料申请</span>
+				    </div>
+					<div class="wfour" @click="jumpinfo('/materialApplicationExa','物料申请审核')">
+					    <span><i class="el-icon-folder-opened"></i></span>
+					    <span>省级物料审批</span>
+					</div>
+					<div class="wfour" @click="jumpinfo('/materialApplicationExac','物料申请审核')">
+					    <span><i class="el-icon-folder-opened"></i></span>
+					    <span>市级物料审批</span>
+					</div> -->
 			</div>
 			<h2 class="font-ui" style="margin-top: 20px;">基础数据管理</h2>
 			<div class="adv-type">
-			    <!-- <div class="wfive" @click="jumpinfo('/materielPick','一采物料类型建档')" v-if="province">
-			        <span><i class="el-icon-folder-opened"></i></span>
-			        <span>一采物料类型建档</span>
-			    </div> -->
-				<div class="wfive" @click="jumpinfo('/materiel','二采物料类型建档')" v-if="province">
-			        <span><i class="el-icon-folder-opened"></i></span>
-			        <span>二采物料类型建档</span>
-			    </div>
-				<div class="wfive" @click="jumpinfo('/contractCap','预算及合同上限')">
-			        <span><i class="el-icon-folder-opened"></i></span>
-			        <span>预算及合同上限</span>
-			    </div>
-				<div class="wfive" @click="jumpinfo('/supplier','供应商管理')" v-if="province">
-				    <span><i class="el-icon-folder-opened"></i></span>
-				    <span>供应商管理</span>
+				<!-- <div class="wfive" @click="jumpinfo('/materielPick','一采物料类型建档')" v-if="province">
+				        <span><i class="el-icon-folder-opened"></i></span>
+				        <span>一采物料类型建档</span>
+				    </div> -->
+				<div class="wfive" @click="jumpinfo('/materiel', '二采物料类型建档')" v-if="province">
+					<span><i class="el-icon-folder-opened"></i></span>
+					<span>二采物料类型建档</span>
+				</div>
+				<div class="wfive" @click="jumpinfo('/contractCap', '预算及合同上限')">
+					<span><i class="el-icon-folder-opened"></i></span>
+					<span>预算及合同上限</span>
+				</div>
+				<div class="wfive" @click="jumpinfo('/supplier', '供应商管理')" v-if="province">
+					<span><i class="el-icon-folder-opened"></i></span>
+					<span>供应商管理</span>
 				</div>
-				<div class="wfive" @click="jumpinfo('/businessHall','物料基础信息维护')">
-				    <span><i class="el-icon-folder-opened"></i></span>
-				    <span>物料基础信息维护</span>
+				<div class="wfive" @click="jumpinfo('/businessHall', '物料基础信息维护')">
+					<span><i class="el-icon-folder-opened"></i></span>
+					<span>物料基础信息维护</span>
 				</div>
-				<div class="wfive" @click="jumpinfo('/materialApplistatic','物料统计')">
-				    <span><i class="el-icon-folder-opened"></i></span>
-				    <span>物料统计</span>
+				<div class="wfive" @click="jumpinfo('/materialApplistatic', '物料统计')">
+					<span><i class="el-icon-folder-opened"></i></span>
+					<span>物料统计</span>
 				</div>
+				<div class="wfive" @click="jumpinfo('/materialAppMessage', '宣传物料制作费用明细')">
+					<span><i class="el-icon-folder-opened"></i></span>
+					<span>宣传物料制作费用明细</span>
+				</div>
+				<div class="wfive" @click="jumpinfo('/materialAppNum', '验收打分单')">
+					<span><i class="el-icon-folder-opened"></i></span>
+					<span>验收打分单</span>
+				</div>
+
 			</div>
-			
-      </div>
 
-    </fullscreen>
+		</div>
 
+</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 mySearch from "../../../components/search.vue";
+import myMessage from "../../../components/myMessage.vue"
+import toolList from '../../../components/toolList'
+import myUpload from '../../../components/upload'
+
+export default {
+	components: {
+		mySearch,
+		myMessage,
+		toolList,
+		myUpload
+	},
+	data() {
 
-    export default {
-        components: {
-            mySearch,
-            myMessage,
-            toolList,
-			myUpload
-        },
-        data() {
-          
-            return {
-                fullscreen: false,
-				lockFlag:'see',
-				province:true
-            }
-        },
-        methods: {
-            jumpinfop(p,v,n){
-				this.$router.push({
-				    path: p,
-				    query:{
-				        type:v
-				    }
-				});
-				this.setabList(n, p+"?type="+v);
-			},
-			jumpinfo(p,n){
-				this.$router.push({
-				    path: p,
-				});
-				this.setabList(n, p);
-			},
-			setabList(n, p) {
-			    let params = {
-			        children: "",
-			        name: n,
-			        rountPath: p,
-			        target: "_self",
-			    };
-			    for (let i = 0; i < this.$store.state.tabList.length; i++) {
-			        if (this.$store.state.tabList[i].name === params.name) {
-			            this.$store.state.tabList[i] = params;
-			        }
-			    }
-			    let set = new Set([...this.$store.state.tabList, params]);
-			    set.add(params);
-			    this.$store.commit("setDefaultActive", params.rountPath);
-			    this.$store.commit("setTabList", Array.from(set));
-			},
-            getUser() {
-                this.userInfo = JSON.parse(window.sessionStorage.userInfo);
-				let Menus = JSON.parse(window.sessionStorage.childrenMenus);
-				for (let i = 0; i < Menus.length; i++) {
-					if(Menus[i].systemflag == 1 && Menus[i].jspUrl == '/publicityAccount'){
-						this.lockFlag = 'add';//省级
-					}
-					if(Menus[i].systemflag == 1 && Menus[i].jspUrl == '/publicity'){
-						this.lockFlag = 'updata';//管理员
-						i = Menus.length;
-					}
+		return {
+			fullscreen: false,
+			lockFlag: 'see',
+			province: true
+		}
+	},
+	methods: {
+		jumpinfop(p, v, n) {
+			this.$router.push({
+				path: p,
+				query: {
+					type: v
+				}
+			});
+			this.setabList(n, p + "?type=" + v);
+		},
+		jumpinfo(p, n) {
+			this.$router.push({
+				path: p,
+			});
+			this.setabList(n, p);
+		},
+		setabList(n, p) {
+			let params = {
+				children: "",
+				name: n,
+				rountPath: p,
+				target: "_self",
+			};
+			for (let i = 0; i < this.$store.state.tabList.length; i++) {
+				if (this.$store.state.tabList[i].name === params.name) {
+					this.$store.state.tabList[i] = params;
+				}
+			}
+			let set = new Set([...this.$store.state.tabList, params]);
+			set.add(params);
+			this.$store.commit("setDefaultActive", params.rountPath);
+			this.$store.commit("setTabList", Array.from(set));
+		},
+		getUser() {
+			this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+			let Menus = JSON.parse(window.sessionStorage.childrenMenus);
+			for (let i = 0; i < Menus.length; i++) {
+				if (Menus[i].systemflag == 1 && Menus[i].jspUrl == '/publicityAccount') {
+					this.lockFlag = 'add';//省级
 				}
-				for (let i = 0; i < Menus.length; i++) {
-					if(Menus[i].systemflag == 1 && Menus[i].jspUrl == '/province'){
-						this.province = true;//省公司
-					}
+				if (Menus[i].systemflag == 1 && Menus[i].jspUrl == '/publicity') {
+					this.lockFlag = 'updata';//管理员
+					i = Menus.length;
 				}
-            }
-        },
-        mounted() {
-            this.getUser();
-        },
-        created() {
+			}
+			for (let i = 0; i < Menus.length; i++) {
+				if (Menus[i].systemflag == 1 && Menus[i].jspUrl == '/province') {
+					this.province = true;//省公司
+				}
+			}
+		}
+	},
+	mounted() {
+		this.getUser();
+	},
+	created() {
 
-        }
-    }
+	}
+}
 </script>
 <style scoped lang="scss">
-	.container-box{
-		height: calc(100vh - 200px);
-		overflow-y: scroll;
-		padding-bottom: 20px;
+.container-box {
+	height: calc(100vh - 200px);
+	overflow-y: scroll;
+	padding-bottom: 20px;
+}
+
+.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, .1);
+
+	div {
+		width: 33%;
+		text-align: center;
+		height: 80px;
+		overflow: hidden;
+		min-width: 100px;
+		cursor: pointer;
+		padding-top: 10px;
+		margin: 10px 0;
 	}
-	.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,.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;
-	        }
-	    }
-		.wfour{
-			width: 25%;
-		}
-		.wfive{
-			width: 20%;
+
+	div:hover {
+		background: #CFE8FC;
+		border-radius: 5px;
+	}
+
+	span {
+		width: 100%;
+		display: inline-block;
+		height: 40px;
+
+		// line-height: 40px;
+		i {
+			color: #0074D9;
+			font-size: 36px;
 		}
 	}
-</style>
+
+	.wfour {
+		width: 25%;
+	}
+
+	.wfive {
+		width: 20%;
+	}
+}</style>

+ 639 - 0
src/pages/main/advertising/materialAppMessage.vue

@@ -0,0 +1,639 @@
+<template>
+    <fullscreen :fullscreen.sync="fullscreen" class="container">
+        <div class="container-box">
+            <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="exportTempletelist">导出
+                </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">
+                    <el-table-column prop="sceneName" label="城市">
+                    </el-table-column>
+                    <el-table-column prop="proviceFlagName" 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="price" label="物料名称">
+                    </el-table-column>
+                    <el-table-column prop="unit" label="物料单位">
+                    </el-table-column>
+                    <el-table-column prop="unit" label="物料编码">
+                    </el-table-column>
+                    <el-table-column prop="unit" label="规格尺寸">
+                    </el-table-column>
+                    <el-table-column prop="unit" label="长(M)">
+                    </el-table-column>
+                    <el-table-column prop="unit" label="宽(M)">
+                    </el-table-column>
+                    <el-table-column prop="unit" label="系数">
+                    </el-table-column>
+
+                    <el-table-column prop="unit" label="数量">
+                    </el-table-column>
+                    <el-table-column prop="unit" label="结算金额(元,不含税)">
+                    </el-table-column>
+                </el-table>
+                <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
+                    :total="total">
+                </el-pagination>
+            </div>
+        </div>
+</fullscreen>
+</template>
+<script>
+import mySearch from "../../../components/search.vue";
+import toolList from "../../../components/toolList";
+
+export default {
+    components: {
+        mySearch,
+        toolList,
+    },
+    data() {
+        const sceneName = (rule, value, callback) => {
+            if (!this.infolist.sceneName) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const metirialName = (rule, value, callback) => {
+            if (!this.infolist.metirialName) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const metirialType = (rule, value, callback) => {
+            if (!this.infolist.metirialType) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const isAsic = (rule, value, callback) => {
+            if (!this.infolist.isAsic) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const metirialCode = (rule, value, callback) => {
+            if (!this.infolist.metirialCode) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const proviceFlag = (rule, value, callback) => {
+            if (!this.infolist.proviceFlag) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const proviceFlagName = (rule, value, callback) => {
+            if (!this.infolist.proviceFlagName) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+
+        const supplierCode = (rule, value, callback) => {
+            if (!this.infolist.supplierCode) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const size = (rule, value, callback) => {
+            if (!this.infolist.size) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const coefficient = (rule, value, callback) => {
+            if (!this.infolist.coefficient) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const unit = (rule, value, callback) => {
+            if (!this.infolist.unit) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+
+        const price = (rule, value, callback) => {
+            if (!this.infolist.price) {
+                callback(new Error("不能为空"));
+            } else if (parseFloat(this.infolist.price) > 999999.99) {
+                callback(new Error("数量过大"));
+            } else {
+                callback();
+            }
+        };
+        const quality = (rule, value, callback) => {
+            if (!this.infolist.quality) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        return {
+            rules: {
+                sceneName: [
+                    {
+                        required: true,
+                        trigger: "change",
+                        validator: sceneName
+                    }
+                ],
+                metirialName: [
+                    {
+                        required: true,
+                        trigger: "change",
+                        validator: metirialName
+                    }
+                ],
+                metirialType: [
+                    {
+                        required: true,
+                        trigger: "blur",
+                        validator: metirialType
+                    }
+                ],
+                isAsic: [
+                    {
+                        required: true,
+                        trigger: "blur",
+                        validator: isAsic
+                    }
+                ],
+
+                metirialCode: [
+                    {
+                        required: true,
+                        trigger: "blur",
+                        validator: metirialCode
+                    }
+                ],
+                proviceFlag: [
+                    {
+                        required: true,
+                        trigger: "change",
+                        validator: proviceFlag
+                    }
+                ],
+                proviceFlagName: [
+                    {
+                        required: true,
+                        trigger: "change",
+                        validator: proviceFlagName
+                    }
+                ],
+
+                supplierCode: [
+                    {
+                        required: true,
+                        trigger: "change",
+                        validator: supplierCode
+                    }
+                ],
+                size: [
+                    {
+                        required: true,
+                        trigger: "blur",
+                        validator: size
+                    }
+                ],
+                coefficient: [
+                    {
+                        required: true,
+                        trigger: "blur",
+                        validator: coefficient
+                    }
+                ],
+
+                unit: [
+                    {
+                        required: true,
+                        trigger: "blur",
+                        validator: unit
+                    }
+                ],
+                price: [
+                    {
+                        required: true,
+                        trigger: "change",
+                        validator: price
+                    }
+                ],
+                quality: [
+                    {
+                        required: true,
+                        trigger: "change",
+                        validator: quality
+                    }
+                ]
+            },
+            searchList: [
+                {
+                    type: "sel",
+                    tit: "使用场景",
+                    value: "",
+                    width: "31%",
+                    options: [
+                        {
+                            dataCode: "营业厅-VI改造-自有渠道",
+                            dataName: "营业厅-VI改造-自有渠道"
+                        },
+                        {
+                            dataCode: "营业厅-常规物料-自有渠道",
+                            dataName: "营业厅-常规物料-自有渠道"
+                        },
+                        {
+                            dataCode: "营业厅-VI改造-合作渠道",
+                            dataName: "营业厅-VI改造-合作渠道"
+                        },
+                        {
+                            dataCode: "营业厅-常规物料-合作渠道",
+                            dataName: "营业厅-常规物料-合作渠道"
+                        },
+                        {
+                            dataCode: "小区",
+                            dataName: "小区"
+                        },
+                        {
+                            dataCode: "校园",
+                            dataName: "校园"
+                        },
+                        {
+                            dataCode: "政企",
+                            dataName: "政企"
+                        }
+                    ]
+                },
+                { type: "input", tit: "供应商", value: "", width: "31%" },
+                { type: "input", tit: "城市名称", value: "", width: "31%" },
+                { type: "input", tit: "区县名称", value: "", width: "31%" },
+                { type: "input", tit: "物料编码", value: "", width: "31%" }
+            ],
+            tooltit: "宣传物料制作费用明细",
+            fullscreen: false,
+            total: 0,
+            pageSize: 1,
+            tableData: [],
+            dialogStatus: false,
+            disableStatus: false,
+            titname: "",
+            infolist: {},
+            userInfo: {},
+            params: {},
+            centerDialogVisible: false,
+            messTit: "",
+            delid: "",
+            loading: false,
+            loadinged: false,
+            //使用场景
+            sceneopt: [
+                {
+                    dataCode: "1",
+                    dataName: "小区"
+                },
+                {
+                    dataCode: "2",
+                    dataName: "校园"
+                },
+                {
+                    dataCode: "3",
+                    dataName: "营业厅-VI改造-自有渠道"
+                },
+                {
+                    dataCode: "4",
+                    dataName: "营业厅-常规物料-自有渠道"
+                },
+                {
+                    dataCode: "5",
+                    dataName: '营业厅-VI改造-合作渠道'
+                },
+                {
+                    dataCode: "6",
+                    dataName: '营业厅-常规物料-合作渠道'
+                },
+                {
+                    dataCode: "7",
+                    dataName: "政企"
+                }
+            ],
+            // 基础数据
+            isAsicopt: [
+                {
+                    id: "0",
+                    name: "是"
+                },
+                {
+                    id: "1",
+                    name: "否"
+                }
+            ],
+            coefficientopt: [
+                {
+                    id: "0",
+                    name: "按需录入"
+                },
+                {
+                    id: "1",
+                    name: "1"
+                }
+            ],
+            //单位
+            unitopt: [
+                {
+                    id: "0",
+                    name: "平方米"
+                },
+                {
+                    id: "1",
+                    name: "个"
+                },
+                {
+                    id: "2",
+                    name: "延长米"
+                },
+                {
+                    id: "3",
+                    name: "套"
+                },
+                {
+                    id: "4",
+                    name: "组"
+                }, {
+                    id: "5",
+                    name: "延米"
+                }, {
+                    id: '6',
+                    name: '张'
+                }
+            ],
+            //物料名称
+            nameopt: [],
+            //供应商
+            suppOpt: [],
+            usePlanceArr: [],
+            metirialTypeopt: [],
+            metirialCodeDisableStatus: false,
+            // scene:[]
+        };
+    },
+    methods: {
+        exportTempletelist() {
+            let data = this.params;
+            console.log(data);
+            // return
+            this.$http({
+                url: "/market/cadvSecbuyMetirial/excelExportTemplete",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                responseType: "blob",
+                data: data,
+            }).then((response) => {
+                if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+                    let blob = new Blob([response.data], {
+                        type: 'application/vnd.ms-excel'
+                    })
+                    window.navigator.msSaveOrOpenBlob(blob,
+                        new Date().getTime() + '.xlsx')
+                } else {
+                    /* 火狐谷歌的文件下载方式 */
+                    var blob = new Blob([response.data])
+                    var downloadElement = document.createElement('a')
+                    var href = window.URL.createObjectURL(blob)
+                    downloadElement.href = href
+                    downloadElement.download = new Date().getTime() + '.xlsx'
+                    document.body.appendChild(downloadElement)
+                    downloadElement.click()
+                    document.body.removeChild(downloadElement)
+                    window.URL.revokeObjectURL(href)
+                }
+            });
+        },
+        usePlance(v) {
+            this.usePlanceArr = v;
+
+        },
+        closedia() {
+            this.infolist = {};
+            this.dialogStatus = false;
+        },
+        //搜索数据
+        searchInfo(v) {
+            this.params = {};
+            v[0] ? (this.params.sceneName = v[0]) : "";
+            v[1] ? (this.params.proviceFlagName = v[1]) : "";
+            v[2] ? (this.params.metirialName = v[2]) : "";
+            v[3] ? (this.params.metirialCode = v[3]) : "";
+            this.getList(this.params, this.pageSize);
+        },
+        uploadBack(v) {
+            let that = this;
+            console.log(v);
+            if (v.data.result == 0) {
+                that.getList({}, 1);
+                that.getUser();
+                that.getMetirialType();
+                that.getMetirialInfo();
+            }
+        },
+        getMetirialInfo() {
+            this.$http({
+                url: "/market/cadvSecbuyMetirial/queryList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json"
+                },
+                data: {
+                    dictCodePks: "metirialType"
+                }
+            }).then(res => {
+                this.materialNameopt = res.data;
+            });
+        },
+        getMetirialType() {
+            this.$http({
+                url: "/sysmgr/cfgDataDicts/queryMap",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json"
+                },
+                data: {
+                    dictCodePks: "metirialType"
+                }
+            }).then(res => {
+                this.metirialTypeopt = res.data.body.metirialType;
+            });
+        },
+        //获取列表
+        getList(v, n) {
+            this.pageSize = n;
+            let _this = this;
+            this.loading = true;
+            this.tableData = [];
+            this.$http({
+                url: "/market/cadvSecbuyMetirial/queryPage",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                    page: '{"pageNo":"' + n + '","pageSize":"10"}'
+                },
+                data: v
+            }).then(res => {
+                res.data.data.forEach(item => {
+                    for (let i = 0; i < this.sceneopt.length; i++) {
+                        if (this.sceneopt[i].dataCode == item.sceneName) {
+                            item.sceneName = this.sceneopt[i].dataName;
+                        }
+                    }
+                });
+                this.tableData = res.data.data;
+                this.total = res.data.totalRecord;
+                this.loading = false;
+            });
+        },
+
+        // 分页
+        currchange(v) {
+            this.pageSize = v;
+            this.getList(this.params, this.pageSize);
+        },
+        //功能栏
+        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);
+            this.$http({
+                url: "/market/cadvSupplier/queryValidSupplierList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json"
+                },
+                // data: { buyTypeCode: "2" }
+                data: {}
+            }).then(res => {
+                this.suppOpt = res.data;
+            });
+        }
+    },
+    mounted() {
+        this.getList({}, 1);
+        this.getUser();
+
+        this.$http({
+            url: "/sysmgr/cfgDataDicts/queryMap",
+            method: "post",
+            headers: {
+                "Content-Type": "application/json"
+            },
+            data: {
+                dictCodePks: "metirialType"
+            }
+        }).then(res => {
+            this.metirialTypeopt = res.data.body.metirialType;
+            // this.stypeList = res.data.body.materType;
+        });
+    },
+    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);
+    }
+}
+</style>

+ 599 - 0
src/pages/main/advertising/materialAppNum.vue

@@ -0,0 +1,599 @@
+<template>
+    <fullscreen :fullscreen.sync="fullscreen" class="container">
+        <div class="container-box">
+            <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="exportTempletelist">导出验收单
+                </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%" @selection-change="handleSelectionChange"
+                    v-loading="loading">
+                    <el-table-column type="selection" width="55">
+                    </el-table-column>
+                    <el-table-column prop="sceneName" label="业务名称">
+                    </el-table-column>
+                    <el-table-column prop="proviceFlagName" label="需求编号">
+                    </el-table-column>
+                    <el-table-column prop="unit" label="物料编码">
+                    </el-table-column>
+                    <el-table-column prop="price" label="物料名称">
+                    </el-table-column>
+                    <el-table-column prop="unit" label="物料单位">
+                    </el-table-column>
+                    <el-table-column prop="unit" label="物料编码">
+                    </el-table-column>
+                    <el-table-column prop="unit" label="规格尺寸">
+                    </el-table-column>
+                    <el-table-column prop="unit" label="数量">
+                    </el-table-column>
+                    <el-table-column prop="unit" label="区县验收打分">
+                    </el-table-column>
+                </el-table>
+                <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
+                    :total="total">
+                </el-pagination>
+            </div>
+        </div>
+</fullscreen>
+</template>
+<script>
+import mySearch from "../../../components/search.vue";
+import toolList from "../../../components/toolList";
+
+export default {
+    components: {
+        mySearch,
+        toolList,
+    },
+    data() {
+        const sceneName = (rule, value, callback) => {
+            if (!this.infolist.sceneName) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const metirialName = (rule, value, callback) => {
+            if (!this.infolist.metirialName) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const metirialType = (rule, value, callback) => {
+            if (!this.infolist.metirialType) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const isAsic = (rule, value, callback) => {
+            if (!this.infolist.isAsic) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const metirialCode = (rule, value, callback) => {
+            if (!this.infolist.metirialCode) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const proviceFlag = (rule, value, callback) => {
+            if (!this.infolist.proviceFlag) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const proviceFlagName = (rule, value, callback) => {
+            if (!this.infolist.proviceFlagName) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+
+        const supplierCode = (rule, value, callback) => {
+            if (!this.infolist.supplierCode) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const size = (rule, value, callback) => {
+            if (!this.infolist.size) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const coefficient = (rule, value, callback) => {
+            if (!this.infolist.coefficient) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        const unit = (rule, value, callback) => {
+            if (!this.infolist.unit) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+
+        const price = (rule, value, callback) => {
+            if (!this.infolist.price) {
+                callback(new Error("不能为空"));
+            } else if (parseFloat(this.infolist.price) > 999999.99) {
+                callback(new Error("数量过大"));
+            } else {
+                callback();
+            }
+        };
+        const quality = (rule, value, callback) => {
+            if (!this.infolist.quality) {
+                callback(new Error("不能为空"));
+            } else {
+                callback();
+            }
+        };
+        return {
+            rules: {
+                sceneName: [
+                    {
+                        required: true,
+                        trigger: "change",
+                        validator: sceneName
+                    }
+                ],
+                metirialName: [
+                    {
+                        required: true,
+                        trigger: "change",
+                        validator: metirialName
+                    }
+                ],
+                metirialType: [
+                    {
+                        required: true,
+                        trigger: "blur",
+                        validator: metirialType
+                    }
+                ],
+                isAsic: [
+                    {
+                        required: true,
+                        trigger: "blur",
+                        validator: isAsic
+                    }
+                ],
+
+                metirialCode: [
+                    {
+                        required: true,
+                        trigger: "blur",
+                        validator: metirialCode
+                    }
+                ],
+                proviceFlag: [
+                    {
+                        required: true,
+                        trigger: "change",
+                        validator: proviceFlag
+                    }
+                ],
+                proviceFlagName: [
+                    {
+                        required: true,
+                        trigger: "change",
+                        validator: proviceFlagName
+                    }
+                ],
+
+                supplierCode: [
+                    {
+                        required: true,
+                        trigger: "change",
+                        validator: supplierCode
+                    }
+                ],
+                size: [
+                    {
+                        required: true,
+                        trigger: "blur",
+                        validator: size
+                    }
+                ],
+                coefficient: [
+                    {
+                        required: true,
+                        trigger: "blur",
+                        validator: coefficient
+                    }
+                ],
+
+                unit: [
+                    {
+                        required: true,
+                        trigger: "blur",
+                        validator: unit
+                    }
+                ],
+                price: [
+                    {
+                        required: true,
+                        trigger: "change",
+                        validator: price
+                    }
+                ],
+                quality: [
+                    {
+                        required: true,
+                        trigger: "change",
+                        validator: quality
+                    }
+                ]
+            },
+            searchList: [
+
+                { type: "input", tit: "供应商", value: "", width: "31%" },
+                { type: "input", tit: "城市名称", value: "", width: "31%" },
+                { type: "input", tit: "区县名称", value: "", width: "31%" },
+                { type: "input", tit: "物料编码", value: "", width: "31%" }
+            ],
+            tooltit: "宣传物料制作验收及打分",
+            fullscreen: false,
+            total: 0,
+            pageSize: 1,
+            tableData: [],
+            dialogStatus: false,
+            disableStatus: false,
+            titname: "",
+            infolist: {},
+            userInfo: {},
+            params: {},
+            centerDialogVisible: false,
+            messTit: "",
+            delid: "",
+            loading: false,
+            loadinged: false,
+            //使用场景
+            sceneopt: [
+                {
+                    dataCode: "1",
+                    dataName: "小区"
+                },
+                {
+                    dataCode: "2",
+                    dataName: "校园"
+                },
+                {
+                    dataCode: "3",
+                    dataName: "营业厅-VI改造-自有渠道"
+                },
+                {
+                    dataCode: "4",
+                    dataName: "营业厅-常规物料-自有渠道"
+                },
+                {
+                    dataCode: "5",
+                    dataName: '营业厅-VI改造-合作渠道'
+                },
+                {
+                    dataCode: "6",
+                    dataName: '营业厅-常规物料-合作渠道'
+                },
+                {
+                    dataCode: "7",
+                    dataName: "政企"
+                }
+            ], 
+            // 基础数据
+            isAsicopt: [
+                {
+                    id: "0",
+                    name: "是"
+                },
+                {
+                    id: "1",
+                    name: "否"
+                }
+            ],
+            coefficientopt: [
+                {
+                    id: "0",
+                    name: "按需录入"
+                },
+                {
+                    id: "1",
+                    name: "1"
+                }
+            ],
+            //单位
+            unitopt: [
+                {
+                    id: "0",
+                    name: "平方米"
+                },
+                {
+                    id: "1",
+                    name: "个"
+                },
+                {
+                    id: "2",
+                    name: "延长米"
+                },
+                {
+                    id: "3",
+                    name: "套"
+                },
+                {
+                    id: "4",
+                    name: "组"
+                }, {
+                    id: "5",
+                    name: "延米"
+                }, {
+                    id: '6',
+                    name: '张'
+                }
+            ],
+            //物料名称
+            nameopt: [],
+            //供应商
+            suppOpt: [],
+            usePlanceArr: [],
+            metirialTypeopt: [],
+            metirialCodeDisableStatus: false,
+            // scene:[]
+        };
+    },
+    methods: {
+        exportTempletelist() {
+            let data = this.params;
+            console.log(data);
+            // return
+            this.$http({
+                url: "/market/cadvSecbuyMetirial/excelExportTemplete",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                responseType: "blob",
+                data: data,
+            }).then((response) => {
+                if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+                    let blob = new Blob([response.data], {
+                        type: 'application/vnd.ms-excel'
+                    })
+                    window.navigator.msSaveOrOpenBlob(blob,
+                        new Date().getTime() + '.xlsx')
+                } else {
+                    /* 火狐谷歌的文件下载方式 */
+                    var blob = new Blob([response.data])
+                    var downloadElement = document.createElement('a')
+                    var href = window.URL.createObjectURL(blob)
+                    downloadElement.href = href
+                    downloadElement.download = new Date().getTime() + '.xlsx'
+                    document.body.appendChild(downloadElement)
+                    downloadElement.click()
+                    document.body.removeChild(downloadElement)
+                    window.URL.revokeObjectURL(href)
+                }
+            });
+        },
+        usePlance(v) {
+            this.usePlanceArr = v;
+
+        },
+        closedia() {
+            this.infolist = {};
+            this.dialogStatus = false;
+        },
+        //搜索数据
+        searchInfo(v) {
+            this.params = {};
+            v[0] ? (this.params.sceneName = v[0]) : "";
+            v[1] ? (this.params.proviceFlagName = v[1]) : "";
+            v[2] ? (this.params.metirialName = v[2]) : "";
+            v[3] ? (this.params.metirialCode = v[3]) : "";
+            this.getList(this.params, this.pageSize);
+        },
+        uploadBack(v) {
+            let that = this;
+            console.log(v);
+            if (v.data.result == 0) {
+                that.getList({}, 1);
+                that.getUser();
+                that.getMetirialType();
+                that.getMetirialInfo();
+            }
+        },
+        getMetirialInfo() {
+            this.$http({
+                url: "/market/cadvSecbuyMetirial/queryList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json"
+                },
+                data: {
+                    dictCodePks: "metirialType"
+                }
+            }).then(res => {
+                this.materialNameopt = res.data;
+            });
+        },
+        getMetirialType() {
+            this.$http({
+                url: "/sysmgr/cfgDataDicts/queryMap",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json"
+                },
+                data: {
+                    dictCodePks: "metirialType"
+                }
+            }).then(res => {
+                this.metirialTypeopt = res.data.body.metirialType;
+            });
+        },
+        //获取列表
+        getList(v, n) {
+            this.pageSize = n;
+            let _this = this;
+            this.loading = true;
+            this.tableData = [];
+            this.$http({
+                url: "/market/cadvSecbuyMetirial/queryPage",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                    page: '{"pageNo":"' + n + '","pageSize":"10"}'
+                },
+                data: v
+            }).then(res => {
+                res.data.data.forEach(item => {
+                    for (let i = 0; i < this.sceneopt.length; i++) {
+                        if (this.sceneopt[i].dataCode == item.sceneName) {
+                            item.sceneName = this.sceneopt[i].dataName;
+                        }
+                    }
+                });
+                this.tableData = res.data.data;
+                console.log(this.tableData);
+                this.total = res.data.totalRecord;
+                this.loading = false;
+            });
+        },
+
+        // 分页
+        currchange(v) {
+            this.pageSize = v;
+            this.getList(this.params, this.pageSize);
+        },
+        //功能栏
+        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);
+            this.$http({
+                url: "/market/cadvSupplier/queryValidSupplierList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json"
+                },
+                // data: { buyTypeCode: "2" }
+                data: {}
+            }).then(res => {
+                this.suppOpt = res.data;
+            });
+        },
+        handleSelectionChange(){
+
+        }
+    },
+    mounted() {
+        this.getList({}, 1);
+        this.getUser();
+
+        this.$http({
+            url: "/sysmgr/cfgDataDicts/queryMap",
+            method: "post",
+            headers: {
+                "Content-Type": "application/json"
+            },
+            data: {
+                dictCodePks: "metirialType"
+            }
+        }).then(res => {
+            this.metirialTypeopt = res.data.body.metirialType;
+            // this.stypeList = res.data.body.materType;
+        });
+    },
+    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);
+    }
+}
+</style>

+ 0 - 65
src/pages/main/leader/demand/demandHome.vue

@@ -767,71 +767,6 @@ export default {
   },
   created() {
     this.getUserIndex();
-    // let A = [
-    //   {
-    //     id: 1,
-    //     b: "456",
-    //   },
-    //   {
-    //     id: 2,
-    //     b: "456",
-    //   },
-    // ];
-    // let B = [
-    //   {
-    //     a: 1,
-    //     b: "4567",
-    //   },
-    //   {
-    //     a: 1,
-    //     b: "4568",
-    //   },
-    //   {
-    //     a: 2,
-    //     b: "4567",
-    //   },
-    // ];
-    // A.map((item) => {
-    //   item.c = [];
-    //   let index = B.findIndex((items) => {
-    //     if (items.a == item.id) {
-    //       item.c.push(items);
-    //     }
-    //   });
-    //   console.log(index);
-    //  B.map((items,index) =>{
-    //   if(item.id == items.a){
-    //     item.c.push(items)
-    //   }
-
-    //  })
-    // });
-    // console.log(A);
-    // function getUserDescribe(name) {
-    //   const describeForNameMap = [
-    //     [
-    //       (name) => name.length > 3, // 判断条件
-    //       () => console.log("名字太长"), // 执行函数
-    //     ],
-    //     [(name) => name.length < 2, () => console.log("名字太短")],
-    //     [(name) => name[0] === "陈", () => console.log("小陈")],
-    //     [(name) => name === "大鹏", () => console.log("管理员")],
-    //     [
-    //       (name) => name[0] === "李" && name !== "李鹏",
-    //       () => console.log("小李"),
-    //     ],
-    //   ];
-    //   // 获取符合条件的子数组
-    //   const getDescribe = describeForNameMap.find((item) => item[0](name));
-    //   // 子数组存在则运行子数组中的第二个元素(执行函数)
-    //   getDescribe ? getDescribe[1]() : console.log("此人比较神秘!");
-    // }
-    // getUserDescribe('张元芳微软')
-    // const func = (name, age = "fatfish") => {
-    //   console.log(name);
-    // };
-    // func("123123123");
-
     //oa跳转回来显示
     let status = JSON.stringify(this.$route.query) == "{}";
     if (status) {

+ 12 - 0
src/router/index.js

@@ -552,6 +552,18 @@ const routes = [{
             component: (resolve) => require( /* webpackChunkName: "system" */['../pages/main/advertising/index.vue'], resolve)
         },
         {
+            meta: { name: '验收打分单', keepAlive: false },
+            path: '/materialAppNum',
+            name: 'materialAppNum',
+            component: (resolve) => require( /* webpackChunkName: "system" */['../pages/main/advertising/materialAppNum.vue'], resolve)
+        },
+        {
+            meta: { name: '宣传物料制作费用明细', keepAlive: false },
+            path: '/materialAppMessage',
+            name: 'materialAppMessage',
+            component: (resolve) => require( /* webpackChunkName: "system" */['../pages/main/advertising/materialAppMessage.vue'], resolve)
+        },
+        {
             meta: { name: '宣传费台账', keepAlive: false },
             path: '/publicity',
             name: 'publicity',

+ 2 - 2
vue.config.js

@@ -134,9 +134,9 @@ module.exports = {
                 // target: 'http://127.0.0.1:9600/',
                 // target: 'http://192.168.0.156:9600/',
                 // target: 'http://192.168.2.44:9600/',
-                // target: 'http://192.168.2.124:9600/',
+                target: 'http://192.168.2.124:9600/',
                 // target: "http://124.223.66.248:9600",
-                target: "http://43.138.50.94:9600",
+                // target: "http://43.138.50.94:9600",
                 changeOrigin: true,
             },
         },