wangguangping 3 年之前
父节点
当前提交
87c5c5d2ab
共有 2 个文件被更改,包括 1635 次插入765 次删除
  1. 176 63
      src/pages/main/advertising/materialApplication.vue
  2. 1459 702
      src/pages/main/advertising/materialApplicationadd.vue

+ 176 - 63
src/pages/main/advertising/materialApplication.vue

@@ -12,25 +12,37 @@
                     tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
                     <el-table-column prop="bizName" label="业务名称">
                     </el-table-column>
-					<el-table-column prop="woNo" label="业务编码">
+                    <el-table-column prop="orderCycle" label="下单周期">
                     </el-table-column>
-                    <el-table-column prop="scence" label="使用场景">
+                    <el-table-column prop="opName" label="申请人">
                     </el-table-column>
-                    <el-table-column prop="approvalNo" label="申请工号">
+                    <el-table-column prop="opCom" label="申请人所属公司">
+                    </el-table-column>
+                    <!-- <el-table-column prop="approvalName" label="申请类型">
+                    </el-table-column> -->
+                    <el-table-column prop="opTime" label="申请时间">
+                    </el-table-column>
+                    <el-table-column prop="sts" label="任务状态">
+                        <template slot-scope="scope">
+                            {{stsArr[scope.row.sts]}}
+                        </template>
                     </el-table-column>
-					<el-table-column prop="approvalName" label="申请姓名">
+					<!-- <el-table-column prop="woNo" label="业务编码">
                     </el-table-column>
-                    <el-table-column prop="approvalTime" label="申请时间">
+                    <el-table-column prop="scence" label="使用场景">
                     </el-table-column>
-					<el-table-column prop="budget" label="预算金额">
+                    <el-table-column prop="approvalNo" label="申请工号">
                     </el-table-column>
-					<!-- <el-table-column prop="sts" label="状态">
+					<el-table-column prop="budget" label="预算金额">
                     </el-table-column> -->
-                    <el-table-column label="操作" width="100px" align="center">
+					
+                    <el-table-column label="操作" width="300px" 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(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="jump(scope.row)">审批</el-button>
+                            <el-button size="mini" type="primary" @click="dialogCheck(scope.row)">查看子任务列表</el-button>
+                            <el-button size="mini" type="danger" @click="delLine(scope.row)">删除</el-button>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -40,22 +52,22 @@
             </div>
         </div>
 
-        <el-dialog :title="titname" :visible.sync="dialogStatus" width="50%" :destroy-on-close="true"
+        <!-- <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" :fullscreen="true">
             <div v-loading="loadinged">
                 <el-form :model="infolist" ref="infolist" :rules="rules" style="height: calc(100vh - 180px);overflow-y: scroll;">
                     <div class="info-line">
 						<el-form-item>
 						    <span>业务名称</span>
-						    <el-input v-model="infoApply.tit" disabled></el-input>
+						    <el-input v-model="infolist.bizName" disabled></el-input>
 						</el-form-item>
 						<el-form-item>
 							<span>使用场景</span>
-							<el-input v-model="infoApply.scene" disabled></el-input>
+							<el-input v-model="infoApply.sceneName" disabled></el-input>
 						</el-form-item>
 						<el-form-item>
 						    <span>下单周期</span>
-						    <el-date-picker v-model="infoApply.overtime" type="date" disabled></el-date-picker>
+                            <el-input v-model="infolist.orderCycle" disabled></el-input>
 						</el-form-item>
 						<el-form-item>
 							<span>物料类型</span>
@@ -138,8 +150,45 @@
                     <el-button @click="dialogCli(1)">取 消</el-button>
                 </div>
             </div>
-        </el-dialog>
+        </el-dialog> -->
+
+        <el-dialog
+            :title="titname"
+            :visible.sync="applicationDialogStatus"
+            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"
+                >
+                    <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="dialogCli(4)">取 消</el-button>
+                    <el-button type="primary" @click="dialogCli(5)">确 定</el-button>
+                    
+                </div>
+            </div>
+        </el-dialog>
         <myMessage :messTit='messTit' @closeMessage="closeMessage" :centerDialogVisible="centerDialogVisible" v-if="centerDialogVisible"></myMessage>
     </fullscreen>
 
@@ -158,45 +207,69 @@
 			myUpload
         },
         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()
-                }
-            }
+            // 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 {
-                rules: {
-                    regionName: [{
-                        required: true,
-                        trigger: 'change',
-                        validator: regionName
-                    }],
-                    advTypeDesc: [{
-                        required: true,
-                        trigger: 'change',
-                        validator: advTypeDesc
-                    }],
-                },
+                // rules: {
+                //     regionName: [{
+                //         required: true,
+                //         trigger: 'change',
+                //         validator: regionName
+                //     }],
+                //     advTypeDesc: [{
+                //         required: true,
+                //         trigger: 'change',
+                //         validator: advTypeDesc
+                //     }],
+                // },
                 searchList: [
                     {
                         type: 'input',
-                        tit: '物料名称',
+                        tit: '业务名称',
                         value: '',
-                        width: '48%',
+                        width: '32%',
                     },
 					{
-                        type: 'input',
-                        tit: '地市名称',
+                        type: 'sel',
+                        tit: '状态',
+                        value: '',
+                        width: '32%',
+                        options: [
+                        {
+                            dataCode: "0",
+                            dataName: "待审批"
+                        },
+                        {
+                            dataCode: "1",
+                            dataName: "待确认"
+                        },
+                        {
+                            dataCode: "2",
+                            dataName: "待验收"
+                        },
+                        {
+                            dataCode: "3",
+                            dataName: "已完成"
+                        }
+                    ]
+                    },
+                    {
+                        type: 'date',
+                        tit: '申请时间',
                         value: '',
-                        width: '48%',
+                        width: '32%',
                     },
                 ],
                 tooltit:'物料申请管理',
@@ -221,7 +294,12 @@
 				    fileList: []
 				},
 				infoApply:{},
-				rovaList:[]
+				rovaList:[],
+                applicationDialogStatus:false,
+                approvalinfolist: {
+                    opinionradio: 1
+                },
+                stsArr: ['待审批','待确认','待验收','已完成']
             }
         },
         methods: {
@@ -231,6 +309,10 @@
 				});
 				this.setabList('物料宣传申请','/materialApplicationadd');
 			},
+            jump(v){
+                // console.log(v.id);
+                this.$router.push("/materialApplicationExa?id="+ v.id + "")
+            },
             setabList(n, p) {
             	let params = {
             		children: "",
@@ -251,12 +333,22 @@
             closedia() {
                 this.infolist = {};
                 this.dialogStatus = false;
+                this.approvalinfolist = {};
+                this.applicationDialogStatus = false;
             },
             //搜索数据
             searchInfo(v) {
                 this.params = {};
-                v[0] ? this.params.metirialName = v[0] : '';
-                v[0] ? this.params.regionName = v[0] : '';
+                v[0] ? this.params.bizName = v[0] : '';
+                v[1] ? this.params.sts = v[1] : '';
+                let timeFrom = ''
+                timeFrom = this.$formatDate(v[2],"YYYY-MM-DD")+ ' 00:00:00'
+                let timeTo = ''
+                timeTo = this.$formatDate(v[2],"YYYY-MM-DD")+ ' 23:59:59'
+                // console.log(timeFrom, timeTo);
+                timeFrom ? this.params.opTimeFrom = timeFrom : '';
+                timeTo ? this.params.opTimeTo = timeTo : '';
+                
                 this.getList(this.params, this.pageSize);
             },
             //获取列表
@@ -266,7 +358,7 @@
                 this.loading = true;
                 this.tableData = [];
                 this.$http({
-                    url: "/market/cadvMetirialApproval/queryPage",
+                    url: "/market/cadvBusiMetirialWo/queryPage",
                     method: "post",
                     headers: {
                         "Content-Type": "application/json",
@@ -274,8 +366,10 @@
                     },
                     data: v,
                 }).then((res) => {
-                    this.tableData = res.data.data;
-                    this.total = res.data.totalRecord;
+                    console.log(res.data.body);
+                    this.tableData = res.data.body.pageList;
+                    
+                    // this.total = res.data.totalRecord;
                     this.loading = false;
                 });
             },
@@ -287,14 +381,17 @@
             //申请
             dialogCheck(v, n) {
                 this.dialogStatus = true;
+                // 审批同意对话框
+                this.applicationDialogStatus = true;
                 this.infolist = Object.assign({}, n);
                 if (v === 1) {
                     this.titname = '查看';
                     this.disableStatus = true;
                 } else if (v === 2) {
-                    this.titname = '修改';
+                    this.titname = '审批';
                     this.disableStatus = false;
                 }
+            //    console.log(n.woNo);
 				this.$http({
 				    url: '/bpm/api/taskInit',
 				    method: "post",
@@ -305,31 +402,47 @@
 				        woNo: n.woNo
 				    },
 				}).then((res) => {
+                    // console.log(res.data);
+
 				    this.infolist = Object.assign({}, res.data);
-				    this.infoApply = JSON.parse(this.infolist.params.terminalRes);
+                    // console.log(JSON.parse(this.infolist.params.wo));
+				    this.infoApply = JSON.parse(this.infolist.params.wo);
+                    
 					this.rovaList = res.data.taskList;
 				});
             },
+
+            
             //添加
             dialogCli(v) {
                 if (v === 1) {
                     this.infolist = {};
                     this.dialogStatus = false;
                     return
-                } else {
+                }else if(v===5){
+                    if(this.approvalinfolist.opinionradio == 1){
+                        this.infolist.opTime = this.$formatDate(new Date(), "YYYY-MM-DD");
+                        this.infolist.dealType = '2';
+                        this.infolist.dealTypeDesc = this.approvalinfolist.opinion;
+                        this.applicationDialogStatus = false;
+                       
+                        this.submitInfo("/bpm/api/submitTask", this.infolist);
+                    }
+                }
+                 else {
                     this.infolist.opTime = this.$formatDate(new Date(), "YYYY-MM-DD");
                     if (this.titname === '添加') {
                         this.submitInfo("/bpm/api/addBpmPrePlugin");
-                    } else if (this.titname === '修改') {
+                    } else if (this.titname === '审批') {
                         this.submitInfo("/bpm/api/updateBpmPrePlugin", v);
                     }
-
                 }
             },
             submitInfo(u) {
+                // console.log(this.infolist);
                 let _this = this;
-                this.$refs.infolist.validate(valid => {
-                    if (valid) {
+                //this.$refs.infolist.validate(valid => {
+                    //if (valid) {
                         this.loadinged = true;
                         this.$http({
                             url: u,
@@ -356,21 +469,21 @@
                             }
 
                         });
-                    }
-                })
+                    //}
+                //})
             },
             closeMessage(v) {
                 this.centerDialogVisible = false;
                 let _this = this;
                 if (v === 1) {
                     _this.$http({
-                        url: "/bpm/api/deleteBpmPrePlugin",
+                        url: "/market/cadvBusiMetirialWo/del",
                         method: "post",
                         headers: {
                             "Content-Type": "application/json",
                         },
                         data: {
-                            id: this.delid
+                            woId: this.delid
                         },
                     }).then((res) => {
                         if (res.data.result === 1) {

文件差异内容过多而无法显示
+ 1459 - 702
src/pages/main/advertising/materialApplicationadd.vue