970319330@qq.com 1 Minggu lalu
induk
melakukan
d2804e2bc5

+ 2 - 1
.claude/settings.local.json

@@ -2,7 +2,8 @@
   "permissions": {
     "allow": [
       "Bash(npm install *)",
-      "Bash(timeout 30 npm run serve)"
+      "Bash(timeout 30 npm run serve)",
+      "mcp__ide__getDiagnostics"
     ]
   }
 }

+ 3 - 1
src/HDrpManagement/ProductMag/detail/index.vue

@@ -72,6 +72,7 @@
           class="inline-16"
           v-if="tool.checkAuth($route.name,'delete') && mainData.status == '新建'"
         />
+        <Void :data="mainData" @onSuccess="$router.back()" v-if="tool.checkAuth($route.name,'toVoid') && mainData.isonsale == 0 && mainData.status == '新建'"/>
       </div>
       <div slot="slot0" >
         <detail_data :basic="mainData"></detail_data>
@@ -114,6 +115,7 @@ import productGroup from '../modules/productGroup.vue'
 import productPrice from '../modules/productPrice'
 import addClass from '../modules/addClass'
 import productInfo from './modules/productInfo'
+import Void from '../modules/void'
 export default {
   name: "index",
   data() {
@@ -122,7 +124,7 @@ export default {
       mainAreaData:{}
     }
   },
-  components:{detail_data,saleClass,productPrice,addClass,Edit,productGroup,productInfo},
+  components:{detail_data,saleClass,productPrice,addClass,Edit,productGroup,productInfo,Void},
   methods: {
     async queryMainData(id) {
       const res = await this.$api.requested({

+ 58 - 0
src/HDrpManagement/ProductMag/modules/void.vue

@@ -0,0 +1,58 @@
+<template>
+  <div class="inline-16">
+    <el-button size="mini" type="primary" @click="dialog = true">{{$t('作 废')}}</el-button>
+    <el-dialog append-to-body width="600px" :title="$t('作废')" :visible.sync="dialog">
+      <el-row :gutter="20">
+        <el-form label-position="right" ref="form" :rules="rules" inline :label-width="tool.onlyZh('100px')" :model="form" size="small">
+          <el-col :span="24">
+            <el-form-item :label="$t('作废原因')" prop="deletereason">
+              <el-input v-model="form.deletereason" style="width: 400px" :placeholder="$t('请输入作废原因')"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+      <div class="dialog-footer">
+        <el-button size="small" @click="dialog = false" class="normal-btn-width">{{$t('取 消')}}</el-button>
+        <el-button size="small" type="warning" @click="onSubmit" class="normal-btn-width btn-warning">{{$t('确 定')}}</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'productVoid',
+  props: ['data'],
+  data() {
+    return {
+      dialog: false,
+      form: {
+        deletereason: ''
+      },
+      rules: {
+        deletereason: [
+          { required: true, message: this.$t('请填写作废原因'), trigger: 'blur' },
+        ],
+      }
+    }
+  },
+  methods: {
+    onSubmit() {
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          id: 2026051213372102,
+          content: {
+            itemid: this.data.itemid,
+            deletereason: this.form.deletereason
+          },
+        })
+        this.tool.showMessage(res, () => {
+          this.dialog = false
+          this.$emit('onSuccess')
+        })
+      })
+    }
+  }
+}
+</script>

+ 20 - 9
src/HDrpManagement/dispatch/details/index.vue

@@ -451,15 +451,26 @@ import printMaterials from "../modules/printMaterials";
         })
       },
       async onClose(){
-        const res = await this.$api.requested({
-          "id": 2025070114184202,
-          "content": {
-            "sa_dispatchid": this.$route.query.id
-          },
-        })
-        this.tool.showMessage(res,()=>{
-          this.queryMainData()
-        })
+        this.$confirm(this.$t('是否确定关闭当前发货单?'), this.$t('提示'), {
+          confirmButtonText: this.$t('确定'),
+          cancelButtonText: this.$t('取消'),
+          type: 'warning'
+        }).then(async () => {
+          const res = await this.$api.requested({
+            "id": 2025070114184202,
+            "content": {
+              "sa_dispatchid": this.$route.query.id
+            },
+          })
+          this.tool.showMessage(res,()=>{
+            this.queryMainData()
+          })
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: this.$t('已取消')
+          });
+        });
       },
       async isReCheck(){
         const res = await this.$api.requested({

+ 15 - 18
src/HDrpManagement/recvoucher/details/index.vue

@@ -40,6 +40,8 @@
           :dialog="true"
           dialogTitle="请输入对冲金额"
           dialogKey="amount"
+          dialogNoteLabel="请输入备注"
+          dialogNoteKey="remarks"
           :id="$route.query.id"
           @onSuccess="duichong"
           class="inline-16"
@@ -111,25 +113,20 @@ export default {
       this.changeDataStructure()
     },
     duichong (data) {
-      this.$store.dispatch('changeDetailDrawer',false)
-      this.$router.push('/recvoucher')
-      this.$router.replace({
-        path:'/recvoucherDetails',
-        query:{
-          id:data.sa_cashbillid,
-        }
-      })
-      setTimeout(() => {
-       /* this.$router.replace({
-          path:'/recvoucherDetails',
-          query:{
-            id:data.sa_cashbillid,
-          }
-        })*/
-        this.$store.dispatch('changeDetailDrawer',true)
-        /*this.queryMainData(this.$route.query.id)*/
-      })
+      this.queryMainData(this.$route.query.id)
+      this.$refs.hedgeVoucher && this.$refs.hedgeVoucher.listData()
+      this.$refs.bill && this.$refs.bill.listData()
 
+      this.$confirm(this.$t('对冲成功,是否前往新单据?'), this.$t('提示'), {
+        confirmButtonText: this.$t('前往'),
+        cancelButtonText: this.$t('留在当前'),
+        type: 'success'
+      }).then(() => {
+        this.$router.replace({ path: '/recvoucherDetails', query: { id: data.sa_cashbillid } })
+        this.queryMainData(data.sa_cashbillid)
+        this.$refs.hedgeVoucher && this.$refs.hedgeVoucher.listData()
+        this.$refs.bill && this.$refs.bill.listData()
+      }).catch(() => {})
     },
     changeDataStructure(){
       let that = this

+ 5 - 1
src/HManagement/ecycle/agentManage/index.vue

@@ -150,8 +150,12 @@ export default {
           value: "6",
         },
         {
-          label: '公海线索',
+          label: '商品',
           value: "7",
+        },
+        {
+          label: '公海线索',
+          value: "8",
         }
       ],
       dateSelect:'',

+ 5 - 1
src/HManagement/ecycle/application/index.vue

@@ -52,8 +52,12 @@ export default {
           value: "6",
         },
         {
-          label: '公海线索',
+          label: '商品',
           value: "7",
+        },
+        {
+          label: '公海线索',
+          value: "8",
         }
       ],
     }

+ 5 - 1
src/HManagement/ecycle/contract/index.vue

@@ -157,8 +157,12 @@ export default {
           value: "6",
         },
         {
-          label: '公海线索',
+          label: '商品',
           value: "7",
+        },
+        {
+          label: '公海线索',
+          value: "8",
         }
       ],
       dateSelect:'',

+ 5 - 1
src/HManagement/ecycle/customer/index.vue

@@ -165,8 +165,12 @@ export default {
           value: "6",
         },
         {
-          label: '公海线索',
+          label: '商品',
           value: "7",
+        },
+        {
+          label: '公海线索',
+          value: "8",
         }
       ],
       option:{

+ 21 - 2
src/HManagement/ecycle/index.vue

@@ -7,6 +7,7 @@
     <customer v-if="customerShow" @changeApplication="onChange"></customer>
     <agenter v-if="agenerShow" @changeApplication="onChange"></agenter>
     <publicClue v-if="pubClueShow" @changeApplication="onChange"></publicClue>
+    <product v-if="productShow" @changeApplication="onChange"></product>
   </div>
 </template>
 
@@ -18,9 +19,10 @@ import contract from './contract/index'
 import customer from './customer/index'
 import agenter from './agentManage/index'
 import publicClue from './publicClue/index'
+import product from './product/index'
 export default {
   name: "index",
-  components:{saleClue,projectChange,quotedPrice,contract,customer,agenter,publicClue},
+  components:{saleClue,projectChange,quotedPrice,contract,customer,agenter,publicClue,product},
   data(){
     return {
       salClueShow:true,
@@ -29,7 +31,8 @@ export default {
       contractShow:false,
       customerShow:false,
       agenerShow:false,
-      pubClueShow:false
+      pubClueShow:false,
+      productShow:false
     }
   },
   methods:{
@@ -44,6 +47,7 @@ export default {
         this.customerShow = false
         this.agenerShow = false
         this.pubClueShow = false
+        this.productShow = false
       }else if (val === '2') {
         this.customerShow = true
         this.salClueShow = false
@@ -52,6 +56,7 @@ export default {
         this.contractShow = false
         this.agenerShow = false
         this.pubClueShow = false
+        this.productShow = false
       }else if (val === '3'){
         this.contractShow = true
         this.quotedPriceShow = false
@@ -60,6 +65,7 @@ export default {
         this.customerShow = false
         this.agenerShow = false
         this.pubClueShow = false
+        this.productShow = false
       }else if (val === '4'){
         this.projectChangeShow = true
         this.quotedPriceShow = false
@@ -68,6 +74,7 @@ export default {
         this.customerShow = false
         this.agenerShow = false
         this.pubClueShow = false
+        this.productShow = false
       }else if (val === '5'){
         this.quotedPriceShow = true
         this.customerShow = false
@@ -76,6 +83,7 @@ export default {
         this.projectChangeShow = false
         this.agenerShow = false
         this.pubClueShow = false
+        this.productShow = false
       }else if (val === '6'){
         this.agenerShow = true
         this.customerShow = false
@@ -84,7 +92,17 @@ export default {
         this.projectChangeShow = false
         this.quotedPriceShow = false
         this.pubClueShow = false
+        this.productShow = false
       }else if (val === '7'){
+        this.productShow = true
+        this.customerShow = false
+        this.contractShow = false
+        this.salClueShow = false
+        this.projectChangeShow = false
+        this.quotedPriceShow = false
+        this.agenerShow = false
+        this.pubClueShow = false
+      }else if (val === '8'){
         this.pubClueShow = true
         this.customerShow = false
         this.contractShow = false
@@ -92,6 +110,7 @@ export default {
         this.projectChangeShow = false
         this.quotedPriceShow = false
         this.agenerShow = false
+        this.productShow = false
       }
       console.log(this.projectChangeShow,this.salClueShow)
     }

+ 9 - 5
src/HManagement/ecycle/modules/batchRecovery.vue

@@ -7,7 +7,7 @@
 <script>
 export default {
   name: "batchRecovery",
-  props:["sys_object","ownerids"],
+  props:["sys_object","ownerids","ownertable"],
   data(){
     return {
       length:0
@@ -30,12 +30,16 @@ export default {
       });
     },
     async onRecovery(){
+      const content = {
+        "sys_object": this.sys_object,//1-线索,2-客户,3-合同,4-项目商机,5-报价单
+        "ownerids": this.ownerids
+      }
+      if (this.ownertable) {
+        content.ownertable = this.ownertable
+      }
       const res = await this.$api.requested({
         "id": 20230103131104,
-        "content": {
-          "sys_object": this.sys_object,//1-线索,2-客户,3-合同,4-项目商机,5-报价单
-          "ownerids": this.ownerids
-        }
+        "content": content
       })
       this.tool.showMessage(res,()=>{
         this.$emit("recoverySuccess")

+ 9 - 5
src/HManagement/ecycle/modules/recovery.vue

@@ -73,7 +73,7 @@
 <script>
 export default {
   name: "recovery",
-  props:["sys_object","ownerid","data","type"],
+  props:["sys_object","ownerid","data","type","ownertable"],
   data(){
     return {
       dialogTableVisible:false,
@@ -184,12 +184,16 @@ export default {
       });
     },
     async onRecovery(){
+      const content = {
+        "sys_object": this.sys_object,//1-线索,2-客户,3-合同,4-项目商机,5-报价单
+        "ownerids": [this.ownerid]
+      }
+      if (this.ownertable) {
+        content.ownertable = this.ownertable
+      }
       const res = await this.$api.requested({
         "id": 20230103131104,
-        "content": {
-          "sys_object": this.sys_object,//1-线索,2-客户,3-合同,4-项目商机,5-报价单
-          "ownerids": [this.ownerid]
-        }
+        "content": content
       })
       this.tool.showMessage(res,()=>{
         this.$emit("recoverySuccess")

+ 277 - 0
src/HManagement/ecycle/product/index.vue

@@ -0,0 +1,277 @@
+<template>
+  <div>
+    <basicLayout
+      ref="basicLayout"
+      tableName="productManageTable"
+      idName="itemid"
+      ownertable="plm_item"
+      :apiId="{query:20220923140602,del:''}"
+      :options="options"
+      :specialKey="[{key:'itemclass',value:null},{key:'tradefield',value:null},{key:'brand',value:null}]"
+      @checkboxCallBack="checkboxCallBack"
+      :autoQuery="false"
+      :isExport="false"
+      >
+      <template #titleLight>
+        <batchDeletion v-if="tool.checkAuth($route.name,'batchDeletion')" ref="batchDeletion" :ownerids="selectData" :sys_object="application" ownertable="item" @delSuccess="queryData"></batchDeletion>
+        <batchRecovery v-if="tool.checkAuth($route.name,'batchRecovery')" ref="batchRecovery" :ownerids="selectData" :sys_object="application" ownertable="item" @recoverySuccess="queryData"></batchRecovery>
+      </template>
+      <template #custom>
+        <div class="mt-10">
+          <p class="search__label">{{ $t('应用') }}:</p>
+          <el-select
+              class="inline-24"
+              size="small"
+              v-model="application"
+              :placeholder="$t('请选择范围')"
+              @change="applicationChange"
+          >
+            <el-option
+                v-for="item in applicationList"
+                :key="item.index"
+                :label="$t(item.label)"
+                :value="item.value"
+            ></el-option>
+          </el-select>
+        </div>
+        <div class="mt-10">
+          <label  class="search__label" >{{$t(`是否上架`)}}:</label>
+          <el-select class="inline-24" v-model="selectParam.isonsale" :placeholder="$t(`请选择是否上架`)" @change="selectChange" size="small" clearable>
+            <el-option
+                v-for="item in isOnSaleData"
+                :key="item.value"
+                :label="$t(item.label)"
+                :value="item.value">
+            </el-option>
+          </el-select>
+        </div>
+        <div class="mt-10">
+          <label  class="search__label" >{{$t(`状态`)}}:</label>
+          <el-select class="inline-24" v-model="selectParam.status" :placeholder="$t(`请选择状态`)" @change="selectChange" size="small" clearable>
+            <el-option
+                v-for="item in statusData"
+                :key="item.value"
+                :label="$t(item.value)"
+                :value="item.value">
+            </el-option>
+          </el-select>
+        </div>
+        <div class="mt-10">
+          <label class="search__label" >{{$t(`上架时间`)}}:</label>
+          <el-date-picker
+              style="margin-right: 24px !important;"
+              size="small"
+              @change="selectChange"
+              value-format="yyyy-MM-dd"
+              v-model="dateSelect"
+              type="daterange"
+              :range-separator="$t(`至`)"
+              :start-placeholder="$t(`开始日期`)"
+              :end-placeholder="$t(`结束日期`)"
+              clearable>
+          </el-date-picker>
+        </div>
+        <div class="mt-10">
+          <el-input
+            style="width:200px;"
+            :placeholder="$t(`型号`)"
+            suffix-icon="el-icon-search"
+            v-model="selectParam.model" @keyup.native.enter="selectChange" @clear="selectChange" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+          </el-input>
+        </div>
+        <div class="mt-10">
+          <el-input
+            style="width:200px;"
+            :placeholder="$t(`规格`)"
+            suffix-icon="el-icon-search"
+            v-model="selectParam.spec" @keyup.native.enter="selectChange" @clear="selectChange" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+          </el-input>
+        </div>
+        <div class="mt-10">
+          <label  class="search__label" >{{$t('领域')}}:</label>
+          <el-select class="inline-24" v-model="selectParam.tradefield" :placeholder="$t(`请选择状态`)" @change="selectChange" size="small" clearable >
+            <el-option
+                v-for="item in tradefieldData"
+                :key="item.value"
+                :label="$t(item.value)"
+                :value="item.value">
+            </el-option>
+          </el-select>
+        </div>
+        <div class="mt-10" v-if="siteid == 'HY' || siteid == 'TZ'">
+          <label  class="search__label" >{{$t(`商品大类`)}}:</label>
+          <el-select class="inline-24" v-model="selectParam.categories" :placeholder="$t(`请选择商品大类`)" @change="selectChange" size="small" clearable >
+            <el-option
+                v-for="item in categoriesList"
+                :key="item.value"
+                :label="$t(item.value)"
+                :value="item.value">
+            </el-option>
+          </el-select>
+        </div>
+        <selectTemplate title="供应方" payload="supplier" @onChange="onChange"></selectTemplate>
+      </template>
+      <template v-slot:tbList="scope">
+        <div>
+        <p :style="{color:scope.data.column.data.isonsale === 1?tool.getStatusColor('上架',true):tool.getStatusColor('下架',true)}" v-if="scope.data.column.columnname === 'isonsale'">
+          {{ scope.data.column.data.isonsale ? $t('上架') : $t('下架') }}
+        </p>
+        <p v-else-if="scope.data.column.columnname === 'cover'">
+          <previewImage v-if="scope.data.column.data.attinfos[0]" class="image" :image="scope.data.column.data.attinfos[0]" :list="scope.data.column.data.attinfos" :deletebtn="false"></previewImage>
+        </p>
+        <p v-else-if="scope.data.column.columnname === 'tradefield'">
+          <span v-if="JSON.stringify(scope.data.column.data.tradefield) !== '[]' && scope.data.column.data.tradefield">
+            <span v-for="item in scope.data.column.data.tradefield">
+              <el-tag style="margin-right: 10px;margin-top: 5px;margin-bottom: 5px">{{$t(item.tradefield)}}</el-tag>
+            </span>
+          </span>
+          <span v-else>
+           </span>
+        </p>
+        <p v-else-if="scope.data.column.columnname === 'brand'">
+          <span v-if="JSON.stringify(scope.data.column.data.brand) !== '[]' && scope.data.column.data.brand">
+             <span v-for="item in scope.data.column.data.brand">
+               <el-tag style="margin-right: 10px;margin-top: 5px;margin-bottom: 5px" type="warning">{{$t(item.brandname)}}</el-tag>
+            </span>
+          </span>
+         <span v-else>
+         </span>
+        </p>
+        <p v-else-if="scope.data.column.columnname === 'itemclass'">
+          <span v-if="JSON.stringify(scope.data.column.data.itemclass) !== '[]' && scope.data.column.data.itemclass">
+             <span v-for="item in scope.data.column.data.itemclass" :key="item.index">
+               <el-tag style="margin-right: 10px;margin-top: 5px;margin-bottom: 5px" type="success">{{$t(item.itemclassfullname)}}</el-tag>
+            </span>
+          </span>
+          <span v-else>
+           </span>
+        </p>
+        <p v-else-if="scope.data.column.columnname === 'istool'" :style="{color:scope.data.column.data[[scope.data.column.columnname]] === 0?tool.getStatusColor('否',true):tool.getStatusColor('是',true)}">
+          {{scope.data.column.data[[scope.data.column.columnname]] === 0?$t('否'):$t('是')}}
+        </p>
+        <p v-else-if="scope.data.column.columnname === 'status'">
+          <span :style="tool.getStatusColor(scope.data.column.data[[scope.data.column.columnname]])" >{{$t(scope.data.column.data[[scope.data.column.columnname]])}}</span>
+        </p>
+        <div v-else-if="scope.data.column.columnname === 'nominalpressure'">
+          {{tool.nominalPressureSet(scope.data.column.data.nominalpressure)}}
+        </div>
+        <div v-else>{{scope.data.column.columnname === 'operation' || scope.data.column.data[scope.data.column.columnname]?scope.data.column.data[scope.data.column.columnname] : '--'}}</div>
+        </div>
+      </template>
+      <template v-slot:tbOpreation="scope">
+        <delData class="inline-16" :ownerid="scope.data.data.itemid" :sys_object="application" ownertable="plm_item" @delSuccess="delSuccess"></delData>
+        <recovery class="inline-16" :ownerid="scope.data.data.itemid" :sys_object="application" ownertable="plm_item" @recoverySuccess="queryData"></recovery>
+      </template>
+    </basicLayout>
+  </div>
+</template>
+
+<script>
+import previewImage from '@/components/previewImage/index'
+import recovery from "@/HManagement/ecycle/modules/recovery"
+import delData from "@/HManagement/ecycle/modules/delData"
+import batchDeletion from "@/HManagement/ecycle/modules/batchDeletion";
+import batchRecovery from "@/HManagement/ecycle/modules/batchRecovery";
+import selectTemplate from '@/components/generalTemplate/select'
+
+export default {
+  data () {
+    return {
+      application:'7',
+      applicationList:[
+        { label: '销售线索', value: "1" },
+        { label: '客户',     value: "2" },
+        { label: '合同',     value: "3" },
+        { label: '项目商机', value: "4" },
+        { label: '报价单',   value: "5" },
+        { label: '合作伙伴', value: "6" },
+        { label: '商品',     value: "7" },
+        { label: '公海线索', value: "8" }
+      ],
+      options:[],
+      isOnSaleData:[
+        { value:0, label:'否' },
+        { value:1, label:'是' }
+      ],
+      statusData:[
+        { value:'新建', label:'新建' },
+        { value:'审核', label:'审核' }
+      ],
+      selectParam:{
+        isonsale:'',
+        begindate:'',
+        enddate:'',
+        status:'',
+        model:'',
+        spec:'',
+        tradefield:'',
+        categories:'',
+        supplier:''
+      },
+      selectData:[],
+      tradefieldData:[],
+      dateSelect:'',
+      siteid:JSON.parse(sessionStorage.getItem('active_account')).siteid,
+      categoriesList:[]
+    }
+  },
+  components:{previewImage,recovery,delData,batchDeletion,batchRecovery,selectTemplate},
+  methods:{
+    queryData(){
+      this.$refs.basicLayout.param.content.where = this.selectParam
+      this.$refs.basicLayout.param.content.deleted = 1
+      this.$refs.basicLayout.listData()
+    },
+    applicationChange(val){
+      this.$emit("changeApplication",val)
+    },
+    delSuccess(){
+      this.queryData()
+    },
+    checkboxCallBack(val){
+      this.selectData = []
+      val.forEach((item,index) => {
+        this.selectData[index] = item.itemid
+      })
+      this.$refs.batchDeletion.length = this.selectData.length
+      this.$refs.batchRecovery.length = this.selectData.length
+    },
+    selectChange(){
+      if (this.dateSelect !== '' && this.dateSelect !== null){
+        this.selectParam.begindate = this.dateSelect[0]
+        this.selectParam.enddate = this.dateSelect[1]
+      }else {
+        this.selectParam.begindate = ''
+        this.selectParam.enddate = ''
+      }
+      this.$refs.basicLayout.param.content.pageNumber = 1
+      this.$refs.basicLayout.param.content.where = this.selectParam
+      this.$refs.basicLayout.listData()
+    },
+    onChange(data,type){
+      this.selectParam[type] = data
+      this.selectChange()
+    },
+    querytradefield(){
+      this.$store.dispatch('optiontypeselect','tradefield').then(res=>{
+        this.tradefieldData = res.data
+      })
+      this.$store.dispatch('optiontypeselect','categories').then(res=>{
+        this.categoriesList = res.data
+      })
+    }
+  },
+  mounted() {
+    this.querytradefield()
+    this.queryData()
+  },
+}
+
+</script>
+<style scoped>
+.image{
+  height: 38px;
+  width: 38px;
+  margin-top:0;
+}
+</style>

+ 5 - 1
src/HManagement/ecycle/projectChange/index.vue

@@ -165,8 +165,12 @@ export default {
           value: "6",
         },
         {
-          label: '公海线索',
+          label: '商品',
           value: "7",
+        },
+        {
+          label: '公海线索',
+          value: "8",
         }
       ],
       projectType:'',

+ 1 - 1
src/HManagement/ecycle/publicClue/index.vue

@@ -106,7 +106,7 @@ export default {
   components:{recovery,delData,batchDeletion,batchRecovery,application},
   data(){
     return {
-      application:'7',
+      application:'8',
       options:{
         cluesourcesift:[],
         tradefield:[],

+ 5 - 1
src/HManagement/ecycle/quotedPrice/index.vue

@@ -151,8 +151,12 @@ export default {
           value: "6",
         },
         {
-          label: '公海线索',
+          label: '商品',
           value: "7",
+        },
+        {
+          label: '公海线索',
+          value: "8",
         }
       ],
       dateSelect:'',

+ 5 - 1
src/HManagement/ecycle/saleClue/index.vue

@@ -106,8 +106,12 @@ export default {
           value: "6",
         },
         {
-          label: '公海线索',
+          label: '商品',
           value: "7",
+        },
+        {
+          label: '公海线索',
+          value: "8",
         }
       ],
       status:'',

+ 100 - 33
src/components/customBtn/index.vue

@@ -6,6 +6,24 @@
       :size="size ? size : 'mini'"
       @click="submit"
     >{{ $t(btnName) }}</el-button>
+    <el-dialog
+      v-if="dialogNoteLabel"
+      :title="$t('提示')"
+      :visible.sync="noteDialogVisible"
+      width="400px"
+      :append-to-body="true"
+    >
+      <div>
+        <div style="margin-bottom: 5px; font-size: 14px; color: #606266;">{{ $t(dialogTitle) }}</div>
+        <el-input v-model="dialogAmount"></el-input>
+        <div style="margin: 10px 0 5px; font-size: 14px; color: #606266;">{{ $t(dialogNoteLabel) }}</div>
+        <el-input v-model="dialogNote"></el-input>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="noteDialogVisible = false">{{ $t('取消') }}</el-button>
+        <el-button type="primary" @click="confirmNoteDialog">{{ confirmButtonText ? $t(confirmButtonText) : $t('确定') }}</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -35,54 +53,66 @@ export default {
     size: String,
     delType: String,
     errorMessage:String,
-    confirmButtonText:String
+    confirmButtonText:String,
+    dialogNoteLabel: String,
+    dialogNoteKey: { type: String, default: 'note' }
   },
   data() {
-    return {};
+    return {
+      dialogAmount: '',
+      dialogNote: '',
+      noteDialogVisible: false
+    };
   },
   computed: {},
   watch: {},
   methods: {
     submit() {
       if (this.dialog) {
-        this.$prompt(this.$t(this.dialogTitle), this.$t("提示"), {
-          confirmButtonText: this.confirmButtonText?this.$t(this.confirmButtonText):this.$t("确定"),
-          cancelButtonText: this.$t("取消"),
-          inputPattern: this.checkContent ? /^[\d.]+$/ : this.checkString ? /^\S.*$/ : "",
-          inputErrorMessage: this.$t(this.errorMessage)
-        }).then(async ({ value }) => {
-          let param = {
-            content: {},
-          };
-          param.id = this.idName;
-          param.content[this.keyName] = this.idIsArr ? [this.id] : this.id;
-          this.paramData.forEach((item) => {
-            param.content[item.key] = item.value;
-          });
-          param.content[this.dialogKey] = value;
-          let res = await this.$api.requested(param);
-          if (this.delType === "合作伙伴") {
-            if (res.code === 0) {
-              this.$message({
-                message: res.data[0].errmsg,
-                type: "error",
-              });
+        if (this.dialogNoteLabel) {
+          this.dialogAmount = '';
+          this.dialogNote = '';
+          this.noteDialogVisible = true;
+        } else {
+          this.$prompt(this.$t(this.dialogTitle), this.$t("提示"), {
+            confirmButtonText: this.confirmButtonText?this.$t(this.confirmButtonText):this.$t("确定"),
+            cancelButtonText: this.$t("取消"),
+            inputPattern: this.checkContent ? /^[\d.]+$/ : this.checkString ? /^\S.*$/ : "",
+            inputErrorMessage: this.$t(this.errorMessage)
+          }).then(async ({ value }) => {
+            let param = {
+              content: {},
+            };
+            param.id = this.idName;
+            param.content[this.keyName] = this.idIsArr ? [this.id] : this.id;
+            this.paramData.forEach((item) => {
+              param.content[item.key] = item.value;
+            });
+            param.content[this.dialogKey] = value;
+            let res = await this.$api.requested(param);
+            if (this.delType === "合作伙伴") {
+              if (res.code === 0) {
+                this.$message({
+                  message: res.data[0].errmsg,
+                  type: "error",
+                });
+              } else {
+                this.tool.showMessage(res, () => {
+                  this.$emit("onSuccess", res.data);
+                });
+              }
             } else {
               this.tool.showMessage(res, () => {
                 this.$emit("onSuccess", res.data);
               });
             }
-          } else {
-            this.tool.showMessage(res, () => {
-              this.$emit("onSuccess", res.data);
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: this.$t('已取消')
             });
-          }
-        }).catch(() => {
-          this.$message({
-            type: 'info',
-            message: this.$t('已取消')
           });
-        });
+        }
       } else {
         this.$confirm(this.$t(this.message), this.$t("提示"), {
           confirmButtonText: this.confirmButtonText?this.$t(this.confirmButtonText):this.$t("确定"),
@@ -109,6 +139,43 @@ export default {
         });
       }
     },
+    async confirmNoteDialog() {
+      if (!this.dialogAmount) {
+        this.$message({ message: this.$t('请输入金额'), type: 'warning' });
+        return;
+      }
+      if (this.checkContent && !/^[\d.]+$/.test(this.dialogAmount)) {
+        this.$message({ message: this.$t(this.errorMessage || '请输入正确的数字'), type: 'error' });
+        return;
+      }
+      let param = {
+        content: {},
+      };
+      param.id = this.idName;
+      param.content[this.keyName] = this.idIsArr ? [this.id] : this.id;
+      this.paramData.forEach((item) => {
+        param.content[item.key] = item.value;
+      });
+      param.content[this.dialogKey] = this.dialogAmount;
+      param.content[this.dialogNoteKey] = this.dialogNote;
+      let res = await this.$api.requested(param);
+      if (this.delType === '合作伙伴') {
+        if (res.code === 0) {
+          this.$message({ message: res.data[0].errmsg, type: 'error' });
+          return;
+        } else {
+          this.noteDialogVisible = false;
+          this.tool.showMessage(res, () => {
+            this.$emit('onSuccess', res.data);
+          });
+        }
+      } else {
+        this.noteDialogVisible = false;
+        this.tool.showMessage(res, () => {
+          this.$emit('onSuccess', res.data);
+        });
+      }
+    }
   },
 };
 </script>

TEMPAT SAMPAH
分支管理.png