Browse Source

金额屏蔽

chris 2 years ago
parent
commit
c678b3da01

+ 93 - 0
src/views/modules/order/order-amount-mask-setting.vue

@@ -0,0 +1,93 @@
+<template>
+    <div>
+        <div class="my-title">订单金额屏蔽设置</div>
+        <!-- 表单 -->
+        <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="auto">
+          <el-row class="my-row">
+            <el-form-item label="屏蔽人" prop="userIds">
+              <user-components v-model="dataForm.userIds" :userIds.sync="dataForm.userIds" @change="userSelectedChanged"/>
+            </el-form-item>
+          </el-row>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="onChose">取消</el-button>
+          <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
+        </span>
+    </div>
+</template>
+
+<script>
+  import UserComponents from '../common/user-components'
+
+export default {
+    name: 'order-amount-mask-setting',
+    components: {
+      UserComponents
+    },
+    data () {
+      return {
+        visible: false,
+        dataForm: {
+          userIds: []
+        },
+        dataRule: {
+          userIds: [{ required: true, message: '请选择需屏蔽的人', trigger: 'change' }]
+        }
+      }
+    },
+    methods: {
+      onChose () {
+        this.$emit('onChose')
+      },
+      async init () {
+        this.dataForm = {}
+        this.$http({
+          url: this.$http.adornUrl(`/biz-service/order/priceConfig`),
+          method: 'get'
+        }).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataForm = {
+              userIds: data.data
+            }
+          }
+        })
+        this.visible = true
+      },
+      validateField (type) {
+        this.$refs.dataForm.validateField(type)
+      },
+      // 表单提交
+      dataFormSubmit () {
+        this.$refs['dataForm'].validate((valid) => {
+          if (valid) {
+            this.$http({
+              url: this.$http.adornUrl(`/biz-service/order/priceConfig`),
+              method: 'post',
+              data: this.dataForm.userIds
+            }).then(({data}) => {
+              if (data && data.code === '200') {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success',
+                  duration: 1500,
+                  onClose: () => {
+                    this.onChose()
+                  }
+                })
+              } else {
+                this.$message.error(data.msg)
+              }
+            })
+          }
+        })
+      },
+      userSelectedChanged (val) {
+        this.dataForm.userIds = val
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 15 - 2
src/views/modules/order/order.vue

@@ -1,7 +1,7 @@
 <!-- 订单 -->
 <template>
   <div class="order">
-    <template v-if="!addOrUpdateVisible && !detailVisible && !arrivedVisible && !confirmVisible && !noticeChangeAttachVisible">
+    <template v-if="!addOrUpdateVisible && !detailVisible && !arrivedVisible && !confirmVisible && !noticeChangeAttachVisible && !amountMaskSettingVisible">
       <el-form :inline="true" :model="dataForm" @keyup.enter.native="queryData()">
         <el-form-item label="客户名称">
           <cus-component v-model="dataForm.customerId" :cus-id="dataForm.customerId"></cus-component>
@@ -33,6 +33,7 @@
           <el-button @click="queryData()">查询</el-button>
           <el-button v-if="isAuth('order:ctl:save')" @click="addOrUpdateHandle(0, false)" type="primary">创建订单</el-button>
           <el-button v-if="isAuth('order:ctl:noteChangeConfig')" type="primary" @click="setNoticeChangeHandel()">订单业务变更通知设置</el-button>
+          <el-button v-if="isAuth('order:ctl:priceConfig')" type="primary" @click="setAmountMaskHandel()">订单金额屏蔽设置</el-button>
         </el-form-item>
       </el-form>
       <el-table
@@ -163,6 +164,7 @@
     <detail v-if="detailVisible" ref="detail" @onChose="onChose"/>
     <dispatch-arrived v-if="arrivedVisible" ref="arrived" @refreshDataList="getDataList" @onChose="onChose"></dispatch-arrived>
     <notice-change-setting v-if="noticeChangeAttachVisible" ref="noticeChangeSetting" @onChose="onChose"/>
+    <amount-mask-setting v-if="amountMaskSettingVisible" ref="amountMaskSetting" @onChose="onChose"/>
   </div>
 </template>
 
@@ -173,6 +175,7 @@
   import CusComponent from '../common/cus-component'
   import DispatchArrived from './dispatch-arrived'
   import NoticeChangeSetting from './order-notice-change-setting'
+  import AmountMaskSetting from './order-amount-mask-setting'
   export default {
     name: 'order',
     components: {
@@ -180,7 +183,8 @@
       CusComponent,
       AddOrUpdate,
       Detail,
-      NoticeChangeSetting
+      NoticeChangeSetting,
+      AmountMaskSetting
     },
     created () {
       this.optionsState = this.$store.state.common.approveStates
@@ -194,6 +198,7 @@
         arrivedVisible: false,
         confirmVisible: false,
         noticeChangeAttachVisible: false,
+        amountMaskSettingVisible: false,
         dataForm: {},
         dataList: [],
         pageIndex: 1,
@@ -233,6 +238,7 @@
         this.arrivedVisible = false
         this.confirmVisible = false
         this.noticeChangeAttachVisible = false
+        this.amountMaskSettingVisible = false
       },
       // 查询
       queryData () {
@@ -369,6 +375,13 @@
             }
           })
         }).catch(() => {})
+      },
+      // 采购金额屏蔽设置
+      setAmountMaskHandel () {
+        this.amountMaskSettingVisible = true
+        this.$nextTick(() => {
+          this.$refs.amountMaskSetting.init()
+        })
       }
     }
   }

+ 93 - 0
src/views/modules/sale/outsource-amount-mask-setting.vue

@@ -0,0 +1,93 @@
+<template>
+    <div>
+        <div class="my-title">委外金额屏蔽设置</div>
+        <!-- 表单 -->
+        <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="auto">
+          <el-row class="my-row">
+            <el-form-item label="屏蔽人" prop="userIds">
+              <user-components v-model="dataForm.userIds" :userIds.sync="dataForm.userIds" @change="userSelectedChanged"/>
+            </el-form-item>
+          </el-row>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="onChose">取消</el-button>
+          <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
+        </span>
+    </div>
+</template>
+
+<script>
+  import UserComponents from '../common/user-components'
+
+export default {
+    name: 'outsource-amount-mask-setting',
+    components: {
+      UserComponents
+    },
+    data () {
+      return {
+        visible: false,
+        dataForm: {
+          userIds: []
+        },
+        dataRule: {
+          userIds: [{ required: true, message: '请选择需屏蔽的人', trigger: 'change' }]
+        }
+      }
+    },
+    methods: {
+      onChose () {
+        this.$emit('onChose')
+      },
+      async init () {
+        this.dataForm = {}
+        this.$http({
+          url: this.$http.adornUrl(`/biz-service/purCommDetail/priceConfig`),
+          method: 'get'
+        }).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataForm = {
+              userIds: data.data
+            }
+          }
+        })
+        this.visible = true
+      },
+      validateField (type) {
+        this.$refs.dataForm.validateField(type)
+      },
+      // 表单提交
+      dataFormSubmit () {
+        this.$refs['dataForm'].validate((valid) => {
+          if (valid) {
+            this.$http({
+              url: this.$http.adornUrl(`/biz-service/purCommDetail/priceConfig`),
+              method: 'post',
+              data: this.dataForm.userIds
+            }).then(({data}) => {
+              if (data && data.code === '200') {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success',
+                  duration: 1500,
+                  onClose: () => {
+                    this.onChose()
+                  }
+                })
+              } else {
+                this.$message.error(data.msg)
+              }
+            })
+          }
+        })
+      },
+      userSelectedChanged (val) {
+        this.dataForm.userIds = val
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 16 - 2
src/views/modules/sale/outsource.vue

@@ -1,7 +1,7 @@
 <!-- 委外列表 -->
 <template>
   <div class="sale">
-    <template v-if="!detailVisible && !addOrUpdateVisible && !changeFormVisible &&!changeAttachVisible && !attachVisible && !noticeChangeAttachVisible && !inboundVisible && !outsourceVisible && !noticeChangeAttachVisible">
+    <template v-if="!detailVisible && !addOrUpdateVisible && !changeFormVisible &&!changeAttachVisible && !attachVisible && !noticeChangeAttachVisible && !inboundVisible && !outsourceVisible && !noticeChangeAttachVisible && !amountMaskSettingVisible">
       <el-form :inline="true" :model="dataForm" @keyup.enter.native="search()">
         <el-form-item label="类别">
           <el-select
@@ -45,6 +45,7 @@
         <el-form-item>
           <el-button @click="search()">查询</el-button>
           <el-button v-if="isAuth('pur:commDetail:noteChangeConfig')" type="primary" @click="setNoticeChangeHandel()">工作提示通知设置</el-button>
+          <el-button v-if="isAuth('pur:commDetail:priceConfig')" type="primary" @click="setAmountMaskHandel()">委外金额屏蔽设置</el-button>
         </el-form-item>
       </el-form>
       <el-table
@@ -249,6 +250,7 @@
     <!-- 入库 -->
     <stock-order-inbound v-if="inboundVisible" ref="inbound" @refreshDataList="getDataList" @onChose="onChose"/>
     <outsource-pop v-if="outsourceVisible" ref="refOutsource" @refreshDataList="getDataList" @onChose="onChose"/>
+    <amount-mask-setting v-if="amountMaskSettingVisible" ref="amountMaskSetting" @onChose="onChose"/>
   </div>
 </template>
 
@@ -262,6 +264,8 @@ import ChangeForm from '../cus/contract-record-change'
 import { getDictList } from '@/api/dict'
 import StockOrderInbound from '../warehouse/stock-order-inbound'
 import OutsourcePop from './outsource-pop'
+import AmountMaskSetting from './outsource-amount-mask-setting'
+
 export default {
   name: 'outsource',
   components: {
@@ -271,7 +275,8 @@ export default {
     Detail,
     NoticeChangeSetting,
     ChangeForm,
-    StockOrderInbound
+    StockOrderInbound,
+    AmountMaskSetting
   },
   data () {
     return {
@@ -280,6 +285,7 @@ export default {
       attachVisible: false,
       changeAttachVisible: false,
       noticeChangeAttachVisible: false,
+      amountMaskSettingVisible: false,
       changeFormVisible: false,
       inboundVisible: false, // 入库申请
       outsourceVisible: false, // 委外
@@ -319,6 +325,7 @@ export default {
       this.changeAttachVisible = false
       this.inboundVisible = false
       this.outsourceVisible = false
+      this.amountMaskSettingVisible = false
     },
     // 查询
     search () {
@@ -496,6 +503,13 @@ export default {
       this.$nextTick(() => {
         this.$refs.noticeChangeSetting.init()
       })
+    },
+    // 委外金额屏蔽设置
+    setAmountMaskHandel () {
+      this.amountMaskSettingVisible = true
+      this.$nextTick(() => {
+        this.$refs.amountMaskSetting.init()
+      })
     }
   }
 }

+ 93 - 0
src/views/modules/sale/purchase-amount-mask-setting.vue

@@ -0,0 +1,93 @@
+<template>
+    <div>
+        <div class="my-title">采购金额屏蔽设置</div>
+        <!-- 表单 -->
+        <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="auto">
+          <el-row class="my-row">
+            <el-form-item label="屏蔽人" prop="userIds">
+              <user-components v-model="dataForm.userIds" :userIds.sync="dataForm.userIds" @change="userSelectedChanged"/>
+            </el-form-item>
+          </el-row>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="onChose">取消</el-button>
+          <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
+        </span>
+    </div>
+</template>
+
+<script>
+  import UserComponents from '../common/user-components'
+
+export default {
+    name: 'purchase-amount-mask-setting',
+    components: {
+      UserComponents
+    },
+    data () {
+      return {
+        visible: false,
+        dataForm: {
+          userIds: []
+        },
+        dataRule: {
+          userIds: [{ required: true, message: '请选择需屏蔽的人', trigger: 'change' }]
+        }
+      }
+    },
+    methods: {
+      onChose () {
+        this.$emit('onChose')
+      },
+      async init () {
+        this.dataForm = {}
+        this.$http({
+          url: this.$http.adornUrl(`/biz-service/purchaseDetail/priceConfig`),
+          method: 'get'
+        }).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataForm = {
+              userIds: data.data
+            }
+          }
+        })
+        this.visible = true
+      },
+      validateField (type) {
+        this.$refs.dataForm.validateField(type)
+      },
+      // 表单提交
+      dataFormSubmit () {
+        this.$refs['dataForm'].validate((valid) => {
+          if (valid) {
+            this.$http({
+              url: this.$http.adornUrl(`/biz-service/purchaseDetail/priceConfig`),
+              method: 'post',
+              data: this.dataForm.userIds
+            }).then(({data}) => {
+              if (data && data.code === '200') {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success',
+                  duration: 1500,
+                  onClose: () => {
+                    this.onChose()
+                  }
+                })
+              } else {
+                this.$message.error(data.msg)
+              }
+            })
+          }
+        })
+      },
+      userSelectedChanged (val) {
+        this.dataForm.userIds = val
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 14 - 2
src/views/modules/sale/purchase.vue

@@ -1,7 +1,7 @@
 <!-- 采购列表 -->
 <template>
   <div class="purchase">
-    <template v-if="!addOrUpdateVisible && !detailVisible && !operateVisible && !inboundVisible && !noticeChangeAttachVisible">
+    <template v-if="!addOrUpdateVisible && !detailVisible && !operateVisible && !inboundVisible && !noticeChangeAttachVisible && !amountMaskSettingVisible">
       <el-form :inline="true" :model="dataForm" @keyup.enter.native="search()">
         <el-form-item label="类别">
           <el-select
@@ -46,6 +46,7 @@
           <el-button @click="search()">查询</el-button>
           <el-button v-if="isAuth('purchase:detail:save')" type="primary" @click="addOrUpdateHandle(0)">新建采购申请</el-button>
           <el-button v-if="isAuth('purchase:detail:noteChangeConfig')" type="primary" @click="setNoticeChangeHandel()">工作提示通知设置</el-button>
+          <el-button v-if="isAuth('purchase:detail:priceConfig')" type="primary" @click="setAmountMaskHandel()">采购金额屏蔽设置</el-button>
         </el-form-item>
       </el-form>
       <el-table
@@ -232,6 +233,7 @@
     <!-- 入库 -->
     <inbound v-if="inboundVisible" ref="inbound" @onChose="onChose" @refreshDataList="getDataList"/>
     <notice-change-setting v-if="noticeChangeAttachVisible" ref="noticeChangeSetting" @onChose="onChose"/>
+    <amount-mask-setting v-if="amountMaskSettingVisible" ref="amountMaskSetting" @onChose="onChose"/>
 <!--    <change-form v-if="changeFormVisible" ref="changeForm" @refreshDataList="getDataList" @onChose="onChose"/>-->
   </div>
 </template>
@@ -244,10 +246,11 @@
   import { getDictList } from '@/api/dict'
   import { getPurchaseList, revokePurchase } from '@/api/sale'
   import NoticeChangeSetting from './purchase-notice-change-setting'
+  import AmountMaskSetting from './purchase-amount-mask-setting'
   export default {
     name: 'purchase',
     components: {
-      AddOrUpdate, Detail, Operate, Inbound, NoticeChangeSetting
+      AddOrUpdate, Detail, Operate, Inbound, NoticeChangeSetting, AmountMaskSetting
     },
     data () {
       return {
@@ -256,6 +259,7 @@
         operateVisible: false,
         inboundVisible: false,
         noticeChangeAttachVisible: false,
+        amountMaskSettingVisible: false,
         dataForm: {},
         userId: 0,
         dataList: [],
@@ -291,6 +295,7 @@
         this.operateVisible = false
         this.inboundVisible = false
         this.noticeChangeAttachVisible = false
+        this.amountMaskSettingVisible = false
       },
       // 获取采购类别字典
       getTypeList () {
@@ -431,6 +436,13 @@
         this.$nextTick(() => {
           this.$refs.noticeChangeSetting.init()
         })
+      },
+      // 采购金额屏蔽设置
+      setAmountMaskHandel () {
+        this.amountMaskSettingVisible = true
+        this.$nextTick(() => {
+          this.$refs.amountMaskSetting.init()
+        })
       }
     }
   }