Pārlūkot izejas kodu

基础资料启用禁用按钮

caojunjie 1 gadu atpakaļ
vecāks
revīzija
f245063b22

+ 23 - 0
src/api/check/check.js

@@ -21,3 +21,26 @@ export const cancelCheck = (id) => {
     }
   })
 }
+
+// 新的
+export const auditProcessListXD = (id,batchNo,times) => {
+  return request({
+    url: 'api/blade-sales-part/auditproecess/findAuditProcessList',
+    method: 'get',
+    params: {
+      id:id,
+      batchNo:batchNo,
+      times:times
+    }
+  })
+}
+
+export const cancelCheckXD = (id) => {
+  return request({
+    url: 'api/blade-sales-part/auditproecess/cancelCheck',
+    method: 'post',
+    params: {
+      id:id
+    }
+  })
+}

+ 192 - 0
src/components/checkL/check.vue

@@ -0,0 +1,192 @@
+<template>
+  <div>
+    <avue-form class="trading-form" :option="option" ref="form" v-model="form">
+    </avue-form>
+    <div class="dialogButton">
+      <el-button size="small" :loading="buttonLoading" @click="$emit('choceCheckFun')">关闭</el-button>
+      <el-button type="warning" :loading="buttonLoading" size="small" @click="submit(2)">审批驳回</el-button>
+      <el-button type="primary" :loading="buttonLoading" size="small" @click="submit(1)">审批通过</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+  import { approvePass,batchOperation } from "@/api/approveData/main";
+  import {offset} from "@/api/basicData/salesOrder";
+
+  export default {
+    name: "check",
+    props: {
+      checkData: {
+        type: Object
+      },
+      choceCheckFun:{
+        type: Function
+      },
+      checkDetail:{
+        type: Boolean
+      },
+      idList:{
+        type: Array
+      }
+    },
+    data() {
+      return {
+        form: {},
+        list: [],
+        currencyDic: [],
+        buttonLoading:false,
+        corpId: "",
+        option: {
+          emptyBtn: false,
+          submitBtn: false,
+          labelWidth: 120,
+          menuSpan: 8,
+          column: [
+            {
+              label: '审批人',
+              prop: 'auditName',
+              span: 12,
+              disabled:true,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '审批日期',
+              prop: 'auditOpTime',
+              type: "datetime",
+              span: 12,
+              disabled:true,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '审批意见',
+              prop: 'auditMsg',
+              span: 24,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            }
+          ]
+        },
+      }
+    },
+    created() {
+      let date = new Date();
+      let strDate = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
+      this.$set(this.form,"auditOpTime",strDate)
+      this.$set(this.form,"auditName",this.$store.getters.userInfo.user_name)
+    },
+    methods: {
+      submit(operate){
+        this.$confirm("是否确认此操作!", "提示", {
+          confirmButtonText: "确认",
+          cancelButtonText: "取消",
+          type: "warning",
+        }).then(() => {
+            console.log(operate)
+          this.checkData.operate = operate
+          if(this.idList.length !== 0){
+            //批量
+            this.buttonLoading = true
+            batchOperation(this.idList.join(","),operate,this.form.auditMsg).then(res=>{
+              if(res.data.success){
+                this.$message.success("操作成功!")
+                this.$emit("operationType")
+              }
+            }).finally(()=>{
+              this.buttonLoading = false
+            })
+          }else{
+            //单个
+            this.buttonLoading = true
+            this.checkData.auditName = this.form.auditName
+            this.checkData.auditMsg = this.form.auditMsg
+            this.checkData.auditOpTime = this.form.auditOpTime
+            if (this.checkData.checkType === "YPJ-XSJH" && operate === 1){
+              offset({id: this.checkData.billId}).then(res => {
+                if (res.data.data == '操作成功') {
+                  this.checkData = this.detailData.check;
+                  this.checkDialog = true;
+                } else {
+                  this.$confirm(res.data.data, {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                  }).then(() => {
+                    approvePass(this.checkData).then(res=>{
+                      if(res.data.success){
+                        this.$message.success("操作成功!")
+                        this.$emit("choceCheckFun")
+                      }
+                      if(!this.checkDetail){
+                        //关闭付费申请页面
+                        let tag = this.$store.getters.tagList.filter(ele => ele.label === "付费申请")[0]
+                        this.$store.commit('DEL_TAG', tag)
+                        this.$store.commit("PQ_OUT_DETAIL");
+                        let tag1 = this.$store.getters.tagList.filter(ele => ele.label === "审批数据")[0]
+                        this.$store.commit('DEL_TAG', tag1)
+                        this.$router.push({
+                          path: "/approveData/index",
+                          query: {check:'refresh'},
+                        });
+                      }
+                    }).finally(()=>{
+                      this.buttonLoading = false
+                    })
+                  }).catch(()=>{
+                    this.buttonLoading = false
+                  })
+                }
+              }).catch(()=>{
+                this.buttonLoading = false
+              })
+            }else{
+              approvePass(this.checkData).then(res=>{
+                if(res.data.success){
+                  this.$message.success("操作成功!")
+                  this.$emit("choceCheckFun")
+                }
+                if(!this.checkDetail){
+                  //关闭付费申请页面
+                  let tag = this.$store.getters.tagList.filter(ele => ele.label === "付费申请")[0]
+                  this.$store.commit('DEL_TAG', tag)
+                  this.$store.commit("PQ_OUT_DETAIL");
+                  let tag1 = this.$store.getters.tagList.filter(ele => ele.label === "审批数据")[0]
+                  this.$store.commit('DEL_TAG', tag1)
+                  this.$router.push({
+                    path: "/approveData/index",
+                    query: {check:'refresh'},
+                  });
+                }
+              }).finally(()=>{
+                this.buttonLoading = false
+              })
+            }
+          }
+        })
+      }
+    }
+  }
+</script>
+
+<style  lang="scss" scoped>
+  .trading-form ::v-deep .el-form-item {
+    margin-bottom: 8px !important;
+  }
+</style>

+ 141 - 0
src/components/checkL/checkSchedule.vue

@@ -0,0 +1,141 @@
+<template>
+  <div>
+    <div style="height: 90%;margin-top:30px;margin-left: 20%" v-if="data.length>0">
+      <el-steps direction="vertical"
+                :active="active"
+                space="150px"
+                align-center
+                style="font-size: 12px">
+        <el-step :key="index"
+                 v-for="(item,index) in data"
+                 :title="item.title"
+                 :status="item.status"
+                 style="font-size: 14px !important;">
+          <template slot="description" scope="scope">
+            <table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-size: 14px">
+              <tr>
+                <td>
+                  <span >{{index === 0?'提交人:':'审批人:'}}&nbsp;&nbsp;&nbsp;</span><span>{{item.auditName}}</span>
+                </td>
+              </tr>
+              <tr>
+                <td>
+                  <span >{{index === 0?'提交日期:':'审批日期:'}}&nbsp;&nbsp;&nbsp;</span><span>{{item.auditOpTime}}</span>
+                </td>
+              </tr>
+              <tr>
+                <td>
+                  <span >{{index === 0?'备注':'审批意见'}}:&nbsp;&nbsp;&nbsp;</span><span>{{item.auditMsg}}</span>
+                </td>
+              </tr>
+            </table>
+          </template>
+        </el-step>
+      </el-steps>
+      <div class="dialogButton">
+        <el-button size="small" @click="$emit('choceScheduleFun')">关闭</el-button>
+      </div>
+    </div>
+    <div style="height: 90%;margin-top:30px;" v-else>
+      <div style="text-align: center">
+        <i class="el-icon-document" style="font-size: 60px;"></i>
+        <div style="margin: 10px auto">暂无记录</div>
+      </div>
+      <div class="dialogButton">
+        <el-button size="small" @click="$emit('choceScheduleFun')">关闭</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  import option from './config/mainList.json'
+  import { auditProcessListXD } from "@/api/check/check";
+
+  export default {
+    name: "checkSchedule",
+    props: {
+      checkId: {
+        type: String
+      },
+      batchNo:{
+        type: String
+      },
+      times:{
+        type: String
+      },
+      choceScheduleFun:{
+        type: Function
+      }
+    },
+    data(){
+      return {
+        loading:false,
+        option:option,
+        active:1,
+        data:[],
+        page: {
+          pageSize: 10,
+          pagerCount: 5,
+          total: 0,
+        },
+      }
+    },
+    watch:{
+      checkId(val, oldVal) {
+        if(val != oldVal){
+          this.init()
+        }
+      },
+      batchNo(val, oldVal) {
+        if(val != oldVal){
+          this.init()
+        }
+      }
+    },
+    created() {
+
+    },
+    mounted() {
+      this.init()
+    },
+    methods:{
+      init(){
+        this.times = this.times?this.times:''
+        auditProcessListXD(this.checkId,this.batchNo,this.times).then(res =>{
+          res.data.data.map((item,index) =>{
+            if(item.auditStatus == "A"){
+              this.active = index + 2
+              item.title = "审批通过"
+              item.status = "success"
+            }
+            if(item.auditStatus == "B"){
+              item.title = "审批驳回"
+              item.status = "error"
+            }
+            if(item.auditStatus == "S" || item.auditStatus == "N"){
+              item.title = "待审批"
+            }
+          })
+
+          let sendObject = {
+            ... res.data.data[0],
+            auditName:res.data.data[0].sendName,
+            auditOpTime:res.data.data[0].sendTime,
+            auditMsg:res.data.data[0].sendMsg,
+            auditStatus:"O",
+            title:"提交",
+          }
+          res.data.data.unshift(sendObject)
+          this.data = res.data.data
+        })
+      }
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  /*::v-deep .el-step__title{*/
+  /*  font-size: 14px;*/
+  /*}*/
+</style>

+ 62 - 0
src/components/checkL/config/mainList.json

@@ -0,0 +1,62 @@
+{
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchShow": false,
+  "addBtn":false,
+  "editBtn":false,
+  "addRowBtn":false,
+  "cellBtn":false,
+  "cancelBtn":false,
+  "refreshBtn": false,
+  "searchMenuPosition": "right",
+  "searchMenuSpan": 24,
+  "searchSpan": 8,
+  "align": "center",
+  "delBtn":true,
+  "dialogWidth": "60%",
+  "tree": true,
+  "columnBtn": false,
+  "border": true,
+  "index": false,
+  "selection": false,
+  "menu": false,
+  "menuWidth": 0,
+  "dialogClickModal": false,
+  "column": [
+    {
+      "label": "操作人",
+      "prop": "auditName",
+      "overHidden": true,
+      "width": 180,
+      "index": 2
+    },
+    {
+      "label": "操作状态",
+      "prop": "auditStatus",
+      "type": "select",
+      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=auditStatus",
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      },
+      "overHidden": true,
+      "hide": true,
+      "index": 2
+    },
+    {
+      "label": "操作日期",
+      "prop": "auditOpTime",
+      "overHidden": true,
+      "width": 180,
+      "index": 2
+    },
+    {
+      "label": "备注",
+      "prop": "auditMsg",
+      "overHidden": true,
+      "width": 426,
+      "index": 4
+    }
+  ]
+}

+ 1 - 1
src/views/approveDataL/index.vue

@@ -92,7 +92,7 @@ import option2 from "./configuration/mainList2.json";
 import option3 from "./configuration/mainList3.json";
 import option4 from "./configuration/mainList4.json";
 import { getList, approvePass, financingExcess } from "@/api/approveDataL/main";
-import checkSchedule from "@/components/check/checkSchedule";
+import checkSchedule from "@/components/checkL/checkSchedule";
 import check from "./check";
 import { getUserInfo } from "@/api/system/user";
 import { gainUser } from "@/api/basicData/customerInquiry";

+ 1 - 1
src/views/tirePartsMall/basicData/accountManagement/detailsPage.vue

@@ -12,7 +12,7 @@
         <!--        </el-button>-->
         <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer">保存数据
         </el-button>
-        <el-button class="el-button--small-yh" type="primary" size="small" @click="enableNot" v-if="form.id">
+        <el-button class="el-button--small-yh" :type="form.enableOrNot == 0?'primary':''" size="small" @click="enableNot" v-if="form.id">
           {{ form.enableOrNot == 0 ? '启用' : '禁用' }}
         </el-button>
       </div>

+ 1 - 1
src/views/tirePartsMall/basicData/brandPage/detailsPage.vue

@@ -18,7 +18,7 @@
         </el-button>
         <el-button
             class="el-button--small-yh"
-            type="primary"
+            :type="form.enableOrNot == 0?'primary':''"
             size="small"
             @click="enableNot"
             v-if="form.id">

+ 1 - 1
src/views/tirePartsMall/basicData/customerInformation/detailsPage.vue

@@ -11,7 +11,7 @@
           <el-button type="primary" size="small" @click="editCustomer">
             保存数据
           </el-button>
-          <el-button class="el-button--small-yh" size="small" v-if="form.id" @click="editEnable">
+          <el-button class="el-button--small-yh" :type="form.enableOrNot == 0?'primary':''" size="small" v-if="form.id" @click="editEnable">
             {{ form.enableOrNot == 0 ? '启用' : '禁用' }}
           </el-button>
         </div>

+ 1 - 1
src/views/tirePartsMall/basicData/supplier/detailsPage.vue

@@ -13,7 +13,7 @@
         <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer">保存数据
         </el-button>
 
-        <el-button class="el-button--small-yh" type="primary" size="small" v-if="form.id" @click="editEnable">
+        <el-button class="el-button--small-yh" :type="form.enableOrNot == 0?'primary':''" size="small" v-if="form.id" @click="editEnable">
           {{ form.enableOrNot == 0 ? '启用' : '禁用' }}
         </el-button>
       </div>

+ 3 - 0
src/views/tirePartsMall/salesManagement/purchaseOrder/detailsPage.vue

@@ -915,6 +915,9 @@ export default {
                     label: '实际数量',
                     prop: 'sendTotalNum'
                 }, {
+                    label: '业务类型',
+                    prop: 'bizTypeName'
+                }, {
                     label: '状态',
                     prop: 'statusName'
                 }, {

+ 7 - 4
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -277,7 +277,7 @@ import {
 import { dotList, goodsDetail } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
 import reportDialog from "@/components/report-dialog/main";
 import { dateFormat } from "@/util/date";
-import checkSchedule from "@/components/check/checkSchedule";
+import checkSchedule from "@/components/checkL/checkSchedule";
 import check from "@/components/check/check";
 import {getList, listAll} from "@/api/tirePartsMall/basicData/listingManagement"
 import commodityxsho from '../../configuration/commodityxsho.json'
@@ -905,9 +905,12 @@ export default {
                     label: '数量',
                     prop: 'goodsTotalNum'
                 }, {
-                        label: '实际数量',
-                        prop: 'sendTotalNum'
-                    }, {
+                    label: '实际数量',
+                    prop: 'sendTotalNum'
+                }, {
+                    label: '业务类型',
+                    prop: 'bizTypeName'
+                }, {
                     label: '状态',
                     prop: 'statusName'
                 }, {