Browse Source

Merge branch 'orangeUrgent' into testToMerge

qymljy 1 year ago
parent
commit
d5fc648fd4
23 changed files with 2799 additions and 1351 deletions
  1. 1 2
      src/HDrpManagement/contractManage/components/itemClass/add.vue
  2. 5 5
      src/HDrpManagement/contractManage/components/productClassList/addProduct.vue
  3. 513 301
      src/HDrpManagement/contractManage/components/productDetailList/productDetailList.vue
  4. 561 325
      src/HDrpManagement/contractManage/components/productList/productBillno.vue
  5. 1 0
      src/HDrpManagement/contractManage/modules/detail.vue
  6. 60 11
      src/HDrpManagement/projectChange/modules/modules/productSet/index.vue
  7. 40 13
      src/HDrpManagement/projectChange/modules/modules/quotation/modules/add.vue
  8. 23 0
      src/HManagement/serviceDataScreen/components/borderTemplate.vue
  9. 417 0
      src/HManagement/serviceDataScreen/index.vue
  10. 138 182
      src/SDrpManagement/ProductGroup/index.vue
  11. 1 1
      src/SDrpManagement/ProductGroup/modules/Select2.vue
  12. 5 4
      src/SDrpManagement/ProductGroup/modules/classTree.vue
  13. 189 0
      src/SDrpManagement/QuotedPrice/detail/modules/productInventory/addSelectionList.vue
  14. 586 329
      src/SDrpManagement/QuotedPrice/detail/modules/productInventory/index.vue
  15. 57 20
      src/SDrpManagement/QuotedPrice/modules/ProjectQuotationAdd.vue
  16. BIN
      src/assets/icons/bgScreen.jpg
  17. 3 1
      src/components/newLayout/index.vue
  18. 4 1
      src/components/newLayout/modules/header.vue
  19. 10 0
      src/router/HManagement.js
  20. 74 62
      src/template/addProduct/index.vue
  21. 68 93
      src/template/addProductContract/index.vue
  22. 37 1
      src/template/addTool/index.vue
  23. 6 0
      src/views/login/login.vue

+ 1 - 2
src/HDrpManagement/contractManage/components/itemClass/add.vue

@@ -3,9 +3,8 @@
     <el-button
       size="small"
       type="primary"
-      icon="el-icon-plus"
       @click="onShow"
-      >{{ $t("添加") }}</el-button
+      >{{ $t("自报价单添加") }}</el-button
     >
     <el-drawer
       :title="$t(`添加`)"

+ 5 - 5
src/HDrpManagement/contractManage/components/productClassList/addProduct.vue

@@ -1,10 +1,10 @@
 <template>
   <div>
-    <el-button type="primary" size="small" :disabled="disabled" @click="addBtn">{{$t('添 加')}}</el-button>
+    <el-button type="primary" size="small" :disabled="disabled" @click="addBtn">{{title?$t(title):$t('添 加')}}</el-button>
     <el-drawer append-to-body size="80%" :with-header="false" :visible.sync="drawer" @close="onClose">
       <div class="container ">
         <p class="normal-title normal-margin">{{$t(`产品类别`)}}</p>
-        <div class="drawer__panel">
+        <div class="drawer__panel" style="margin-bottom: 0 !important;">
           <div style="margin-bottom: 10px">
             <uploadAllData
                 style="display: inline-block !important;"
@@ -16,7 +16,7 @@
             <el-button type="primary" class="inline-16" size="small" :disabled="selectProductLength == 0" @click="onSumit">{{$t(`批 量 添 加`)}}</el-button>
             <el-input size="small" style="width:200px;margin-bottom:10px" v-model="params.content.where.condition" :placeholder="`${$t(`编号`)}、${$t(`类别名称`)}、${$t(`品牌`)}`" @clear="getProductList(params.content.pageNumber = 1)" @keyup.native.enter="getProductList(params.content.pageNumber = 1)" clearable></el-input>
           </div>
-          <Table :checkbox="true" height="600" @selectionChange="selectArr" ref="table" id="itemclassid"  v-model="itemno" :layout="tablecols" :data="productList" :custom="true"   @upDateData="upDateData">
+          <Table :checkbox="true"  height="calc(100vh - 220px)" @selectionChange="selectArr" ref="table" id="itemclassid"  v-model="itemno" :layout="tablecols" :data="productList" :custom="true"   @upDateData="upDateData">
             <template v-slot:customcol="scope">
               <div v-if="scope.column.columnname == 'attinfos'">
                 <previewImage
@@ -67,11 +67,11 @@
 
 <script>
 // import Table from './table'
-import Table from '@/components/table/index5'
+import Table from '@/components/table/index6'
 import previewImage from '@/components/previewImage/index'
 import uploadAllData from '@/components/uploadAllData/index'
 export default {
-  props:['disabled','typeName'],
+  props:['disabled','typeName','title'],
   name: '',
   components:{Table,previewImage,uploadAllData},
   data() {

+ 513 - 301
src/HDrpManagement/contractManage/components/productDetailList/productDetailList.vue

@@ -1,67 +1,174 @@
 <template>
   <div>
     <div>
-      <div class="flex-align-center" style="margin-bottom:10px">
-        <el-input size="small" style="width:200px;margin-right:10px" v-model="params.content.where.condition" :placeholder="$t('输入搜索内容')" @clear="listData(params.content.pageNumber = 1)" @keyup.native.enter="listData(params.content.pageNumber = 1)" clearable></el-input>
+      <div class="flex-align-center" style="margin-bottom: 10px">
+        <el-input
+          size="small"
+          style="width: 200px; margin-right: 10px"
+          v-model="params.content.where.condition"
+          :placeholder="$t('输入搜索内容')"
+          @clear="listData((params.content.pageNumber = 1))"
+          @keyup.native.enter="listData((params.content.pageNumber = 1))"
+          clearable
+        ></el-input>
         <slot name="export"></slot>
         <uploadAllData
-            v-if="tool.checkAuth($route.name,'productDetailManage') && data.status === '新建' && isLeader"
-            :total="total"
-            @onSuccess="listData()"
-            @handlePullApi="handlePullApi"
-            @handleDelApi="handleDelApi"
-            idName="sa_contract_itemsid"
-            type="del"
+          v-if="
+            tool.checkAuth($route.name, 'productDetailManage') &&
+            data.status === '新建' &&
+            isLeader
+          "
+          :total="total"
+          @onSuccess="listData()"
+          @handlePullApi="handlePullApi"
+          @handleDelApi="handleDelApi"
+          idName="sa_contract_itemsid"
+          type="del"
         ></uploadAllData>
-        <el-button class="inline-16" size="small" v-if="tool.checkAuth($route.name,'productDetailManage') && data.status === '新建' && isLeader" :type="delProductData.length === 0?'':'primary'" @click="onDelProduct" :disabled="delProductData.length === 0">{{$t(`删 除`)}}</el-button>
-        <addProduct v-if="tool.checkAuth($route.name,'productDetailManage') && data.status === '新建' && isLeader"
-                    class="inline-16"  :params="paramsAdd" :tablecolsAdd="tablecolsAdd" title="添加" :typeName="data.type"
-                    @addSuccess="addProducts" @addProduct="addProduct" @uploadData="uploadData" @closeDrawer="closeDrawer"
-                     ref="addProduct"
+        <el-button
+          class="inline-16"
+          size="small"
+          v-if="
+            tool.checkAuth($route.name, 'productDetailManage') &&
+            data.status === '新建' &&
+            isLeader
+          "
+          :type="delProductData.length === 0 ? '' : 'primary'"
+          @click="onDelProduct"
+          :disabled="delProductData.length === 0"
+          >{{ $t(`删 除`) }}</el-button
         >
-        <!--阀门选型-->
-        <selectOption position="合同" slot="optionSystem" style="margin-left: 10px" @handleParam="handleOptionParam" v-if="tool.checkAuth($route.name,'optionSystem')"></selectOption>
+        <addProduct
+          v-if="
+            tool.checkAuth($route.name, 'productDetailManage') &&
+            data.status === '新建' &&
+            isLeader
+          "
+          class="inline-16"
+          :params="paramsAdd"
+          :tablecolsAdd="tablecolsAdd"
+          title="添加"
+          :typeName="data.type"
+          @addSuccess="addProducts"
+          @addProduct="addProduct"
+          @uploadData="uploadData"
+          @closeDrawer="closeDrawer"
+          ref="addProduct"
+        >
+          <!--阀门选型-->
+          <selectOption
+            position="合同"
+            slot="optionSystem"
+            style="margin-left: 10px"
+            @handleParam="handleOptionParam"
+            v-if="tool.checkAuth($route.name, 'optionSystem')"
+          ></selectOption>
+          <addSelectionList
+            style="margin-left: 10px"
+            slot="optionSystem"
+            sourcetable="sa_contract"
+            @showMessage="showMessage"
+            v-if="tool.checkAuth($route.name, 'addSelectionList')"
+          />
         </addProduct>
         <slot name="cooperate"></slot>
-        <exportFile v-if="tool.checkAuth($route.name,'export')" :param="params" :columns="tablecols" fileName="产品明细折扣"></exportFile>
-      </div>
-      <div class="produtMag-panel">
+        <exportFile
+          v-if="tool.checkAuth($route.name, 'export')"
+          :param="params"
+          :columns="tablecols"
+          fileName="产品明细折扣"
+        ></exportFile>
       </div>
+      <div class="produtMag-panel"></div>
       <SetOrder ref="setOrder"></SetOrder>
-      <tableLayout v-tableLoad="tableLoad" checkbox="true"  :layout="tablecols" :data="list" :opwidth="200" height="calc(100vh - 356px)" :width="true" :custom="true" fixedName="operation amount" @selectionChange="selectionChange" :headerOptions="['type']">
+      <tableLayout
+        v-tableLoad="tableLoad"
+        checkbox="true"
+        :layout="tablecols"
+        :data="list"
+        :opwidth="200"
+        height="calc(100vh - 356px)"
+        :width="true"
+        :custom="true"
+        fixedName="operation amount"
+        @selectionChange="selectionChange"
+        :headerOptions="['type']"
+      >
         <template v-slot:header="scope">
           <div v-if="scope.column.columnname == 'type'">
-            <el-select v-model="value" placeholder="请选择类型" v-if="tool.checkAuth($route.name,'productDetailManage') && data.status === '新建' && isLeader" @change="typeSelect">
+            <el-select
+              v-model="value"
+              :placeholder="$t('请选择类型')"
+              v-if="
+                tool.checkAuth($route.name, 'productDetailManage') &&
+                data.status === '新建' &&
+                isLeader
+              "
+              @change="typeSelect"
+            >
               <el-option
-                  v-for="item in options"
-                  :key="item.value"
-                  :label="$t(item.label)"
-                  :value="item.value">
+                v-for="item in options"
+                :key="item.value"
+                :label="$t(item.label)"
+                :value="item.value"
+              >
               </el-option>
             </el-select>
-            <span v-else>{{$t('类型')}}</span>
+            <span v-else>{{ $t("类型") }}</span>
           </div>
         </template>
         <template v-slot:customcol="scope">
           <div v-if="scope.column.columnname == 'qty'">
-<!--            <el-input-number size="mini" v-if="editIndex == scope.column.data.sa_contract_itemsid" v-model="scope.column.data.qty" @change="qtyChange" :min="1" label="描述文字"></el-input-number>-->
-            <el-input-number size="mini"  v-model="scope.column.data.qty" @change="qtyChange(scope.column.data.qty,scope.$index,scope.column.data)" :min="scope.column.data.orderminqty" :step="scope.column.data.orderaddqty"  label="描述文字" :disabled="!tool.checkAuth($route.name,'productDetailManage') || data.status !== '新建' || !isLeader"></el-input-number>
+            <!--            <el-input-number size="mini" v-if="editIndex == scope.column.data.sa_contract_itemsid" v-model="scope.column.data.qty" @change="qtyChange" :min="1" label="描述文字"></el-input-number>-->
+            <el-input-number
+              size="mini"
+              v-model="scope.column.data.qty"
+              @change="
+                qtyChange(
+                  scope.column.data.qty,
+                  scope.$index,
+                  scope.column.data
+                )
+              "
+              :min="scope.column.data.orderminqty"
+              :step="scope.column.data.orderaddqty"
+              :label="$t('描述文字')"
+              :disabled="
+                !tool.checkAuth($route.name, 'productDetailManage') ||
+                data.status !== '新建' ||
+                !isLeader
+              "
+            ></el-input-number>
           </div>
           <div v-else-if="scope.column.columnname == 'itemname'">
             <div v-if="scope.column.data.sa_lectotypecfgid">
-              <el-tooltip class="item" effect="dark" content="点击查看选型配置单" placement="top-start">
-                <el-button size="small" type="text" @click="$refs.setOrder.onShow(scope.column.data.sa_lectotypecfgid)">{{ scope.column.data.itemname }}</el-button>
+              <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('点击查看选型配置单')"
+                placement="top-start"
+              >
+                <el-button
+                  size="small"
+                  type="text"
+                  @click="
+                    $refs.setOrder.onShow(scope.column.data.sa_lectotypecfgid)
+                  "
+                  >{{ $t(scope.column.data.itemname) }}</el-button
+                >
               </el-tooltip>
             </div>
-            <div v-else>{{ scope.column.data.itemname }}</div>
+            <div v-else>{{ $t(scope.column.data.itemname) }}</div>
           </div>
           <div v-else-if="scope.column.columnname == 'itemno'">
-            <span :style="scope.column.data.itemid?'':'color:red'">{{ scope.column.data.itemno }}</span>
+            <span :style="scope.column.data.itemid ? '' : 'color:red'">{{
+              scope.column.data.itemno
+            }}</span>
           </div>
           <div v-else-if="scope.column.columnname == 'attinfos'">
             <previewImage
               v-if="scope.column.data.attinfos[0]"
-              style="width:38px;height:38px;margin:0px"
+              style="width: 38px; height: 38px; margin: 0px"
               class="image"
               :image="scope.column.data.attinfos[0]"
               :list="scope.column.data.attinfos"
@@ -70,61 +177,120 @@
           </div>
 
           <div v-else-if="scope.column.columnname == 'type'">
-            <el-select v-model="scope.column.data.type" @change="changeType(scope.column.data.type,scope.$index,scope.column.data)"
-            :disabled="!tool.checkAuth($route.name,'productDetailManage') || data.status !== '新建' || !isLeader" >
-              <el-option label="折扣系数" value="折扣系数"></el-option>
-              <el-option label="指定单价" value="指定单价"></el-option>
+            <el-select
+              v-model="scope.column.data.type"
+              @change="
+                changeType(
+                  scope.column.data.type,
+                  scope.$index,
+                  scope.column.data
+                )
+              "
+              :disabled="
+                !tool.checkAuth($route.name, 'productDetailManage') ||
+                data.status !== '新建' ||
+                !isLeader
+              "
+            >
+              <el-option :label="$t('折扣系数')" value="折扣系数"></el-option>
+              <el-option :label="$t('指定单价')" value="指定单价"></el-option>
             </el-select>
           </div>
           <div v-else-if="scope.column.columnname == 'discountrate'">
             <el-input
               size="mini"
               v-model="scope.column.data.discountrate"
-              :disabled="scope.column.data.type === '指定单价' || !tool.checkAuth($route.name,'productDetailManage') || data.status !== '新建' || !isLeader "
-              @change="discountrateChange(scope.column.data.discountrate,scope.$index,scope.column.data)"
+              :disabled="
+                scope.column.data.type === '指定单价' ||
+                !tool.checkAuth($route.name, 'productDetailManage') ||
+                data.status !== '新建' ||
+                !isLeader
+              "
+              @change="
+                discountrateChange(
+                  scope.column.data.discountrate,
+                  scope.$index,
+                  scope.column.data
+                )
+              "
             ></el-input>
           </div>
           <div v-else-if="scope.column.columnname == 'price'">
             <el-input
               size="mini"
-              :disabled="scope.column.data.type === '折扣系数' || !tool.checkAuth($route.name,'productDetailManage') || data.status !== '新建' || !isLeader"
+              :disabled="
+                scope.column.data.type === '折扣系数' ||
+                !tool.checkAuth($route.name, 'productDetailManage') ||
+                data.status !== '新建' ||
+                !isLeader
+              "
               v-model="scope.column.data.price"
-              @change="priceChange(scope.column.data.price,scope.$index,scope.column.data)"
+              @change="
+                priceChange(
+                  scope.column.data.price,
+                  scope.$index,
+                  scope.column.data
+                )
+              "
             ></el-input>
           </div>
           <div v-else-if="scope.column.columnname == 'countPrice'">
-            <span>{{tool.formatAmount(scope.column.data.price * scope.column.data.qty,2)}}</span>
+            <span>{{
+              tool.formatAmount(
+                scope.column.data.price * scope.column.data.qty,
+                2
+              )
+            }}</span>
           </div>
           <div v-else-if="scope.column.columnname == 'marketprice'">
-            <span>{{tool.formatAmount((scope.column.data.marketprice),2)}}</span>
+            <span>{{
+              tool.formatAmount(scope.column.data.marketprice, 2)
+            }}</span>
           </div>
           <div v-else-if="scope.column.columnname == 'amount'">
-            <span>{{tool.formatAmount((scope.column.data.amount),2)}}</span>
+            <span>{{ tool.formatAmount(scope.column.data.amount, 2) }}</span>
           </div>
           <div v-else-if="scope.column.columnname == 'brand'">
-            {{scope.column.data[scope.column.columnname][0] && scope.column.data[scope.column.columnname][0].brandname}}
+            {{
+              scope.column.data[scope.column.columnname][0] &&
+              scope.column.data[scope.column.columnname][0].brandname
+            }}
           </div>
-          <span v-else>{{$t(scope.column.data[scope.column.columnname])}}</span>
-        </template>
-        <template v-slot:opreation="scope">
+          <div v-else-if="scope.column.columnname == 'model'">
+            <el-input
+              v-if="scope.column.data.itemid == 0"
+              v-model="scope.column.data.model"
+              size="mini"
+              :placeholder="$t('请输入型号')"
+              @change="saveModel(scope.column.data)"
+            ></el-input>
+            <span v-else>
+              {{ $t(scope.column.data[scope.column.columnname]) }}</span
+            >
+          </div>
+          <span v-else>{{
+            $t(scope.column.data[scope.column.columnname])
+          }}</span>
         </template>
+        <template v-slot:opreation="scope"> </template>
       </tableLayout>
     </div>
-     <div style="height: 35px;margin-top: 16px">
-<!--      <div v-if="$route.query.type != '框架'" style="float: left">金额(元):{{ data.signamount ? tool.formatAmount(data.signamount,2) : '0.00'}}</div>-->
+    <div style="height: 35px; margin-top: 16px">
+      <!--      <div v-if="$route.query.type != '框架'" style="float: left">金额(元):{{ data.signamount ? tool.formatAmount(data.signamount,2) : '0.00'}}</div>-->
       <div style="float: right">
         <el-pagination
-            background
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-            :current-page="params.content.pageNumber"
-            :page-sizes="[20, 50, 100, 200]"
-            :page-size="20"
-            layout="total,sizes, prev, pager, next, jumper"
-            :total="total">
+          background
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="params.content.pageNumber"
+          :page-sizes="[20, 50, 100, 200]"
+          :page-size="20"
+          layout="total,sizes, prev, pager, next, jumper"
+          :total="total"
+        >
         </el-pagination>
       </div>
-     </div>
+    </div>
   </div>
 </template>
 
@@ -132,124 +298,158 @@
 // import edit from './editProduct'
 
 // import addProduct from './addProduct'
-import addProduct from '@/template/addProduct'
-import previewImage from '@/components/previewImage/index'
-import uploadAllData from '@/components/uploadAllData/index'
-import tableLayout from '@/components/dynamic-table/index3'
-import exportFile from '@/components/export_file/index1'
-import SelectOption from '@/optionSystem/selectOption/add.vue'
-import SetOrder from '@/optionSystem/selectOption/components/setOrder.vue'
+import addProduct from "@/template/addProduct";
+import previewImage from "@/components/previewImage/index";
+import uploadAllData from "@/components/uploadAllData/index";
+import tableLayout from "@/components/dynamic-table/index3";
+import exportFile from "@/components/export_file/index1";
+import SelectOption from "@/optionSystem/selectOption/add.vue";
+import SetOrder from "@/optionSystem/selectOption/components/setOrder.vue";
+import addSelectionList from "@/SDrpManagement/QuotedPrice/detail/modules/productInventory/addSelectionList";
+
 export default {
-  components: {addProduct,previewImage,uploadAllData,tableLayout,exportFile,SelectOption,SetOrder},
-  name: '',
-  props:["data","isLeader"],
+  components: {
+    addProduct,
+    previewImage,
+    uploadAllData,
+    tableLayout,
+    exportFile,
+    SelectOption,
+    SetOrder,
+    addSelectionList,
+  },
+  name: "",
+  props: ["data", "isLeader"],
   data() {
     return {
-      list:[],
-      delProductData:[],
-      paramsAdd:{
-        "id": 20221124093602,
-        "content": {
-          "sa_contractid": this.$route.query.id,
-          "pageNumber": 1,
-          "pageSize": 100,
-          "where": {
-            "condition": "",
-            "istool":0//是否是工具
-          }
+      list: [],
+      delProductData: [],
+      paramsAdd: {
+        id: 20221124093602,
+        content: {
+          sa_contractid: this.$route.query.id,
+          pageNumber: 1,
+          pageSize: 100,
+          where: {
+            condition: "",
+            istool: 0, //是否是工具
+          },
         },
       },
       params: {
-          "id": 20221122165302,
-          "content": {
-              "sa_contractid": this.$route.query.id,
-              "pageNumber": 1,
-              "pageSize": 20,
-              "where": {
-                  "condition": "",
-              }
+        id: 20221122165302,
+        content: {
+          sa_contractid: this.$route.query.id,
+          pageNumber: 1,
+          pageSize: 20,
+          where: {
+            condition: "",
           },
+        },
       },
       form: {
-        itemid:'',
-        sa_contract_itemsid:'',
-        qty:'',
-        discountrate:'',
-        price:'',
-        type:''
+        itemid: "",
+        sa_contract_itemsid: "",
+        qty: "",
+        discountrate: "",
+        price: "",
+        type: "",
       },
-      tablecols:[],
-      tablecolsAdd:[],
-      total:0,
-      totalPage:0,
-      editIndex:'',
-      options: [{
-        value: '折扣系数',
-        label: '折扣系数'
-      }, {
-        value: '指定单价',
-        label: '指定单价'
-      }],
-      value: ''
+      tablecols: [],
+      tablecolsAdd: [],
+      total: 0,
+      totalPage: 0,
+      editIndex: "",
+      options: [
+        {
+          value: "折扣系数",
+          label: "折扣系数",
+        },
+        {
+          value: "指定单价",
+          label: "指定单价",
+        },
+      ],
+      value: "",
     };
   },
-  computed:{
-  },
-  watch:{
-  },
-  created () {
-    if (this.$route.query.id) this.listData()
-    this.tablecols = this.$route.query.type == '居间'?this.tool.tabelCol(this.$route.name).productDetaiIntermediationTable.tablecols:this.tool.tabelCol(this.$route.name).productDetailTable.tablecols
-    this.$route.query.type == '框架' && this.tablecols.forEach((item,index) => {
-      if (item.columnname == 'qty' || item.columnname == 'amount') {
-        this.tablecols.splice(index,1)
-      }
-    })
-    this.tablecolsAdd = this.tool.tabelCol(this.$route.name).addProductTable.tablecols
-
+  computed: {},
+  watch: {},
+  created() {
+    if (this.$route.query.id) this.listData();
+    this.tablecols =
+      this.$route.query.type == "居间"
+        ? this.tool.tabelCol(this.$route.name).productDetaiIntermediationTable
+            .tablecols
+        : this.tool.tabelCol(this.$route.name).productDetailTable.tablecols;
+    this.$route.query.type == "框架" &&
+      this.tablecols.forEach((item, index) => {
+        if (item.columnname == "qty" || item.columnname == "amount") {
+          this.tablecols.splice(index, 1);
+        }
+      });
+    this.tablecolsAdd = this.tool.tabelCol(
+      this.$route.name
+    ).addProductTable.tablecols;
   },
   methods: {
-    async listData(){
-      this.params.content.sa_contractid = this.$route.query.id
-      const res = await this.$api.requested(this.params)
-      res.data.forEach((e,index)=>{
-        res.data[index].discountrate = Math.round((e.discountrate * 100)*100)/100
-      })
+    //修改型号
+    saveModel(data) {
+      let item = JSON.parse(JSON.stringify(data));
+      item.discountrate = item.discountrate / 100;
+      this.$api
+        .requested({
+          id: 20221122200302,
+          content: {
+            sa_contractid: this.$route.query.id,
+            items: [item],
+          },
+        })
+        .then((res) => {
+          console.log("修改型号", res);
+          this.tool.showMessage(res);
+        });
+    },
+    async listData() {
+      this.params.content.sa_contractid = this.$route.query.id;
+      const res = await this.$api.requested(this.params);
+      res.data.forEach((e, index) => {
+        res.data[index].discountrate =
+          Math.round(e.discountrate * 100 * 100) / 100;
+      });
       /*this.list = this.params.content.pageNumber == 1 ? res.data : this.list.concat(res.data)*/
-      this.list = res.data
-      console.log(this.list,res.data);
-      this.total = res.total
-      this.totalPage = res.pageTotal
+      this.list = res.data;
+      console.log(this.list, res.data);
+      this.total = res.total;
+      this.totalPage = res.pageTotal;
       // this.$emit('priceChange')
     },
     //处理选型请求参数
-    handleOptionParam (param) {
-      param.content.enterprisename = this.data.enterprisename
-      param.content.projectname = this.data.projectname
-      param.content.sourcetable = 'sa_contract'
-      param.content.source = `合同:${this.data.billno}`
-    },
-    tableLoad () {
-      if (this.params.content.pageNumber == this.totalPage) return
-      this.params.content.pageNumber += 1
-      this.listData()
-      console.log('触底');
+    handleOptionParam(param) {
+      param.content.enterprisename = this.data.enterprisename;
+      param.content.projectname = this.data.projectname;
+      param.content.sourcetable = "sa_contract";
+      param.content.source = `合同:${this.data.billno}`;
     },
-    qtyChange (num,index,data) {
-      data.qty = num
-      this.$set(this.list,index,data)
-      this.save(data)
+    tableLoad() {
+      if (this.params.content.pageNumber == this.totalPage) return;
+      this.params.content.pageNumber += 1;
+      this.listData();
+      console.log("触底");
     },
-    handleChange(num) {
-
+    qtyChange(num, index, data) {
+      data.qty = num;
+      this.$set(this.list, index, data);
+      this.save(data);
     },
-    changeType(num,index,data){
-      console.log(num)
-      data.type = num
-      this.$set(this.list,index,data)
-      this.save(data)
+    handleChange(num) {},
+    changeType(num, index, data) {
+      console.log(num);
+      data.type = num;
+      this.$set(this.list, index, data);
+      this.save(data);
     },
-    discountrateChange (num,index,data) {
+    discountrateChange(num, index, data) {
       // if (num > 100){
       //   data.discountrate = 100
       // }else if (num < 0){
@@ -257,13 +457,13 @@ export default {
       // }else {
       //   data.discountrate = Math.round(num*100)/100
       // }
-      data.discountrate = Math.round(num*100)/100
+      data.discountrate = Math.round(num * 100) / 100;
 
-      data.price = (data.discountrate / 100 * data.marketprice).toFixed(2)
-      this.$set(this.list,index,data)
-      this.save(data)
+      data.price = ((data.discountrate / 100) * data.marketprice).toFixed(2);
+      this.$set(this.list, index, data);
+      this.save(data);
     },
-    priceChange (num,index,data) {
+    priceChange(num, index, data) {
       // if (num > data.marketprice){
       //   data.price = data.marketprice
       // }else if (num < 0 ){
@@ -271,200 +471,212 @@ export default {
       // }else {
       //   data.price = Math.round(num*100)/100
       // }
-      data.price = Math.round(num*100)/100
+      data.price = Math.round(num * 100) / 100;
 
-      console.log(data.price)
-      data.discountrate = Math.round((data.price / data.marketprice * 100)*100)/100
-      console.log(data.discountrate)
-      this.$set(this.list,index,data)
-      this.save(data)
+      console.log(data.price);
+      data.discountrate =
+        Math.round((data.price / data.marketprice) * 100 * 100) / 100;
+      console.log(data.discountrate);
+      this.$set(this.list, index, data);
+      this.save(data);
     },
-    async save (data) {
+    async save(data) {
       let res = await this.$api.requested({
-        "id": 20221122200302,
-        "content": {
-          "sa_contractid":this.$route.query.id,
-          "items": [
+        id: 20221122200302,
+        content: {
+          sa_contractid: this.$route.query.id,
+          items: [
             {
-              marketprice:data.marketprice,
-              itemid:data.itemid,
-              sa_contract_itemsid:data.sa_contract_itemsid,
-              qty:data.qty,
-              discountrate:(data.discountrate/100).toFixed(4),
-              price:data.price,
-              type:data.type
-            }
-          ]
+              marketprice: data.marketprice,
+              itemid: data.itemid,
+              sa_contract_itemsid: data.sa_contract_itemsid,
+              qty: data.qty,
+              discountrate: (data.discountrate / 100).toFixed(4),
+              price: data.price,
+              type: data.type,
+            },
+          ],
         },
-      })
-      this.tool.showMessage(res,() => {
-        this.editIndex = ''
-        this.listData()
-        this.$emit('editSuccess',res.data.signamount)
-      })
+      });
+      this.tool.showMessage(res, () => {
+        this.editIndex = "";
+        this.listData();
+        this.$emit("editSuccess", res.data.signamount);
+      });
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
-      this.params.content.pageSize = val
-      this.listData()
+      this.params.content.pageSize = val;
+      this.listData();
     },
     handleCurrentChange(val) {
       // console.log(`当前页: ${val}`);
-      this.params.content.pageNumber = val
-      this.listData()
+      this.params.content.pageNumber = val;
+      this.listData();
     },
     /*批量添加*/
-    async addProducts(data){
-      let item = data.map(item => {
+    async addProducts(data) {
+      let item = data.map((item) => {
         return {
-          "itemid": item.itemid,
-          "price": item.marketprice,
-          "qty": item.orderminqty,
-          'marketprice':item.marketprice,
-          type:'折扣系数'
-        }
-      })
+          itemid: item.itemid,
+          price: item.marketprice,
+          qty: item.orderminqty,
+          marketprice: item.marketprice,
+          type: "折扣系数",
+        };
+      });
       const res = await this.$api.requested({
-        "id": 20221123164402,
-        "content": {
-          "sa_contractid": this.$route.query.id,
-          "items": item
+        id: 20221123164402,
+        content: {
+          sa_contractid: this.$route.query.id,
+          items: item,
         },
-      })
-      this.tool.showMessage(res,()=>{
-        this.list.unshift(...res.data)
+      });
+      this.tool.showMessage(res, () => {
+        this.list.unshift(...res.data);
         // this.listData()
-        this.$refs.addProduct.listData()
-      })
+        this.$refs.addProduct.listData();
+      });
     },
     /*单独添加*/
-    async addProduct(data){
+    async addProduct(data) {
       let res = await this.$api.requested({
-        "id": 20221123164402,
-        "content": {
-          "sa_contractid": this.$route.query.id,
-          "items": [
+        id: 20221123164402,
+        content: {
+          sa_contractid: this.$route.query.id,
+          items: [
             {
-              "itemid": data.itemid,
-              "price": data.marketprice,
-              "qty": data.orderminqty,
-              'marketprice':data.marketprice,
-              type:'折扣系数'
-            }
-          ]
+              itemid: data.itemid,
+              price: data.marketprice,
+              qty: data.orderminqty,
+              marketprice: data.marketprice,
+              type: "折扣系数",
+            },
+          ],
         },
-      })
-      this.tool.showMessage(res,() => {
-        this.list.unshift(res.data[0])
-        console.log(this.list[0],res.data);
+      });
+      this.tool.showMessage(res, () => {
+        this.list.unshift(res.data[0]);
+        console.log(this.list[0], res.data);
         // this.listData()
-        this.$refs.addProduct.listData()
-      })
+        this.$refs.addProduct.listData();
+      });
+    },
+    showMessage(res) {
+      this.tool.showMessage(res, () => {
+        this.listData();
+        this.$refs.addProduct.listData();
+      });
     },
     /*一键添加*/
-    uploadData(uploadApi,data){
-      uploadApi.id = 20221123164402
+    uploadData(uploadApi, data) {
+      uploadApi.id = 20221123164402;
       uploadApi.content = {
-        "sa_contractid": this.$route.query.id, //订单ID
-        "items": data.map(e=>{
+        sa_contractid: this.$route.query.id, //订单ID
+        items: data.map((e) => {
           return {
-            "itemid": e.itemid,
-            "price": e.marketprice,
-            "qty": e.orderminqty,
-            'marketprice':e.marketprice,
-            type:'折扣系数'
-          }
-        })
-      }
-      this.listData()
-      this.$refs.addProduct.listData()
+            itemid: e.itemid,
+            price: e.marketprice,
+            qty: e.orderminqty,
+            marketprice: e.marketprice,
+            type: "折扣系数",
+          };
+        }),
+      };
+      this.listData();
+      this.$refs.addProduct.listData();
     },
     /*获取要删除的数据*/
-    handlePullApi (pullApi) {
-      pullApi.content = JSON.parse(JSON.stringify(this.params.content))
-      pullApi.id = 20221122165302
-      pullApi.content.sa_contractid = this.$route.query.id
+    handlePullApi(pullApi) {
+      pullApi.content = JSON.parse(JSON.stringify(this.params.content));
+      pullApi.id = 20221122165302;
+      pullApi.content.sa_contractid = this.$route.query.id;
     },
     /*一键删除*/
-    handleDelApi (delApi,data) {
-      delApi.id = 20221123164502
+    handleDelApi(delApi, data) {
+      delApi.id = 20221123164502;
       delApi.content = {
-        "sa_contractid":this.$route.query.id,
-        "sa_contract_itemsids":data,
-        "pageNumber":0,
-        "pageSize":0
-      }
-      this.listData()
+        sa_contractid: this.$route.query.id,
+        sa_contract_itemsids: data,
+        pageNumber: 0,
+        pageSize: 0,
+      };
+      this.listData();
     },
-    selectionChange(val){
-      this.delProductData = []
-      val.forEach((item,index) => {
-        this.delProductData[index] = item.sa_contract_itemsid
-      })
+    selectionChange(val) {
+      this.delProductData = [];
+      val.forEach((item, index) => {
+        this.delProductData[index] = item.sa_contract_itemsid;
+      });
     },
     /*批量删除判断*/
     onDelProduct() {
-      this.$confirm(this.$t('此操作将删除这些商品, 是否继续') + '?', this.$t('提示'), {
-        confirmButtonText: this.$t('确定'),
-        cancelButtonText: this.$t('取消'),
-        type: 'warning'
-      }).then(() => {
-        this.delProduct()
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: this.$t('取消删除')
+      this.$confirm(
+        this.$t("此操作将删除这些商品, 是否继续") + "?",
+        this.$t("提示"),
+        {
+          confirmButtonText: this.$t("确定"),
+          cancelButtonText: this.$t("取消"),
+          type: "warning",
+        }
+      )
+        .then(() => {
+          this.delProduct();
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: this.$t("取消删除"),
+          });
         });
-      });
     },
     /*批量删除商品*/
-    async delProduct(){
+    async delProduct() {
       const res = await this.$api.requested({
-        "id": 20221123164502,
-        "content": {
-          "sa_contractid":this.$route.query.id,
-          "sa_contract_itemsids":this.delProductData
+        id: 20221123164502,
+        content: {
+          sa_contractid: this.$route.query.id,
+          sa_contract_itemsids: this.delProductData,
         },
-      })
-      this.tool.showMessage(res,()=>{
+      });
+      this.tool.showMessage(res, () => {
         // this.listData()
-        this.list.forEach(item => {
-          this.delProductData.forEach(item2 => {
+        this.list.forEach((item) => {
+          this.delProductData.forEach((item2) => {
             if (item.sa_contract_itemsid == item2) {
-              this.list.splice(this.list.indexOf(item),1)
+              this.list.splice(this.list.indexOf(item), 1);
             }
-          })
-        })
-        this.listData()
-        this.$emit("delSuccess")
-      })
+          });
+        });
+        this.listData();
+        this.$emit("delSuccess");
+      });
     },
-    closeDrawer(){
-      this.listData()
-      this.$emit("closeDrawer")
+    closeDrawer() {
+      this.listData();
+      this.$emit("closeDrawer");
     },
     /*选择类型*/
-    async typeSelect(){
+    async typeSelect() {
       const res = await this.$api.requested({
-        "id": 20240110154404,
-        "content": {
-          "sa_contractid": this.$route.query.id,
-          "sa_contract_itemsids": [],
-          "isAll":1,
-          "type":this.value
-        }
-      })
-      this.tool.showMessage(res,()=>{
-        this.listData()
-      })
-
-    }
+        id: 20240110154404,
+        content: {
+          sa_contractid: this.$route.query.id,
+          sa_contract_itemsids: [],
+          isAll: 1,
+          type: this.value,
+        },
+      });
+      this.tool.showMessage(res, () => {
+        this.listData();
+      });
+    },
   },
 };
 </script>
 
 <style scoped>
-/deep/ .el-input.is-disabled .el-input__inner{
+/deep/ .el-input.is-disabled .el-input__inner {
   color: #666666;
 }
 </style>

+ 561 - 325
src/HDrpManagement/contractManage/components/productList/productBillno.vue

@@ -1,44 +1,141 @@
 <template>
   <div>
     <div>
-      <div class="flex-align-center" style="margin-bottom:10px">
-        <el-input size="small" style="width:200px;margin-right:10px" v-model="params.content.where.condition" :placeholder="$t(`输入搜索内容`)" @clear="listData(params.content.pageNumber = 1)" @keyup.native.enter="listData(params.content.pageNumber = 1)" clearable></el-input>
-        <slot name="addProduct"/>
+      <div class="flex-align-center" style="margin-bottom: 10px">
+        <el-input
+          size="small"
+          style="width: 200px; margin-right: 10px"
+          v-model="params.content.where.condition"
+          :placeholder="$t(`输入搜索内容`)"
+          @clear="listData((params.content.pageNumber = 1))"
+          @keyup.native.enter="listData((params.content.pageNumber = 1))"
+          clearable
+        ></el-input>
+        <slot name="addProduct" />
         <uploadAllData
-            v-if="tool.checkAuth($route.name,'productBillManage') && data.status === '新建' && isLeader"
-            :total="total"
-            @onSuccess="listData();$emit('onSuccess')"
-            @handlePullApi="handlePullApi"
-            @handleDelApi="handleDelApi"
-            idName="sa_contract_itemsid"
-            type="del"
+          v-if="
+            tool.checkAuth($route.name, 'productBillManage') &&
+            data.status === '新建' &&
+            isLeader
+          "
+          :total="total"
+          @onSuccess="
+            listData();
+            $emit('onSuccess');
+          "
+          @handlePullApi="handlePullApi"
+          @handleDelApi="handleDelApi"
+          idName="sa_contract_itemsid"
+          type="del"
         ></uploadAllData>
-        <el-button class="inline-16" v-if="tool.checkAuth($route.name,'productBillManage') && data.status === '新建' && isLeader" size="small" :type="delProductData.length === 0?'':'primary'" @click="onDelProduct" :disabled="delProductData.length === 0">{{$t(`删 除`)}}</el-button>
-        <addProductContract class="inline-16"  title="自报价单添加" :tablecolsAdd="tablecolsAdd" :tradefield="data.tradefield" :data="data"  @closeDrawer="closeDrawer"
-                            @addSuccess="queryProuctAdds" @addAll="addAll" ref="addProduct" @addProduct="queryProuctAdd" @uploadData="queryUploadData" v-if="tool.checkAuth($route.name,'productBillManage') && data.status === '新建' && isLeader"
+        <el-button
+          class="inline-16"
+          v-if="
+            tool.checkAuth($route.name, 'productBillManage') &&
+            data.status === '新建' &&
+            isLeader
+          "
+          size="small"
+          :type="delProductData.length === 0 ? '' : 'primary'"
+          @click="onDelProduct"
+          :disabled="delProductData.length === 0"
+          >{{ $t(`删 除`) }}</el-button
+        >
+        <addProductContract
+          class="inline-16"
+          title="自报价单添加"
+          :tablecolsAdd="tablecolsAdd"
+          :tradefield="data.tradefield"
+          :data="data"
+          @closeDrawer="closeDrawer"
+          @addSuccess="queryProuctAdds"
+          @addAll="addAll"
+          ref="addProduct"
+          @addProduct="queryProuctAdd"
+          @uploadData="queryUploadData"
+          v-if="
+            tool.checkAuth($route.name, 'productBillManage') &&
+            data.status === '新建' &&
+            isLeader
+          "
         >
         </addProductContract>
-        <addProduct v-if="tool.checkAuth($route.name,'productBillManage') && data.status === '新建' && isLeader"
-                    class="inline-16" @productAdd="queryProuctAdd" :params="paramProductAdd" :tablecolsAdd="tablecolsProductAdd" title="自产品档案添加"
-                    @addSuccess="queryProuctAdds" @addProduct="queryProuctAdd" @uploadData="queryUploadData" @closeDrawer="closeDrawer"
-                    :tradefield="data.tradefield" ref="addArchivesProduct"
+        <addProduct
+          v-if="
+            tool.checkAuth($route.name, 'productBillManage') &&
+            data.status === '新建' &&
+            isLeader
+          "
+          class="inline-16"
+          @productAdd="queryProuctAdd"
+          :params="paramProductAdd"
+          :tablecolsAdd="tablecolsProductAdd"
+          title="自产品档案添加"
+          @addSuccess="queryProuctAdds"
+          @addProduct="queryProuctAdd"
+          @uploadData="queryUploadData"
+          @closeDrawer="closeDrawer"
+          :tradefield="data.tradefield"
+          ref="addArchivesProduct"
         >
           <!--阀门选型-->
-          <selectOption position="报价单" slot="optionSystem" style="margin-left: 10px" @handleParam="handleOptionParam"  v-if="tool.checkAuth($route.name,'optionSystem')"></selectOption>
+          <selectOption
+            position="报价单"
+            slot="optionSystem"
+            style="margin-left: 10px"
+            @handleParam="handleOptionParam"
+            v-if="tool.checkAuth($route.name, 'optionSystem')"
+          ></selectOption>
+          <addSelectionList
+            style="margin-left: 10px"
+            slot="optionSystem"
+            sourcetable="sa_contract"
+            @showMessage="showMessage"
+            v-if="tool.checkAuth($route.name, 'addSelectionList')"
+          />
         </addProduct>
-        <exportFile v-if="tool.checkAuth($route.name,'export')" :param="params" :columns="tablecols" fileName="产品明细折扣"></exportFile>
+        <exportFile
+          v-if="tool.checkAuth($route.name, 'export')"
+          :param="params"
+          :columns="tablecols"
+          fileName="产品明细折扣"
+        ></exportFile>
         <slot name="cooperate"></slot>
       </div>
       <SetOrder ref="setOrder"></SetOrder>
-      <tableLayout checkbox="true" :layout="tablecols" :data="list" :width="true" :opwidth="200" height="calc(100vh - 380px)" :custom="true" fixedName="operation countPrice" @selectionChange="selectionChange">
+      <tableLayout
+        checkbox="true"
+        :layout="tablecols"
+        :data="list"
+        :width="true"
+        :opwidth="200"
+        height="calc(100vh - 380px)"
+        :custom="true"
+        fixedName="operation countPrice"
+        @selectionChange="selectionChange"
+      >
         <template v-slot:customcol="scope">
           <div v-if="scope.column.columnname == 'qty'">
-            <el-input-number size="mini" v-model="scope.column.data.qty" @change="qtyChange($event,scope.column.data,scope.column.data.index)" :min="scope.column.data.orderminqty" :step="scope.column.data.orderaddqty" label="描述文字" :disabled="!tool.checkAuth($route.name,'productBillManage') || data.status !== '新建' || !isLeader"></el-input-number>
+            <el-input-number
+              size="mini"
+              v-model="scope.column.data.qty"
+              @change="
+                qtyChange($event, scope.column.data, scope.column.data.index)
+              "
+              :min="scope.column.data.orderminqty"
+              :step="scope.column.data.orderaddqty"
+              :label="$t('描述文字')"
+              :disabled="
+                !tool.checkAuth($route.name, 'productBillManage') ||
+                data.status !== '新建' ||
+                !isLeader
+              "
+            ></el-input-number>
           </div>
           <div v-else-if="scope.column.columnname == 'attinfos'">
             <previewImage
               v-if="scope.column.data.attinfos[0]"
-              style="width:38px;height:38px;margin:0px"
+              style="width: 38px; height: 38px; margin: 0px"
               class="image"
               :image="scope.column.data.attinfos[0]"
               :list="scope.column.data.attinfos"
@@ -46,43 +143,125 @@
             ></previewImage>
           </div>
           <div v-else-if="scope.column.columnname == 'remarks'">
-            <el-input size="mini" v-if="editIndex == scope.column.data.sa_contract_itemsid" v-model="form.remarks" @change="remarksChange($event,scope.column.data,scope.column.data.index)" ></el-input>
-            <p v-else>{{$t(scope.column.data[scope.column.columnname])}}</p>
+            <el-input
+              size="mini"
+              v-if="editIndex == scope.column.data.sa_contract_itemsid"
+              v-model="form.remarks"
+              @change="
+                remarksChange(
+                  $event,
+                  scope.column.data,
+                  scope.column.data.index
+                )
+              "
+            ></el-input>
+            <p v-else>{{ $t(scope.column.data[scope.column.columnname]) }}</p>
           </div>
           <div v-else-if="scope.column.columnname == 'itemno'">
-            <span :style="scope.column.data.itemid?'':'color:red'">{{ scope.column.data.itemno }}</span>
+            <span :style="scope.column.data.itemid ? '' : 'color:red'">{{
+              scope.column.data.itemno
+            }}</span>
           </div>
           <div v-else-if="scope.column.columnname == 'discountrate'">
-            <el-input size="mini"v-model="scope.column.data.discountrate" @change="discountrateChange($event,scope.column.data,scope.column.data.index)" :disabled="!tool.checkAuth($route.name,'productBillManage') || data.status !== '新建' || !isLeader"></el-input>
+            <el-input
+              size="mini"
+              v-model="scope.column.data.discountrate"
+              @change="
+                discountrateChange(
+                  $event,
+                  scope.column.data,
+                  scope.column.data.index
+                )
+              "
+              :disabled="
+                !tool.checkAuth($route.name, 'productBillManage') ||
+                data.status !== '新建' ||
+                !isLeader
+              "
+            ></el-input>
           </div>
           <div v-else-if="scope.column.columnname == 'price'">
-            <el-input size="mini"  v-model="scope.column.data.price" @change="priceChange($event,scope.column.data,scope.column.data.index)" :disabled="!tool.checkAuth($route.name,'productBillManage') || data.status !== '新建' || !isLeader"></el-input>
+            <el-input
+              size="mini"
+              v-model="scope.column.data.price"
+              @change="
+                priceChange($event, scope.column.data, scope.column.data.index)
+              "
+              :disabled="
+                !tool.checkAuth($route.name, 'productBillManage') ||
+                data.status !== '新建' ||
+                !isLeader
+              "
+            ></el-input>
           </div>
           <div v-else-if="scope.column.columnname == 'countPrice'">
-            <p>{{tool.formatAmount((scope.column.data.price * scope.column.data.qty),2)}}</p>
+            <p>
+              {{
+                tool.formatAmount(
+                  scope.column.data.price * scope.column.data.qty,
+                  2
+                )
+              }}
+            </p>
           </div>
           <div v-else-if="scope.column.columnname == 'marketprice'">
-            <p>{{tool.formatAmount((scope.column.data.marketprice),2)}}</p>
+            <p>{{ tool.formatAmount(scope.column.data.marketprice, 2) }}</p>
           </div>
           <div v-else-if="scope.column.columnname == 'brand'">
-            {{scope.column.data[scope.column.columnname][0] && scope.column.data[scope.column.columnname][0].brandname}}
+            {{
+              scope.column.data[scope.column.columnname][0] &&
+              scope.column.data[scope.column.columnname][0].brandname
+            }}
           </div>
           <div v-else-if="scope.column.columnname == 'itemname'">
             <div v-if="scope.column.data.sa_lectotypecfgid">
-              <el-tooltip class="item" effect="dark" content="点击查看选型配置单" placement="top-start">
-                <el-button size="small" type="text" @click="$refs.setOrder.onShow(scope.column.data.sa_lectotypecfgid)">{{ scope.column.data.itemname }}</el-button>
+              <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('点击查看选型配置单')"
+                placement="top-start"
+              >
+                <el-button
+                  size="small"
+                  type="text"
+                  @click="
+                    $refs.setOrder.onShow(scope.column.data.sa_lectotypecfgid)
+                  "
+                  >{{ $t(scope.column.data.itemname) }}</el-button
+                >
               </el-tooltip>
             </div>
-            <div v-else>{{ scope.column.data.itemname }}</div>
+            <div v-else>{{ $t(scope.column.data.itemname) }}</div>
           </div>
-          <p v-else>{{$t(scope.column.data[scope.column.columnname])}}</p>
-          <p v-if="!scope.column.data[scope.column.columnname] && scope.column.data[[scope.column.columnname]] !== 0 && scope.column.columnname != 'operation' && scope.column.columnname != 'countPrice'">--</p>
-        </template>
-        <template v-slot:opreation="scope">
+          <div v-else-if="scope.column.columnname == 'model'">
+            <el-input
+              v-if="scope.column.data.itemid == 0"
+              v-model="scope.column.data.model"
+              size="mini"
+              :placeholder="$t('请输入型号')"
+              @change="saveModel(scope.column.data)"
+            ></el-input>
+            <span v-else>
+              {{ $t(scope.column.data[scope.column.columnname]) }}</span
+            >
+          </div>
+          <p v-else>{{ $t(scope.column.data[scope.column.columnname]) }}</p>
+          <p
+            v-if="
+              !scope.column.data[scope.column.columnname] &&
+              scope.column.data[[scope.column.columnname]] !== 0 &&
+              scope.column.columnname != 'operation' &&
+              scope.column.columnname != 'countPrice'&&
+              scope.column.columnname != 'model'
+            "
+          >
+            --
+          </p>
         </template>
+        <template v-slot:opreation="scope"> </template>
       </tableLayout>
     </div>
-<!--    <div style="margin-top:16px;text-align:right">
+    <!--    <div style="margin-top:16px;text-align:right">
       <el-pagination
           background
           small
@@ -94,135 +273,167 @@
           :total="total">
       </el-pagination>
     </div>-->
-    <div style="height: 35px;margin-top: 20px">
-      <div style="float: left">合计(元):{{ totalPrice }}</div>
+    <div style="height: 35px; margin-top: 20px">
+      <div style="float: left">{{ $t("合计(元)") }}:{{ totalPrice }}</div>
       <div style="float: right">
         <el-pagination
-            background
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-            :current-page="params.content.pageNumber"
-            :page-sizes="[20, 50, 100, 200]"
-            :page-size="100"
-            layout="total,sizes, prev, pager, next, jumper"
-            :total="total">
+          background
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="params.content.pageNumber"
+          :page-sizes="[20, 50, 100, 200]"
+          :page-size="100"
+          layout="total,sizes, prev, pager, next, jumper"
+          :total="total"
+        >
         </el-pagination>
       </div>
-
     </div>
   </div>
 </template>
 
 <script>
 // import edit from './editProduct'
-import tableLayout from '@/components/dynamic-table/index2'
+import tableLayout from "@/components/dynamic-table/index2";
 // import addProduct from './addProduct'
-import previewImage from '@/components/previewImage/index'
-import addProductContract from '@/template/addProductContract/index'
-import uploadAllData from '@/components/uploadAllData/index'
-import exportFile from '@/components/export_file/index1'
-import addProduct from '@/template/addProduct'
-import SelectOption from '@/optionSystem/selectOption/add.vue'
-import SetOrder from '@/optionSystem/selectOption/components/setOrder.vue'
+import previewImage from "@/components/previewImage/index";
+import addProductContract from "@/template/addProductContract/index";
+import uploadAllData from "@/components/uploadAllData/index";
+import exportFile from "@/components/export_file/index1";
+import addProduct from "@/template/addProduct";
+import SelectOption from "@/optionSystem/selectOption/add.vue";
+import SetOrder from "@/optionSystem/selectOption/components/setOrder.vue";
+import addSelectionList from "@/SDrpManagement/QuotedPrice/detail/modules/productInventory/addSelectionList";
+
 export default {
-  components: {addProduct,previewImage,addProductContract,uploadAllData,tableLayout,exportFile,SelectOption,SetOrder},
-  name: '',
-  props:["data","isLeader"],
+  components: {
+    addProduct,
+    previewImage,
+    addProductContract,
+    uploadAllData,
+    tableLayout,
+    exportFile,
+    SelectOption,
+    SetOrder,
+    addSelectionList,
+  },
+  name: "",
+  props: ["data", "isLeader"],
   data() {
     return {
-      list:[],
-      delProductData:[],
+      list: [],
+      delProductData: [],
       params: {
-      "id": 20221122165302,
-        "content": {
-          "sa_contractid": '',
-          "pageNumber": 1,
-          "pageSize": 100,
-          "where": {
-              "condition": ""
-          }
+        id: 20221122165302,
+        content: {
+          sa_contractid: "",
+          pageNumber: 1,
+          pageSize: 100,
+          where: {
+            condition: "",
+          },
         },
       },
       form: {
-        qty:'',
-        discountrate:'',
-        price:'',
+        qty: "",
+        discountrate: "",
+        price: "",
       },
-      tablecols:[],
-      tablecolsAdd:[],
-      tablecolsProductAdd:[],
-      total:0,
-      editIndex:'',
-      totalPrice:0,
-      paramProductAdd:{
-        "id": 20221124093602,
-        "content": {
-          "sa_contractid": this.$route.query.id,
-          "pageNumber": 1,
-          "pageSize": 100,
-          "where": {
-            "condition": "",
-            "istool": 0
-          }
+      tablecols: [],
+      tablecolsAdd: [],
+      tablecolsProductAdd: [],
+      total: 0,
+      editIndex: "",
+      totalPrice: 0,
+      paramProductAdd: {
+        id: 20221124093602,
+        content: {
+          sa_contractid: this.$route.query.id,
+          pageNumber: 1,
+          pageSize: 100,
+          where: {
+            condition: "",
+            istool: 0,
+          },
         },
-      }
+      },
     };
   },
-  computed:{
-  },
-  watch:{
-    "data":function (val){
-      if(val){
-        this.listData()
+  computed: {},
+  watch: {
+    data: function (val) {
+      if (val) {
+        this.listData();
       }
-    }
-  },
-  created () {
-    if (this.$route.query.id) this.listData()
-    this.tablecols = this.tool.tabelCol(this.$route.name).productBillnoTable.tablecols
-    this.tablecolsAdd = this.tool.tabelCol(this.$route.name).addProuctProject.tablecols
-    this.tablecolsProductAdd = this.tool.tabelCol(this.$route.name).productArchivesTable.tablecols
+    },
   },
-  mounted() {
-
+  created() {
+    if (this.$route.query.id) this.listData();
+    this.tablecols = this.tool.tabelCol(
+      this.$route.name
+    ).productBillnoTable.tablecols;
+    this.tablecolsAdd = this.tool.tabelCol(
+      this.$route.name
+    ).addProuctProject.tablecols;
+    this.tablecolsProductAdd = this.tool.tabelCol(
+      this.$route.name
+    ).productArchivesTable.tablecols;
   },
+  mounted() {},
   methods: {
-    handleOptionParam (param) {
-      param.content.enterprisename = this.data.enterprisename
-      param.content.projectname = this.data.projectname
-      param.content.sourcetable = 'sa_contract'
-      param.content.source = `项目合同:${this.data.billno}`
+    //修改型号
+    saveModel(data) {
+      let item = JSON.parse(JSON.stringify(data));
+      item.discountrate = item.discountrate / 100;
+      this.$api
+        .requested({
+          id: 20221122200302,
+          content: {
+            sa_contractid: this.$route.query.id,
+            items: [item],
+          },
+        })
+        .then((res) => {
+          console.log("修改型号", res);
+          this.tool.showMessage(res);
+        });
+    },
+    handleOptionParam(param) {
+      param.content.enterprisename = this.data.enterprisename;
+      param.content.projectname = this.data.projectname;
+      param.content.sourcetable = "sa_contract";
+      param.content.source = `项目合同:${this.data.billno}`;
     },
-    async listData(){
-      this.totalPrice = 0
-      this.params.content.sa_contractid = this.$route.query.id
-      const res = await this.$api.requested(this.params)
-      res.data.forEach((e,index)=>{
-        res.data[index].discountrate = Math.round((res.data[index].discountrate *100)*100)/100
-        this.totalPrice = this.totalPrice + res.data[index].amount
-      })
-      this.totalPrice = this.tool.formatAmount(this.totalPrice,2)
-      this.list = res.data
-      this.total = res.total
-      this.$refs.addProduct.doLayout()
-      this.$emit('priceChange')
+    async listData() {
+      this.totalPrice = 0;
+      this.params.content.sa_contractid = this.$route.query.id;
+      const res = await this.$api.requested(this.params);
+      res.data.forEach((e, index) => {
+        res.data[index].discountrate =
+          Math.round(res.data[index].discountrate * 100 * 100) / 100;
+        this.totalPrice = this.totalPrice + res.data[index].amount;
+      });
+      this.totalPrice = this.tool.formatAmount(this.totalPrice, 2);
+      this.list = res.data;
+      this.total = res.total;
+      this.$refs.addProduct.doLayout();
+      this.$emit("priceChange");
     },
     /*修改数量*/
-    qtyChange (num,data,index) {
-      data.qty = Math.round(num *100)/100
-      this.$set(this.list,index,data)
-      this.save(data)
+    qtyChange(num, data, index) {
+      data.qty = Math.round(num * 100) / 100;
+      this.$set(this.list, index, data);
+      this.save(data);
     },
     handleChange(num) {
       console.log(num);
-
     },
     /*修改备注*/
-    remarksChange (val,data,index){
-      this.$set(this.list,index,data)
+    remarksChange(val, data, index) {
+      this.$set(this.list, index, data);
     },
     /*修改折扣*/
-    discountrateChange (num,data,index) {
+    discountrateChange(num, data, index) {
       // if (num>100){
       //   data.discountrate = 100
       // }else if (num < 0){
@@ -230,17 +441,18 @@ export default {
       // }else {
       //   data.discountrate = Math.round(num *100)/100
       // }
-      if (num < 0){
-        data.discountrate = 0
-      }else {
-        data.discountrate = Math.round(num *100)/100
+      if (num < 0) {
+        data.discountrate = 0;
+      } else {
+        data.discountrate = Math.round(num * 100) / 100;
       }
-     data.price = Math.round((data.discountrate / 100 * data.marketprice)*100)/100
-      this.$set(this.list,index,data)
-      this.save(data)
+      data.price =
+        Math.round((data.discountrate / 100) * data.marketprice * 100) / 100;
+      this.$set(this.list, index, data);
+      this.save(data);
     },
     /*修改价格*/
-    priceChange (num,data,index) {
+    priceChange(num, data, index) {
       // if (num > data.marketprice){
       //  data.price = data.marketprice
       // }else if (num < 0){
@@ -248,260 +460,284 @@ export default {
       // }else {
       //   data.price = Math.round(num * 100)/100
       // }
-      if (num < 0){
-        data.price = 0
-      }else {
-        data.price = Math.round(num * 100)/100
+      if (num < 0) {
+        data.price = 0;
+      } else {
+        data.price = Math.round(num * 100) / 100;
       }
-      data.discountrate = Math.round((data.price / data.marketprice * 100)*100)/100
-      this.$set(this.list,index,data)
-      this.save(data)
+      data.discountrate =
+        Math.round((data.price / data.marketprice) * 100 * 100) / 100;
+      this.$set(this.list, index, data);
+      this.save(data);
     },
-    async save (data) {
+    async save(data) {
       let res = await this.$api.requested({
-        "id": 20221122200302,
-        "content": {
-          "sa_contractid":this.$route.query.id,
-          "items": [
+        id: 20221122200302,
+        content: {
+          sa_contractid: this.$route.query.id,
+          items: [
             {
-              marketprice:data.marketprice,
-              itemid:data.itemid,
-              sa_contract_itemsid:data.sa_contract_itemsid,
-              qty:data.qty,
-              discountrate:(data.discountrate/100).toFixed(4),
-              price:data.price,
-              type:data.type
-            }
-          ]
+              marketprice: data.marketprice,
+              itemid: data.itemid,
+              sa_contract_itemsid: data.sa_contract_itemsid,
+              qty: data.qty,
+              discountrate: (data.discountrate / 100).toFixed(4),
+              price: data.price,
+              type: data.type,
+            },
+          ],
         },
-      })
-      this.tool.showMessage(res,() => {
-        this.editIndex = ''
-        this.listData()
-        this.$emit('editSuccess',res.data.signamount)
-      })
+      });
+      this.tool.showMessage(res, () => {
+        this.editIndex = "";
+        this.listData();
+        this.$emit("editSuccess", res.data.signamount);
+      });
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
-      this.params.content.pageSize = val
-      this.listData()
+      this.params.content.pageSize = val;
+      this.listData();
     },
     handleCurrentChange(val) {
       // console.log(`当前页: ${val}`);
-      this.params.content.pageNumber = val
-      this.listData()
+      this.params.content.pageNumber = val;
+      this.listData();
     },
 
     /*拉取数据*/
-    handlePullApi (pullApi) {
-      pullApi.content = JSON.parse(JSON.stringify(this.params.content))
-      pullApi.id = 20221122165302
-      pullApi.content.sa_contractid = this.$route.query.id
+    handlePullApi(pullApi) {
+      pullApi.content = JSON.parse(JSON.stringify(this.params.content));
+      pullApi.id = 20221122165302;
+      pullApi.content.sa_contractid = this.$route.query.id;
     },
     /*一键删除*/
-    handleDelApi (delApi,data) {
-      delApi.id = 20221123164502
+    handleDelApi(delApi, data) {
+      delApi.id = 20221123164502;
       delApi.content = {
-        "sa_contractid":this.$route.query.id,
-        "sa_contract_itemsids": data,
-        "pageNumber":0,
-        "pageSize":0
-      }
-      this.$refs.addProduct.listData()
+        sa_contractid: this.$route.query.id,
+        sa_contract_itemsids: data,
+        pageNumber: 0,
+        pageSize: 0,
+      };
+      this.$refs.addProduct.listData();
     },
 
-
     /*一键添加*/
-    async queryUploadData(uploadApi,data){
-      uploadApi.id = 20221123164402
+    async queryUploadData(uploadApi, data) {
+      uploadApi.id = 20221123164402;
       uploadApi.content = {
-        "sa_contractid": this.$route.query.id,
-        "items": data.map(e=>{
+        sa_contractid: this.$route.query.id,
+        items: data.map((e) => {
           return {
-            "itemid": e.itemid,
-            "price": e.price || (e.marketprice * 1).toFixed(4),
-            "qty": e.qty || e.orderminqty,
-            "marketprice":e.marketprice,
-            "discountrate":e.discountrate || 1,
-            "type":'指定单价'
-          }
-        })
-      }
-      this.$refs.addProduct.listData()
-      this.$emit('onSuccess')
+            itemid: e.itemid,
+            price: e.price || (e.marketprice * 1).toFixed(4),
+            qty: e.qty || e.orderminqty,
+            marketprice: e.marketprice,
+            discountrate: e.discountrate || 1,
+            type: "指定单价",
+          };
+        }),
+      };
+      this.$refs.addProduct.listData();
+      this.$emit("onSuccess");
+    },
+    showMessage(res) {
+      this.tool.showMessage(res, () => {
+        this.listData();
+        this.$refs.addProduct.listData();
+        this.$emit("onSuccess");
+      });
     },
 
     /*批量添加校验是否重复*/
-    async queryProuctAdds(data){
-      let item = data.map(item => {
+    async queryProuctAdds(data) {
+      let item = data.map((item) => {
         return {
-          "itemid": item.itemid,
-          "price": item.price || (item.marketprice * 1).toFixed(4),
-          "qty": item.qty || item.orderminqty,
-          "marketprice":item.marketprice,
-          "discountrate":item.discountrate || 1,
-          "type":'指定单价'
-        }
-      })
-      let checkItem = []
-      item.forEach((item,index)=>{
-        checkItem[index] = item.itemid
-      })
+          itemid: item.itemid,
+          price: item.price || (item.marketprice * 1).toFixed(4),
+          qty: item.qty || item.orderminqty,
+          marketprice: item.marketprice,
+          discountrate: item.discountrate || 1,
+          type: "指定单价",
+        };
+      });
+      let checkItem = [];
+      item.forEach((item, index) => {
+        checkItem[index] = item.itemid;
+      });
       const res = await this.$api.requested({
-        "id": 20230221151903,
-        "content": {
-          "sa_contractid": this.$route.query.id,
-          "itemids":checkItem
+        id: 20230221151903,
+        content: {
+          sa_contractid: this.$route.query.id,
+          itemids: checkItem,
         },
-      })
-      if (!res.data){
+      });
+      if (!res.data) {
         /*直接添加*/
-        this.addProducts(item)
-      }else {
+        this.addProducts(item);
+      } else {
         /*询问是否覆盖*/
-        this.checkItems(item)
+        this.checkItems(item);
       }
     },
     checkItems(data) {
-      this.$confirm(this.$t('商品已存在, 是否更新最新价格')+'?', this.$t('提示'), {
-        confirmButtonText: this.$t('确定'),
-        cancelButtonText: this.$t('取消'),
-        closeOnClickModal:false,
-        type: 'warning'
-      }).then(() => {
-        this.addProducts(data)
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: this.$t('已取消添加')
+      this.$confirm(
+        this.$t("商品已存在, 是否更新最新价格") + "?",
+        this.$t("提示"),
+        {
+          confirmButtonText: this.$t("确定"),
+          cancelButtonText: this.$t("取消"),
+          closeOnClickModal: false,
+          type: "warning",
+        }
+      )
+        .then(() => {
+          this.addProducts(data);
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: this.$t("已取消添加"),
+          });
         });
-      });
     },
     /*批量添加商品*/
-    async addProducts (data) {
+    async addProducts(data) {
       let res = await this.$api.requested({
-        "id": 20221123164402,
-        "content": {
-          "sa_contractid": this.$route.query.id,
-          "items": data
+        id: 20221123164402,
+        content: {
+          sa_contractid: this.$route.query.id,
+          items: data,
         },
-      })
-      this.tool.showMessage(res,() => {
-        this.$emit('onSuccess')
-        this.listData()
-        this.$refs.addProduct.listData()
-        this.$refs.addArchivesProduct.listData()
-      })
+      });
+      this.tool.showMessage(res, () => {
+        this.$emit("onSuccess");
+        this.listData();
+        this.$refs.addProduct.listData();
+        this.$refs.addArchivesProduct.listData();
+      });
     },
     /*单个商品添加校验*/
-    async queryProuctAdd(data){
+    async queryProuctAdd(data) {
       const res = await this.$api.requested({
-        "id": 20230221151903,
-        "content": {
-          "sa_contractid": this.$route.query.id,
-          "itemids":[data.itemid]
+        id: 20230221151903,
+        content: {
+          sa_contractid: this.$route.query.id,
+          itemids: [data.itemid],
         },
-      })
-      if (!res.data){
-        this.addProduct(data)
-      }else {
-        this.checkItem(data)
+      });
+      if (!res.data) {
+        this.addProduct(data);
+      } else {
+        this.checkItem(data);
       }
     },
     checkItem(data) {
-      this.$confirm(this.$t('商品已存在, 是否更新最新价格')+'?', this.$t('提示'), {
-        confirmButtonText: this.$t('确定'),
-        cancelButtonText: this.$t('取消'),
-        closeOnClickModal:false,
-        type: 'warning'
-      }).then(() => {
-        this.addProduct(data)
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: this.$t('已取消添加')
+      this.$confirm(
+        this.$t("商品已存在, 是否更新最新价格") + "?",
+        this.$t("提示"),
+        {
+          confirmButtonText: this.$t("确定"),
+          cancelButtonText: this.$t("取消"),
+          closeOnClickModal: false,
+          type: "warning",
+        }
+      )
+        .then(() => {
+          this.addProduct(data);
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: this.$t("已取消添加"),
+          });
         });
-      });
     },
     /*单个添加商品*/
-    async addProduct (data) {
-      let price = 0
-      if (!data.price){
-        price = (data.marketprice * 1).toFixed(4)
+    async addProduct(data) {
+      let price = 0;
+      if (!data.price) {
+        price = (data.marketprice * 1).toFixed(4);
       }
       let res = await this.$api.requested({
-        "id": 20221123164402,
-        "content": {
-          "sa_contractid": this.$route.query.id,
-          "items": [
+        id: 20221123164402,
+        content: {
+          sa_contractid: this.$route.query.id,
+          items: [
             {
-              "itemid": data.itemid,
-              "price": data.price || price,
-              "qty": data.qty || data.orderminqty,
-              "marketprice":data.marketprice,
-              "discountrate":data.discountrate || 1,
-              "type":'指定单价'
-            }
-          ]
+              itemid: data.itemid,
+              price: data.price || price,
+              qty: data.qty || data.orderminqty,
+              marketprice: data.marketprice,
+              discountrate: data.discountrate || 1,
+              type: "指定单价",
+            },
+          ],
         },
-      })
-      this.tool.showMessage(res,() => {
-        this.$refs.addProduct.listData()
-        this.$refs.addArchivesProduct.listData()
-        this.listData()
-        this.$emit('onSuccess')
-      })
+      });
+      this.tool.showMessage(res, () => {
+        this.$refs.addProduct.listData();
+        this.$refs.addArchivesProduct.listData();
+        this.listData();
+        this.$emit("onSuccess");
+      });
     },
-    selectionChange(val){
-      this.delProductData = []
-      val.forEach((item,index) => {
-        this.delProductData[index] = item.sa_contract_itemsid
-      })
+    selectionChange(val) {
+      this.delProductData = [];
+      val.forEach((item, index) => {
+        this.delProductData[index] = item.sa_contract_itemsid;
+      });
     },
     /*批量删除判断*/
     onDelProduct() {
-      this.$confirm(this.$t('此操作将删除这些商品, 是否继续')+'?', this.$t('提示'), {
-        confirmButtonText: this.$t('确定'),
-        cancelButtonText: this.$t('取消'),
-        type: 'warning'
-      }).then(() => {
-        this.delProduct()
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: this.$t('取消删除')
+      this.$confirm(
+        this.$t("此操作将删除这些商品, 是否继续") + "?",
+        this.$t("提示"),
+        {
+          confirmButtonText: this.$t("确定"),
+          cancelButtonText: this.$t("取消"),
+          type: "warning",
+        }
+      )
+        .then(() => {
+          this.delProduct();
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: this.$t("取消删除"),
+          });
         });
-      });
     },
     /*批量删除商品*/
-    async delProduct(){
+    async delProduct() {
       const res = await this.$api.requested({
-        "id": 20221123164502,
-        "content": {
-          "sa_contractid":this.$route.query.id,
-          "sa_contract_itemsids":this.delProductData
+        id: 20221123164502,
+        content: {
+          sa_contractid: this.$route.query.id,
+          sa_contract_itemsids: this.delProductData,
         },
-      })
-      this.tool.showMessage(res,()=>{
-        this.listData()
-        this.$emit("delSuccess")
-      })
+      });
+      this.tool.showMessage(res, () => {
+        this.listData();
+        this.$emit("delSuccess");
+      });
     },
-    addAll(){
-      this.listData()
-      this.$emit('onSuccess')
+    addAll() {
+      this.listData();
+      this.$emit("onSuccess");
+    },
+    closeDrawer() {
+      this.listData();
+      this.$emit("delSuccess");
     },
-    closeDrawer(){
-      this.listData()
-      this.$emit("delSuccess")
-    }
-
   },
 };
 </script>
 
 <style scoped>
-/deep/ .el-input.is-disabled .el-input__inner{
+/deep/ .el-input.is-disabled .el-input__inner {
   color: #666666;
 }
 </style>

+ 1 - 0
src/HDrpManagement/contractManage/modules/detail.vue

@@ -182,6 +182,7 @@
           <!--    产品类别折扣    -->
           <itemClass ref="itemClass" :data="mainData"  :isLeader="isLeader" >
             <template v-slot:cooperate="scope">
+              <addClass class="inline-16" v-if="tool.checkAuth($route.name,'productClassManage') && mainData.status === '新建' && isLeader" :disabled="mainData.status != '新建' || !isLeader" :typeName="mainData.type" slot="addProduct" @onSuccess="$refs.itemClass.listData()" title="自产品类别添加"  ref="addProduct" @closeDrawer="closeDrawer"/>
               <el-button :disabled="mainData.status !== '新建'" size="small" :type="mainData.status === '新建'?'primary':''" @click="cooperateVisible = true" v-if="tool.checkAuth($route.name,'productClassManage') && isLeader">{{$t('同步合作协议')}}</el-button>
               <el-dialog :title="$t('同步合作协议')" :visible.sync="cooperateVisible" append-to-body width="703px">
                 <span style="color: #8C8C8C;font-size: 14px">{{$t('请选择同步更新经销商/直销客户合作协议产品类别的方式')}}:</span>

+ 60 - 11
src/HDrpManagement/projectChange/modules/modules/productSet/index.vue

@@ -29,6 +29,13 @@
           @handleParam="handleOptionParam"
           v-if="tool.checkAuth($route.name, 'optionSystem')"
         ></selectOption>
+        <addSelectionList
+          style="margin-left: 10px"
+          slot="optionSystem"
+          sourcetable="sa_project"
+          @showMessage="showMessage"
+          v-if="tool.checkAuth($route.name, 'addSelectionList')"
+        />
       </addProduct>
       <!--      <uploadAllData
           v-if="tool.checkAuth($route.name,'productSetManage') && data.disabled "
@@ -50,7 +57,7 @@
           data.status !== '已结案'
         "
         @click="onDelAll"
-        >{{$t('一键删除')}}</el-button
+        >{{ $t("一键删除") }}</el-button
       >
       <el-button
         v-if="
@@ -110,7 +117,7 @@
         >
       </importFile>
       <div style="float: right">
-        <label class="search__label">{{$t('预计折扣')}}(%):</label>
+        <label class="search__label">{{ $t("预计折扣") }}(%):</label>
         <el-input
           style="width: 100px"
           v-model="discountrate"
@@ -167,7 +174,7 @@
               <el-tooltip
                 class="item"
                 effect="dark"
-                content="点击查看选型配置单"
+                :content="$t('点击查看选型配置单')"
                 placement="top-start"
               >
                 <el-button
@@ -176,11 +183,11 @@
                   @click="
                     $refs.setOrder.onShow(scope.column.data.sa_lectotypecfgid)
                   "
-                  >{{ scope.column.data.itemname }}</el-button
+                  >{{ $t(scope.column.data.itemname) }}</el-button
                 >
               </el-tooltip>
             </div>
-            <div v-else>{{ scope.column.data.itemname }}</div>
+            <div v-else>{{ $t(scope.column.data.itemname) }}</div>
           </div>
           <div v-else-if="scope.column.columnname == 'price'">
             <el-input
@@ -214,6 +221,18 @@
           <div v-else-if="scope.column.columnname == 'amount'">
             <span>{{ tool.formatAmount(scope.column.data.amount, 2) }}</span>
           </div>
+          <div v-else-if="scope.column.columnname == 'model'">
+            <el-input
+              v-if="scope.column.data.itemid == 0"
+              v-model="scope.column.data.model"
+              size="mini"
+              :placeholder="$t('请输入型号')"
+              @change="saveModel(scope.column.data)"
+            ></el-input>
+            <span v-else>
+              {{ $t(scope.column.data[scope.column.columnname]) }}</span
+            >
+          </div>
           <span v-else>{{
             $t(scope.column.data[scope.column.columnname])
           }}</span>
@@ -222,7 +241,7 @@
       <div style="margin-top: 16px">
         <div style="float: left">
           <span
-            >{{$t('金额(元)')}}:{{
+            >{{ $t("金额(元)") }}:{{
               totalPrice ? tool.formatAmount(totalPrice, 2) : "0.00"
             }}</span
           >
@@ -257,6 +276,8 @@ import uploadAllData from "@/components/uploadAllData/index";
 import importFile from "@/template/importFile/index";
 import SelectOption from "@/optionSystem/selectOption/add.vue";
 import SetOrder from "@/optionSystem/selectOption/components/setOrder.vue";
+import addSelectionList from "@/SDrpManagement/QuotedPrice/detail/modules/productInventory/addSelectionList";
+
 export default {
   props: ["data", "disabled", "flagTag", "isLeader"],
   components: {
@@ -269,6 +290,7 @@ export default {
     importFile,
     SelectOption,
     SetOrder,
+    addSelectionList,
   },
   data() {
     return {
@@ -324,6 +346,22 @@ export default {
     };
   },
   methods: {
+    //修改型号
+    saveModel(data) {
+      console.log(data);
+      this.$api
+        .requested({
+          id: 20221021145502,
+          content: {
+            sa_projectid: this.$route.query.id,
+            items: [data],
+          },
+        })
+        .then((res) => {
+          console.log("项目商机修改型号", res);
+          this.tool.showMessage(res);
+        });
+    },
     /*list (vm) {
       vm.content.sa_projectid = this.$route.query.id
     },*/
@@ -434,6 +472,13 @@ export default {
       this.$refs.addProduct.listData();
       this.listData();
     },
+    showMessage(res) {
+      this.tool.showMessage(res, () => {
+        this.$refs.addProduct.listData();
+        this.listData();
+        this.$emit("productSetSuccess");
+      });
+    },
     onSuccess() {
       this.listData();
       this.$emit("productSetSuccess");
@@ -455,11 +500,15 @@ export default {
     },
     /*批量删除判断*/
     onDelProduct() {
-      this.$confirm(this.$t('此操作将删除这些商品, 是否继续')+"?", this.$t("提示"), {
-        confirmButtonText: this.$t("确定"),
-        cancelButtonText: this.$t("取消"),
-        type: "warning",
-      })
+      this.$confirm(
+        this.$t("此操作将删除这些商品, 是否继续") + "?",
+        this.$t("提示"),
+        {
+          confirmButtonText: this.$t("确定"),
+          cancelButtonText: this.$t("取消"),
+          type: "warning",
+        }
+      )
         .then(() => {
           this.delProduct();
         })

+ 40 - 13
src/HDrpManagement/projectChange/modules/modules/quotation/modules/add.vue

@@ -188,7 +188,8 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="onClose" class="normal-btn-width" :disabled="loading">{{$t(`取 消`)}}</el-button>
-        <el-button  size="small" type="primary" @click="getSubmit" class="normal-btn-width" :loading="loading">{{$t(`确 定`)}}</el-button>
+        <el-button  size="small" type="primary" @click="getSubmit" class="normal-btn-width" :loading="loading">{{$t(`保存`)}}</el-button>
+        <el-button  size="small" @click="getSubmit('提交')"  type="warning" class="normal-btn-width" :loading="loading">{{$t(`保存并提交`)}}</el-button>
       </div>
     </el-drawer>
   </div>
@@ -412,7 +413,7 @@ export default {
       })
     },
     /*提交*/
-    getSubmit(){
+    getSubmit(val){
       if (this.form.date.length === 0){
         this.form.begdate = ''
         this.form.enddate = ''
@@ -434,18 +435,44 @@ export default {
           this.loading = false
           this.tool.showMessage(res,()=>{})
         }
-        this.tool.showMessage(res,() => {
-          this.loading = false
-          /*this.changeData(this.productObj)*/
-          this.$emit('addSuccess')
-          let route = this.$route
-          if (route.path !== '/quotedPriceDetail') {
-            this.oldRoute = {path:route.path,query:route.query}
-            this.$store.dispatch('setHistoryRouter',this.oldRoute)
+        if (val == '提交') {
+          const resSubmit = await this.$api.requested({
+            "id": 20221020165303,
+            "content": {
+              "sa_quotedpriceid":res.data.sa_quotedpriceid
+            }
+          })
+          if (resSubmit.code == 0) {
+            this.loading = false;
+            this.tool.showMessage(res,()=>{})
+          }else {
+            this.tool.showMessage(res,() => {
+              this.loading = false
+              /*this.changeData(this.productObj)*/
+              this.$emit('addSuccess')
+              let route = this.$route
+              if (route.path !== '/quotedPriceDetail') {
+                this.oldRoute = {path:route.path,query:route.query}
+                this.$store.dispatch('setHistoryRouter',this.oldRoute)
+              }
+              this.$store.dispatch('changeDetailDrawer',true)
+              this.$router.push({path:'/quotedPriceDetail',query:{id:res.data.sa_quotedpriceid,rowindex:res.data.rowindex}})
+            })
           }
-          this.$store.dispatch('changeDetailDrawer',true)
-          this.$router.push({path:'/quotedPriceDetail',query:{id:res.data.sa_quotedpriceid,rowindex:res.data.rowindex}})
-        })
+        }else {
+          this.tool.showMessage(res,() => {
+            this.loading = false
+            /*this.changeData(this.productObj)*/
+            this.$emit('addSuccess')
+            let route = this.$route
+            if (route.path !== '/quotedPriceDetail') {
+              this.oldRoute = {path:route.path,query:route.query}
+              this.$store.dispatch('setHistoryRouter',this.oldRoute)
+            }
+            this.$store.dispatch('changeDetailDrawer',true)
+            this.$router.push({path:'/quotedPriceDetail',query:{id:res.data.sa_quotedpriceid,rowindex:res.data.rowindex}})
+          })
+        }
       })
     },
     /*修改后的产品数据*/

+ 23 - 0
src/HManagement/serviceDataScreen/components/borderTemplate.vue

@@ -0,0 +1,23 @@
+<template>
+  <div class="border-box-style">
+
+  </div>
+</template>
+
+<script>
+export default {
+  name: "borderTemplate"
+}
+</script>
+
+<style scoped>
+  .border-box-style{
+    width: 290px;
+    height: 240px;
+    background: linear-gradient( 180deg, #00244D 0%, #001E41 100%);
+    box-shadow: 0px 2px 4px 1px rgba(0,0,0,0.15);
+    border-radius: 4px 4px 4px 4px;
+    border: 2px solid #3D73BA;
+    opacity: 0.8;
+  }
+</style>

+ 417 - 0
src/HManagement/serviceDataScreen/index.vue

@@ -0,0 +1,417 @@
+<template>
+  <div class="bg-img" id="fullScreen">
+    <div style="padding: 0 20px 0 20px">
+      <div class="justify-style">
+        <div class="select-style">
+          <el-cascader :placeholder="$t('部门')"  class="inline-16" ref="selectdep" size="small" v-model="depment" :options="deplist" :append-to-body="false"  placement="bottom"
+                       :props="{emitPath:true,expandTrigger:'hover',checkStrictly:true,label:'label',value:'departmentid',children:'children'}"  @change="selectDep" ></el-cascader>
+          <el-select v-model="person" filterable :placeholder="$t('请选择')" size="small"  @change="selectPerson" :popper-append-to-body="false" class="inline-16">
+            <el-option
+                v-for="item in personnelList"
+                :key="item.index"
+                :label="$t(item.name)"
+                :value="item.userid">
+            </el-option>
+          </el-select>
+          <el-select v-model="isleave" clearable class="inline-16" size="small" :placeholder="$t('请选择状态')" @change="leaveChange" :popper-append-to-body="false">
+            <el-option :label="$t('在职')" value="1"></el-option>
+            <el-option :label="$t('离职')" value="2"></el-option>
+          </el-select>
+        </div>
+        <div class="title-style">{{$t(`营销管理平台`)}}</div>
+        <div class="time-style">
+          <div>
+            <span class="span">{{ymd}}</span>
+            <spna class="span">{{week}}</spna>
+            <span>{{nowTime}}</span>
+          </div>
+          <div>
+            <el-button size="small" class="button" type="primary" icon="el-icon-s-home" style="background-color: #144894"  @click="$router.push('/message')">{{$t(`返回首页`)}}</el-button>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="content-style justify-style">
+      <div>
+        <borderTemplate></borderTemplate>
+      </div>
+    </div>
+    <fullScreen ref="fullRef" class="inline-16" domId="fullScreen" style="visibility: hidden" @backFull="backFull"></fullScreen>
+  </div>
+</template>
+
+<script>
+import fullScreen from "@/views/salesData/components/fullScreen";
+import borderTemplate from './components/borderTemplate'
+export default {
+  name: "index",
+  components:{fullScreen,borderTemplate},
+  data(){
+    return {
+      timer: "", // 定义一个定时器
+      nowTime: "",
+      ymd:"",
+      week:"",
+      isleave:'1',
+      depment:'',
+      person:'',
+      departmentid:'',
+      deplist:[],
+      personnelList:[],
+      depmentParam:{
+        "id": 20230620102004,
+        "content": {
+          "isleave":'1'
+        }
+      },
+      windowWidth: document.documentElement.clientWidth,  //实时屏幕宽度
+      windowHeight: document.documentElement.clientHeight
+    }
+  },
+  mounted() {
+    this.$refs.fullRef.enterFullscreen()
+    this.departmentrtment()
+    console.log(this.windowWidth,'获取宽度')
+    console.log(this.windowHeight,'获取高度')
+    var that = this;
+    // <!--把window.onresize事件挂在到mounted函数上-->
+    window.onresize = () => {
+      return (() => {
+        window.fullWidth = document.documentElement.clientWidth;
+        that.windowWidth = window.fullWidth; // 宽
+        window.fullHeight = document.documentElement.clientHeight;
+        that.windowWidth = window.fullHeight
+      })()
+    };
+  },
+  watch: {
+    windowWidth (val) {
+      console.log("实时屏幕宽度:",val );
+    },
+    windowHeight (val) {
+      console.log("实时屏幕高度:",val );
+    }
+
+  },
+  methods:{
+    getTime() {
+      this.timer = setInterval(() => {
+        // 获取当前时间的各个部分
+        let timeDate = new Date();
+        let year = timeDate.getFullYear();
+        let mounth = timeDate.getMonth() + 1;
+        let day = timeDate.getDate();
+        let hours = timeDate.getHours();
+        // 格式化小时
+        hours = hours >= 10 ? hours : "0" + hours;
+        let minutes = timeDate.getMinutes();
+        // 格式化分钟
+        minutes = minutes >= 10 ? minutes : "0" + minutes;
+        let seconds = timeDate.getSeconds();
+        // 格式化秒钟
+        seconds = seconds >= 10 ? seconds : "0" + seconds;
+        let week = timeDate.getDay();
+        let weekArr = [
+          "星期日",
+          "星期一",
+          "星期二",
+          "星期三",
+          "星期四",
+          "星期五",
+          "星期六"
+        ];
+
+        // 将获取的时间信息赋值给nowTime
+        // this.nowTime = `${year}-${mounth}-${day} ${weekArr[week]} ${hours}:${minutes}:${seconds}`;
+        this.ymd = `${year}年${mounth}月${day}日`
+        this.week = `${weekArr[week]}`
+        this.nowTime = `${hours}:${minutes}:${seconds}`
+      }, 1000); // 每隔一秒更新时间
+    },
+    backFull(){
+      this.$router.push('/message')
+    },
+    leaveChange(){
+      const type = this.depment?'1':'0'
+      this.person = ''
+      const dataid = type == '0'?-1:this.departmentid
+      this.otherModel(dataid,type,this.isleave,'状态')
+      this.personData()
+    },
+    /*获取新的业务员列表*/
+    async personData(){
+      let param = {
+        id: 20230620102004,
+        content: {
+          isleave:this.isleave
+        },
+      }
+      const res = await this.$api.requested(param)
+      this.personnelList = res.data.hr
+    },
+    async departmentrtment() {
+      const res = await this.$api.requested(this.depmentParam)
+      this.deplist = this.createMenu(res.data.dep)
+      this.personnelList = res.data.hr
+      this.person = JSON.parse(window.sessionStorage.getItem('active_account')).name
+      this.depment = ''
+      this.departmentid = ''
+      const userid = JSON.parse(sessionStorage.getItem('active_account')).userid
+    },
+    createMenu (array) {
+      var that = this
+      let arr = []
+      function convertToElementTree(node) {
+        // 新节点
+        if (node.subdep.length === 0){
+          var elNode = {
+            label: node["depname"],
+            parentid:node['parentid'],
+            parentname:node['parentname'],
+            departmentid:node["departmentid"],
+            value:node["departmentid"],
+            remarks:node["remarks"],
+            isused:node["isused"],
+            changedate:node['changedate'],
+            changeby:node['changeby'],
+            createdate:node['createdate'],
+            createby:node['createby'],
+            depno:node['depno'],
+            disabled:that.pageOnlyRead,
+          }
+        }else {
+          var elNode = {
+            label: node["depname"],
+            parentid:node['parentid'],
+            parentname:node['parentname'],
+            departmentid:node["departmentid"],
+            value:node["departmentid"],
+            remarks:node["remarks"],
+            isused:node["isused"],
+            changedate:node['changedate'],
+            changeby:node['changeby'],
+            createdate:node['createdate'],
+            createby:node['createby'],
+            depno:node['depno'],
+            disabled:that.pageOnlyRead,
+            children: []
+          }
+        }
+        if (node.subdep && node.subdep.length > 0) {
+          // 如果存在子节点
+          for (var index = 0; index < node.subdep.length; index++) {
+            // 遍历子节点, 把每个子节点看做一颗独立的树, 传入递归构造子树, 并把结果放回到新node的children中
+            elNode.children.push(convertToElementTree(node.subdep[index]));
+          }
+        }
+        return elNode;
+      }
+      array.forEach((element) => {
+        arr.push(convertToElementTree(element))
+      });
+      return arr
+    },
+    selectDep(val) {
+      if (val.length === 0){
+        const userid = JSON.parse(sessionStorage.getItem('active_account')).userid
+        this.otherModel(userid,'0')
+      }else {
+        this.person = ''
+        this.dataid = ''
+        this.departmentid = val[val.length -1]
+        this.otherModel(this.departmentid,'1',this.isleave)
+      }
+    },
+    selectPerson(val){
+      this.depment = ''
+      this.departmentid = ''
+      this.dataid = val
+      this.otherModel(val,'0',this.isleave)
+    },
+  },
+  created() {
+    this.getTime()
+  },
+  beforeDestroy() {
+    if (this.timer) {
+      clearInterval(this.timer);
+    }
+  },
+}
+</script>
+
+<style scoped>
+.bg-img {
+  background: url("../../assets/icons/bgScreen.jpg") no-repeat;
+  /*height:810px ;*/
+  /*width: 1440px;*/
+  background-size: 100% 100%;
+  width: 100vh;
+  height: 100vh;
+  margin: 0;
+  padding: 0;
+}
+.select-style{
+  width: 30%;
+  padding-top: 12px;
+}
+/*@media (min-height: 866px) {*/
+/*  .title-style {*/
+/*    font-family: Microsoft YaHei, Microsoft YaHei;*/
+/*    font-weight: bold;*/
+/*    font-size: 44px;*/
+/*    color: #E6F4FF;*/
+/*    text-shadow: 0px 2px 4px #A9D7F9;*/
+/*    text-align: left;*/
+/*    font-style: normal;*/
+/*    text-transform: none;*/
+/*    padding-top: 15px;*/
+/*  }*/
+/*}*/
+/*@media (min-height: 1092px) {*/
+/*  .title-style {*/
+/*    font-family: Microsoft YaHei, Microsoft YaHei;*/
+/*    font-weight: bold;*/
+/*    font-size: 44px;*/
+/*    color: #E6F4FF;*/
+/*    text-shadow: 0px 2px 4px #A9D7F9;*/
+/*    text-align: left;*/
+/*    font-style: normal;*/
+/*    text-transform: none;*/
+/*    padding-top: 20px;*/
+/*  }*/
+/*}*/
+/*@media (min-height: 1206px) {*/
+/*  .title-style {*/
+/*    font-family: Microsoft YaHei, Microsoft YaHei;*/
+/*    font-weight: bold;*/
+/*    font-size: 44px;*/
+/*    color: #E6F4FF;*/
+/*    text-shadow: 0px 2px 4px #A9D7F9;*/
+/*    text-align: left;*/
+/*    font-style: normal;*/
+/*    text-transform: none;*/
+/*    padding-top: 20px;*/
+/*  }*/
+/*}*/
+/*@media (min-height: 1134px) {*/
+/*  .title-style {*/
+/*    font-family: Microsoft YaHei, Microsoft YaHei;*/
+/*    font-weight: bold;*/
+/*    font-size: 44px;*/
+/*    color: #E6F4FF;*/
+/*    text-shadow: 0px 2px 4px #A9D7F9;*/
+/*    text-align: left;*/
+/*    font-style: normal;*/
+/*    text-transform: none;*/
+/*    padding-top: 25px;*/
+/*  }*/
+/*}*/
+/*@media (min-height: 1391px) {*/
+/*  .title-style {*/
+/*    font-family: Microsoft YaHei, Microsoft YaHei;*/
+/*    font-weight: bold;*/
+/*    font-size: 44px;*/
+/*    color: #E6F4FF;*/
+/*    text-shadow: 0px 2px 4px #A9D7F9;*/
+/*    text-align: left;*/
+/*    font-style: normal;*/
+/*    text-transform: none;*/
+/*    padding-top: 30px;*/
+/*  }*/
+/*}*/
+/*@media (min-height: 1506px) {*/
+/*  .title-style {*/
+/*    font-family: Microsoft YaHei, Microsoft YaHei;*/
+/*    font-weight: bold;*/
+/*    font-size: 44px;*/
+/*    color: #E6F4FF;*/
+/*    text-shadow: 0px 2px 4px #A9D7F9;*/
+/*    text-align: left;*/
+/*    font-style: normal;*/
+/*    text-transform: none;*/
+/*    padding-top: 40px;*/
+/*  }*/
+/*}*/
+.title-style {
+  font-family: Microsoft YaHei, Microsoft YaHei;
+  font-weight: bold;
+  font-size: 2.292vw;
+  color: #E6F4FF;
+  text-shadow: 0.000vw 0.104vw 0.208vw #A9D7F9;
+  text-align: left;
+  font-style: normal;
+  text-transform: none;
+  padding-top: 1.042vw;
+}
+/*.title-style {*/
+/*  font-family: Microsoft YaHei, Microsoft YaHei;*/
+/*  font-weight: bold;*/
+/*  font-size: 1.733vw ;*/
+/*  color: #E6F4FF;*/
+/*  text-shadow: 0.000vw 0.533vw 0.967vw #A9D7F9;*/
+/*  text-align: left;*/
+/*  font-style: normal;*/
+/*  text-transform: none;*/
+/*  padding-top: 0.833vw;*/
+/*}*/
+.time-style{
+  font-family: Microsoft YaHei, Microsoft YaHei;
+  width: 30vw;
+  font-weight: 400;
+  font-size: 0.938vw;
+  color: #E6F4FF;
+  text-align: right;
+  font-style: normal;
+  text-transform: none;
+  padding-top: 0.938vw;
+}
+.time-style .span {
+  margin-right: 1.042vw;
+}
+.time-style .button {
+  font-family: Microsoft YaHei, Microsoft YaHei;
+  font-weight: 400;
+  font-size: 0.938vw;
+  color: #E6F4FF;
+  text-align: left;
+  font-style: normal;
+  text-transform: none;
+  margin-top: 1.042vw;
+  border-radius: 0.313vw 0.313vw 0.313vw 0.313vw;
+  border: none;
+}
+.justify-style{
+  display: flex;
+  justify-content: space-between
+}
+.content-style{
+  margin: 1.042vw 1.042vw 1.042vw 1.042vw;
+  border: 0.052vw solid #5daf34;
+  height: calc(100vh - 11.458vw);
+}
+/deep/ .el-input {
+  position: relative;
+  font-size: 14px;
+  display: inline-block;
+  width: 140px;
+}
+/deep/ .el-input__inner {
+  -webkit-appearance: none;
+  background-color: #061a31;
+  background-image: none;
+  box-sizing: border-box;
+  color: #c6d6e4;
+  display: inline-block;
+  font-size: inherit;
+  height: 40px;
+  line-height: 40px;
+  outline: 0;
+  padding: 0 15px;
+  transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
+  width: 100%;
+  box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.16);
+  border-radius: 6px 6px 6px 6px;
+  border: 1px solid #CFDCE5;
+}
+</style>

+ 138 - 182
src/SDrpManagement/ProductGroup/index.vue

@@ -1,32 +1,27 @@
 <template>
-  <div class="group container normal-panel">
-    <div style="display: flex; align-items: center; margin-bottom: 16px">
+  <div class="group container normal-panel ">
+    <div style="display:flex;align-items:center;margin-bottom:16px">
       <el-input
-        :placeholder="$t('请输入搜索内容')"
-        suffix-icon="el-icon-search"
-        v-model="params.content.where.condition"
-        style="width: 200px"
-        size="mini"
-        class="input-with-select inline-16"
-        @keyup.native.enter="getProductGroup((params.content.pageNumber = 1))"
-        @clear="clearData"
-        clearable
-      >
+          placeholder="请输入搜索内容"
+          suffix-icon="el-icon-search"
+          v-model="params.content.where.condition"
+          style="width:200px"
+          size="mini"
+          class="input-with-select inline-16"
+          @keyup.native.enter="getProductGroup(params.content.pageNumber=1)"
+          @clear="clearData"
+          clearable>
       </el-input>
-      <selectPeople
-        ref="people"
-        @selectRow="selectRow"
-        v-if="isEnterprise == 0 || isEnterprise == 1"
-      >
-        <div :class="enterprisename ? 'select-input' : ''" slot="input">
+      <selectPeople ref="people" @selectRow="selectRow" v-if="isEnterprise == 0 || isEnterprise == 1">
+        <div :class="enterprisename ? 'select-input' : ''" slot="input" >
           <el-input
             clearable
-            @clear="selectRow({ enterprisename: '', sys_enterpriseid: '' })"
+            @clear="selectRow({enterprisename:'',sys_enterpriseid:''})"
             v-model="enterprisename"
-            :placeholder="$t(`请选择经销商/客户`)"
-            @focus="$refs.people.visible = true"
+            placeholder="请选择经销商/客户"
+            @focus="$refs.people.visible=true"
             size="small"
-            style="width: 300px"
+            style="width:300px"
           ></el-input>
         </div>
       </selectPeople>
@@ -34,58 +29,24 @@
       <!--阀门选型-->
       <selectOption position="单独选型" style="margin-left: 10px" @handleParam="handleOptionParam"  v-if="tool.checkAuth($route.name,'optionSystem')"></selectOption>
     </div>
-    <selectClass
-      ref="class"
-      @clickAreaBase="clickAreaBase"
-      @brandChange="brandChange"
-      @onClassChange="onClassChange"
-      @Search="Search"
-      @clearSearch="clearSearch"
-      @clickField="clickField"
-      :default="true"
-    ></selectClass>
-    <div
-      class="content"
-      v-if="Object.keys(productGroup).length > 0"
-      style="padding: 0; margin-bottom: 0; height: calc(100vh - 360px)"
-    >
+    <selectClass ref="class" @clickAreaBase="clickAreaBase" @brandChange="brandChange" @onClassChange="onClassChange" @Search="Search" @clearSearch="clearSearch" @clickField="clickField" :default="true"></selectClass>
+    <div class="content" v-if="Object.keys(productGroup).length > 0" style="padding: 0;margin-bottom: 0;height: calc(100vh - 360px)">
       <div class="group-list">
-        <div
-          class="group-item"
-          v-for="item in productGroup"
-          :key="item.sa_itemgroupid"
-          @click="itemClick(item)"
-        >
+        <div class="group-item" v-for="item in productGroup" :key="item.sa_itemgroupid" @click="itemClick(item)">
           <div class="top">
-            <el-image
-              style="width: 100%; width: 200px"
-              :src="item.attinfos[0].url"
-              fit="contain"
-            />
+            <el-image style="width:100%;width: 200px" :src="item.attinfos[0].url" fit="contain" />
           </div>
           <div class="bottom">
-            <div class="title">{{ item.groupname }}</div>
-            <!--            <p class="descript">{{item.groupnum}}</p>-->
-            <p class="descript">
-              <span v-for="(cls, index) in item.itemclass" :key="cls.index">{{
-                index === item.itemclass.length - 1
-                  ? cls.itemclassfullname
-                  : cls.itemclassfullname + ","
-              }}</span>
-            </p>
-            <p class="price descript">
-              {{ $t("价格") }}:<span style="color: red; font-size: 16px"
-                ><small>¥</small>{{ item.minprice }}</span
-              >&nbsp;~&nbsp;<span style="color: red; font-size: 16px"
-                ><small>¥</small>{{ item.maxprice }}</span
-              >
-            </p>
+            <div class="title">{{item.groupname}}</div>
+<!--            <p class="descript">{{item.groupnum}}</p>-->
+            <p class="descript"><span v-for="(cls,index) in item.itemclass" :key="cls.index">{{index === item.itemclass.length -1 ?cls.itemclassfullname:cls.itemclassfullname + ','}}</span></p>
+            <p class="price descript">价格:<span style="color:red;font-size:16px"><small>¥</small>{{item.minprice}}</span>&nbsp;~&nbsp;<span style="color:red;font-size:16px"><small>¥</small>{{item.maxprice}}</span></p>
           </div>
         </div>
       </div>
     </div>
-    <el-empty :description="$t('暂无数据')" v-else></el-empty>
-    <div style="text-align: center; padding-top: 10px; margin-bottom: -6px">
+    <el-empty description="暂无数据" v-else></el-empty>
+     <div style="text-align:center;padding-top: 10px;margin-bottom: -6px">
       <el-pagination
         background
         small
@@ -94,10 +55,9 @@
         :current-page="currentPage"
         :page-size="params.content.pageSize"
         layout="total, prev, pager, next, jumper"
-        :total="total"
-      >
+        :total="total">
       </el-pagination>
-    </div>
+  </div>
   </div>
 </template>
 
@@ -107,36 +67,35 @@ import selectPeople from './modules/selectPeople'
 import SelectOption from '@/optionSystem/selectOption/add.vue'
 import { log } from '@antv/g2plot/lib/utils';
 export default {
-  name: "productgroup",
+  name: 'productgroup',
   data() {
     return {
-      brandList: "",
-      brandId: [],
-      tablecols: [],
-      productGroup: "",
+      brandList:'',
+      brandId:[],
+      tablecols:[],
+      productGroup:'',
       params: {
-        id: "20220926142203",
-        content: {
-          pageSize: 20,
-          pageNumber: 1,
-          nocache: true,
-          brandids: [],
-          where: {
-            condition: "",
-            tradefield: "",
-            standards: "",
-          },
-        },
+        "id": "20220926142203",
+        "content": {
+          "pageSize":20,
+          "pageNumber":1,
+          "nocache":true,
+          "brandids":[],
+          "where":{
+            "condition":"",
+            "tradefield":'',
+            "standards":''
+          }
+        }
       },
-      total: 0,
-      currentPage: 0,
-      sys_enterpriseid: "",
-      enterprisename: "",
-      isEnterprise: JSON.parse(window.sessionStorage.getItem("active_account"))
-        .usertype,
+      total:0,
+      currentPage:0,
+      sys_enterpriseid:'',
+      enterprisename:'',
+      isEnterprise: JSON.parse(window.sessionStorage.getItem('active_account')).usertype
     };
   },
-  provide() {
+  provide () {
     return {
       sys_enterpriseid:() => this.sys_enterpriseid,
       detailData:() => false,
@@ -148,10 +107,8 @@ export default {
   watch:{
   },
   created() {
-    this.getbrandList();
-    this.tablecols = this.tool.tabelCol(
-      this.$route.name
-    ).productGroupTable.tablecols;
+    this.getbrandList()
+    this.tablecols = this.tool.tabelCol(this.$route.name).productGroupTable.tablecols
   },
   methods: {
     //处理选型请求参数
@@ -166,131 +123,130 @@ export default {
       this.sys_enterpriseid = data.sys_enterpriseid
 
       this.$refs.class.queryBrands(() => {
-        this.$refs.class.queryClass();
-        this.brandId = this.$refs.class.brand_act
-          ? [this.$refs.class.brand_act]
-          : [];
-      });
-      this.$refs.class.queryAreaBase(data.sys_enterpriseid);
+        this.$refs.class.queryClass()
+        this.brandId = this.$refs.class.brand_act ? [this.$refs.class.brand_act] : []
+      })
+      this.$refs.class.queryAreaBase(data.sys_enterpriseid)
       this.$refs.class.queryAgentiInfo(() => {
-        this.params.content.where.tradefield = this.$refs.class.tradefield;
+        this.params.content.where.tradefield = this.$refs.class.tradefield
 
-        this.params.content.where.itemclassid = "";
-        this.$refs.class.class_act = "";
-        this.$refs.class.activeClass = {};
-        this.params.content.pageNumber = 1;
+        this.params.content.where.itemclassid = ''
+        this.$refs.class.class_act = ''
+        this.$refs.class.activeClass = {}
+        this.params.content.pageNumber = 1
+
+        this.getProductGroup()
+      })
 
-        this.getProductGroup();
-      });
     },
     /* 获取品牌数据 */
     async getbrandList() {
       let res = await this.$api.requested({
-        id: "20220922085103",
-        content: {
-          nocache: true,
-          where: {
-            condition: "",
-          },
-        },
-      });
-      this.brandList = res.data.map((item) => {
+        "id": "20220922085103",
+        "content": {
+          "nocache":true,
+          "where":{
+              "condition":""
+          }
+        }
+      })
+      this.brandList = res.data.map(item => {
         return {
-          label: item.brandname,
-          value: item.sa_brandid,
-        };
-      });
+          label:item.brandname,
+          value:item.sa_brandid
+        }
+      })
       // this.brandId = this.brandList ? [this.brandList[0].value] : [0]
-      this.getProductGroup();
+      this.getProductGroup()
     },
     async getProductGroup() {
-      this.params.content.brandids = this.brandId;
+      this.params.content.brandids = this.brandId
       if (this.sys_enterpriseid) {
-        this.params.content.sys_enterpriseid = this.sys_enterpriseid;
+        this.params.content.sys_enterpriseid = this.sys_enterpriseid
       } else {
-        Reflect.deleteProperty(this.params.content, "sys_enterpriseid");
+        Reflect.deleteProperty(this.params.content,'sys_enterpriseid')
       }
-      let res = await this.$api.requested(this.params);
-      res.data = res.data.map((e) => {
+      let res = await this.$api.requested(this.params)
+      res.data = res.data.map(e=>{
         if (e.attinfos.length > 0) {
-          return e;
+          return e
         } else {
           e.attinfos.push({
-            url: e.cover,
-          });
-          return e;
+            url:e.cover
+          })
+          return e
         }
-      });
-      console.log(res.data, "--");
-      this.productGroup = res.data;
-      this.total = res.total;
-      this.currentPage = res.pageNumber;
+      })
+      console.log(res.data,'--')
+      this.productGroup = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
     },
     itemClick(id) {
       this.$router.push({
-        path: "/groupDetail",
+        path:'/groupDetail',
         query: {
-          id: id.sa_itemgroupid,
-          brandid: id.sa_brandid,
-          sys_enterpriseid: this.sys_enterpriseid ? this.sys_enterpriseid : "",
-        },
-      });
+          id:id.sa_itemgroupid,
+          brandid:id.sa_brandid,
+          sys_enterpriseid: this.sys_enterpriseid ? this.sys_enterpriseid : ''
+        }
+      })
     },
     brandChange(id) {
       console.log(id);
-      this.brandId = id;
-      this.$refs.class.clickClass(false);
-      this.getProductGroup();
+      this.brandId = id
+      this.$refs.class.clickClass(false)
+      this.getProductGroup()
     },
-    onClassChange(n) {
-      this.params.content.where.itemclassid = n.itemclassid;
-      this.getProductGroup();
+    onClassChange (n) {
+      this.params.content.where.itemclassid = n.itemclassid
+      this.getProductGroup()
     },
-    clickField(item) {
-      this.params.content.where.tradefield = item.tradefield;
-      this.getProductGroup();
+    clickField (item) {
+      this.params.content.where.tradefield = item.tradefield
+      this.getProductGroup()
     },
-    clickAreaBase(item) {
-      this.params.content.where.standards = item;
-      this.getProductGroup();
+    clickAreaBase (item) {
+      this.params.content.where.standards = item
+      this.getProductGroup()
     },
     pageChange(n) {
-      this.params.content.pageNumber = n;
-      this.getProductGroup();
+      this.params.content.pageNumber = n
+      this.getProductGroup()
     },
     Search(data) {
-      this.params.content.where.condition = data;
-      this.params.content.pageNumber = 1;
-      this.getProductGroup();
+      this.params.content.where.condition = data
+      this.params.content.pageNumber = 1
+      this.getProductGroup()
     },
     clearSearch() {
-      this.params.content.where.condition = "";
-      this.params.content.pageNumber = 1;
-      this.getProductGroup();
+      this.params.content.where.condition = ''
+      this.params.content.pageNumber = 1
+      this.getProductGroup()
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
-      this.params.content.pageSize = val;
-      this.getProductGroup();
+      this.params.content.pageSize = val
+      this.getProductGroup()
     },
     handleCurrentChange(val) {
       // console.log(`当前页: ${val}`);
-      this.params.content.pageNumber = val;
-      this.getProductGroup();
+      this.params.content.pageNumber = val
+      this.getProductGroup()
     },
-    clearData() {
-      this.params.content.pageNumber = 1;
-      this.getProductGroup();
+    clearData(){
+      this.params.content.pageNumber = 1
+      this.getProductGroup()
     },
   },
-  beforeRouteLeave(to, from, next) {
-    if (to.name == "groupDetail") {
-      this.$store.commit("setPageCache", ["productgroup"]);
+  beforeRouteLeave (to, from,next) {
+    if (to.name == 'groupDetail') {
+      this.$store.commit('setPageCache',['productgroup'])
     } else {
-      this.$store.commit("setPageCache", []);
+      this.$store.commit('setPageCache',[])
     }
-    next();
-  },
+    next()
+  }
 };
 </script>
 
@@ -300,8 +256,8 @@ export default {
     grid-template-columns: repeat(8, 1fr);
   }
 } */
-.content {
-  height: calc(100vh - 400px);
+.content{
+  height:calc(100vh - 400px);
   overflow-y: scroll;
 }
 .group .group-list {
@@ -344,7 +300,7 @@ export default {
 .group .group-list .group-item .bottom {
   padding: 10px;
   /* border:1px solid #f1f2f3; */
-  border-top: none;
+  border-top:none;
 }
 .group .group-list .group-item .bottom .title {
   font-size: 14px;
@@ -378,8 +334,8 @@ export default {
   font-weight: 400;
   color: #999;
 }
-.group-item {
-  border: 1px solid #f1f2f3;
+.group-item{
+  border:1px solid #f1f2f3;
   border-radius: 3px;
 }
 .page {

+ 1 - 1
src/SDrpManagement/ProductGroup/modules/Select2.vue

@@ -272,4 +272,4 @@ export default {
 .margin-notAll {
   margin-left: -18px;
 }
-</style>
+</style>

+ 5 - 4
src/SDrpManagement/ProductGroup/modules/classTree.vue

@@ -38,7 +38,7 @@ export default {
   cursor: pointer;
   transition: .2s all linear;
   font-size: 14px;
-  
+
 }
 .right-line {
   border-right: 1px solid #e3e5ea;
@@ -54,11 +54,12 @@ export default {
 }
 .classItem{
   flex: 0 1 auto;
-  width:110px ;
+  width:90px ;
   margin:10px 0px 10px 0;
   font-size:14px !important;
   cursor: pointer;
-  padding-left: 10px;
+  padding-right: 10px;
+  text-align: right;
   border-right: 1px solid #e3e5ea;
 }
 .flex-start{
@@ -68,4 +69,4 @@ export default {
   position: relative;
   width: 80px;
 }
-</style>
+</style>

+ 189 - 0
src/SDrpManagement/QuotedPrice/detail/modules/productInventory/addSelectionList.vue

@@ -0,0 +1,189 @@
+<template>
+  <div style="display: inline">
+    <el-button type="primary" size="small" @click="onShow()">
+      {{ $t("添加选型单") }}
+    </el-button>
+    <el-drawer
+      :visible.sync="drawer"
+      :title="$t('添加选型单')"
+      size="1300px"
+      append-to-body
+    >
+      <div class="drawer__panel">
+        <div class="flex-align-center flex-between">
+          <slot name="operation"></slot>
+          <div class="flex-align-center">
+            <el-input
+              size="small"
+              suffix-icon="el-icon-search"
+              v-model="params.content.where.condition"
+              :placeholder="$t(`搜索关键字`)"
+              @keyup.enter.native="getList((params.content.pageNumber = 1))"
+              @clear="getList((params.content.pageNumber = 1))"
+              clearable
+            ></el-input
+            >&nbsp;
+          </div>
+        </div>
+        <div class="produtMag-panel">
+          <div style="height: 5px"></div>
+          <tableTemp
+            ref="table"
+            :layout="tableLayout"
+            :tableName="tableName"
+            :custom="true"
+            :data="list"
+          >
+            <template v-slot:customcol="scope">
+              <el-popconfirm
+                v-if="scope.column.columnname == 'operation'"
+                :confirm-button-text="$t('确定')"
+                :cancel-button-text="$t('取消')"
+                :title="$t('确认加入单据吗?')"
+                @confirm="confirm(scope.column.data)"
+              >
+                <el-button slot="reference" type="text" size="mini">{{
+                  $t("选择")
+                }}</el-button>
+              </el-popconfirm>
+              <p v-else-if="scope.column.columnname == 'price'">
+                ¥{{
+                  scope.column.data[scope.column.columnname]
+                    ? scope.column.data[scope.column.columnname].toFixed(2)
+                    : "0.00"
+                }}
+              </p>
+              <p v-else>
+                {{ $t(scope.column.data[scope.column.columnname]) || "--" }}
+              </p>
+            </template>
+          </tableTemp>
+          <div style="margin-top: 16px; text-align: right">
+            <el-pagination
+              background
+              small
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="currentPage"
+              :page-size="params.content.pageSize"
+              layout="total, prev, pager, next, jumper"
+              :total="total"
+            >
+            </el-pagination>
+          </div>
+        </div>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+    
+<script>
+import tableTemp from "@/components/table";
+import { mapGetters } from "vuex";
+export default {
+  name: "AddSelectionList",
+  props: ["sourcetable", "showMessage"],
+  components: { tableTemp },
+  data() {
+    return {
+      drawer: false,
+      tableName: "addSelectionList",
+      tableLayout: [],
+      list: [],
+      currentPage: 1,
+      total: 0,
+      params: {
+        id: 2024102810021402,
+        content: {
+          pageNumber: 1,
+          pageSize: 20,
+          where: {
+            condition: "",
+          },
+        },
+      },
+    };
+  },
+  computed: {
+    ...mapGetters({
+      loading: "loading",
+    }),
+  },
+  methods: {
+    onShow(type) {
+      this.type = type;
+      this.drawer = true;
+      if (this.list.length == 0) this.getList();
+    },
+    getList() {
+      this.$api.requested(this.params).then((res) => {
+        console.log("选择可添加的选型单", res);
+        this.list = res.data;
+        this.total = res.total;
+      });
+    },
+    confirm(data) {
+      this.$api
+        .requested({
+          id: 2024102810420802,
+          content: {
+            sa_lectotypecfgid: data.sa_lectotypecfgid,
+            sourceid: this.$route.query.id,
+            sourcetable: this.sourcetable,
+            valvetype: "蝶阀",
+          },
+        })
+        .then((res) => {
+          console.log("添加选型单", res);
+          this.$emit("showMessage", res);
+          if (res.code !== 0) {
+            if (this.params.content.pageNumber == 1 || this.list.length > 1) {
+              this.getList();
+            } else {
+              this.params.content.pageNumber -= 1;
+              this.getList();
+            }
+          }
+        });
+    },
+    handleSizeChange(val) {
+      this.param.content.pageSize = val;
+      this.getList();
+    },
+    handleCurrentChange(val) {
+      this.param.content.pageNumber = val;
+      this.getList();
+    },
+  },
+  created() {
+    let apps = sessionStorage
+      .getItem("module_info")
+      .find((v) => v.systemname == "CRM")
+      .modules.find((v) => v.systemmodule == "project");
+    let module_list = apps.apps;
+    // 获取当前应用数据
+    let active_modules = module_list.filter((item) => {
+      return item.name === appname;
+    });
+    // 获取当前应用表格数据
+    let tablecols = active_modules[0].meta.tables;
+    this.tableLayout = this.tool.tabelCol("")[this.tableName].tablecols;
+  },
+
+  created() {
+    let apps = JSON.parse(sessionStorage.getItem("module_info"))
+      .find((v) => v.systemname == "CRM")
+      .modules.find((v) => v.systemmodule == "project")
+      .apps.find((v) => v.name == "quotedprice").meta.tables.addSelectionList;
+    console.log("apps", apps);
+    this.tableLayout = apps.tablecols;
+  },
+};
+</script>
+<style scoped>
+.table-box {
+  width: 99%;
+  margin: 5px auto 0;
+}
+</style>
+    

File diff suppressed because it is too large
+ 586 - 329
src/SDrpManagement/QuotedPrice/detail/modules/productInventory/index.vue


+ 57 - 20
src/SDrpManagement/QuotedPrice/modules/ProjectQuotationAdd.vue

@@ -380,12 +380,20 @@
           >{{ $t(`取 消`) }}</el-button
         >
         <el-button
-          size="small"
-          type="primary"
-          @click="getSubmit"
-          :loading="loading"
-          class="normal-btn-width"
-          >{{ $t(`确 定`) }}</el-button
+            size="small"
+            type="primary"
+            @click="getSubmit"
+            :loading="loading"
+            class="normal-btn-width"
+        >{{ $t(`保 存`) }}</el-button
+        >
+        <el-button
+            size="small"
+            @click="getSubmit('提交')"
+            :loading="loading"
+            type="warning"
+            class="normal-btn-width"
+        >{{ $t(`保存并提交`) }}</el-button
         >
       </div>
     </el-drawer>
@@ -618,7 +626,7 @@ export default {
       });
     },
     /*提交*/
-    getSubmit() {
+    getSubmit(val) {
       if (this.form.date.length === 0) {
         this.form.begdate = "";
         this.form.enddate = "";
@@ -643,21 +651,50 @@ export default {
         });
         if (res.code == 0) {
           this.loading = false;
+          this.tool.showMessage(res,()=>{})
         }
-        this.tool.showMessage(res, () => {
-          /*this.$store.commit('setLoading',false)*/
-          this.loading = false;
-          this.drawer = false;
-          this.$emit("addSuccess");
-          this.$store.dispatch("changeDetailDrawer", true);
-          this.$router.push({
-            path: "/quotedPriceDetail",
-            query: {
-              id: res.data.sa_quotedpriceid,
-              rowindex: res.data.rowindex,
-            },
+        if (val == '提交'){
+          const resSubmit = await this.$api.requested({
+            "id": 20221020165303,
+            "content": {
+              "sa_quotedpriceid":res.data.sa_quotedpriceid
+            }
+          })
+          if (resSubmit.code == 0) {
+            this.loading = false;
+            this.tool.showMessage(res,()=>{})
+          }else {
+            this.tool.showMessage(res, () => {
+              /*this.$store.commit('setLoading',false)*/
+              this.loading = false;
+              this.drawer = false;
+              this.$emit("addSuccess");
+              this.$store.dispatch("changeDetailDrawer", true);
+              this.$router.push({
+                path: "/quotedPriceDetail",
+                query: {
+                  id: res.data.sa_quotedpriceid,
+                  rowindex: res.data.rowindex,
+                },
+              });
+            });
+          }
+        }else {
+          this.tool.showMessage(res, () => {
+            /*this.$store.commit('setLoading',false)*/
+            this.loading = false;
+            this.drawer = false;
+            this.$emit("addSuccess");
+            this.$store.dispatch("changeDetailDrawer", true);
+            this.$router.push({
+              path: "/quotedPriceDetail",
+              query: {
+                id: res.data.sa_quotedpriceid,
+                rowindex: res.data.rowindex,
+              },
+            });
           });
-        });
+        }
       });
     },
     /*修改后的产品数据*/

BIN
src/assets/icons/bgScreen.jpg


+ 3 - 1
src/components/newLayout/index.vue

@@ -107,7 +107,9 @@ export default {
     }
   },
   mounted() {
-    if (JSON.parse(sessionStorage.getItem('active_password')) == '1' && JSON.parse(sessionStorage.getItem('password')) != '1'){
+
+    if (JSON.parse(sessionStorage.getItem('active_password')) == '1' && JSON.parse(sessionStorage.getItem('password')) != '1' && JSON.parse(sessionStorage.getItem('active_account')).usertype != 0 && JSON.parse(sessionStorage.getItem('active_account')).usertype != 1){
+      console.log('3333执行')
       this.dialogVisible = true
     }
     /*this.debouned()*/

+ 4 - 1
src/components/newLayout/modules/header.vue

@@ -39,7 +39,7 @@
       </el-dropdown-menu>
     </el-dropdown>-->
       <!--    <el-divider direction="vertical"></el-divider>-->
-
+<!--      <el-button size="mint" type="primary"  style="background-color:rgb(52 106 145);margin-right: 20px;color: #FFFFFF" v-if="usertype == 1 || usertype == 0" @click="$router.push('/serviceDataScreen')">{{$t(`业务数据大屏`)}}</el-button>-->
       <svg
         t="1725853431060"
         class="icon"
@@ -142,6 +142,7 @@ export default {
       langusge: [],
       nowType: "ZH",
       languagename: "",
+      usertype : JSON.parse(sessionStorage.getItem('active_account')).usertype
     };
   },
   computed: {
@@ -164,7 +165,9 @@ export default {
       sessionStorage.setItem("active_account", JSON.stringify(item));
       await this.basicData.query_userauth(()=>{
         setTimeout(() => {
+          console.log('33333')
         this.$router.go(0);
+
         },1000);
       })
       this.siteInfos();

+ 10 - 0
src/router/HManagement.js

@@ -694,6 +694,16 @@ const HManagement = [
     },
     component: () => import(/* webpackChunkName: "about" */ '@/HManagement/ecycle/index')
   }
+  ,{
+    path: '/serviceDataScreen',
+    name: 'serviceDataScreen',
+    meta: {
+      title: '业务数据大屏',
+      ast_nav: true,
+      keeproute: true
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/HManagement/serviceDataScreen/index')
+  }
 
 ]
 export default HManagement

+ 74 - 62
src/template/addProduct/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="small" type="primary" @click="onShow" >{{ $t(title) }}</el-button>
+    <el-button size="small" type="primary" @click="onShow" >{{$t(title)}}</el-button>
     <el-drawer
         :title="$t(`添加商品`)"
         :visible.sync="dialogFormVisible"
@@ -9,25 +9,8 @@
         :show-close="false"
         append-to-body
         @close="onClose">
-      <div class="drawer__panel">
+      <div class="drawer__panel" style="padding-bottom: 36px;">
         <div class="flex-between">
-          <el-select v-model="sa_brandid" :placeholder="$t(`选择品牌`)" size="small"  clearable class="inline-24" @change="brandChange" :disabled="querySa_brandid > 0">
-            <el-option
-                v-for="item in options.brands"
-                :key="item.sa_brandid"
-                :label="item.brandname"
-                :value="item.sa_brandid">
-            </el-option>
-          </el-select>
-          <el-cascader
-              :placeholder="$t(`选择分类`)" size="small"
-              v-model="itemclassid"
-              :options="options.itemclass"
-              :props="{ checkStrictly: true,children:'subdep',label:'itemclassname',value:'itemclassid' }"
-              clearable @change="classChange"></el-cascader>
-              <slot name="optionSystem"></slot>
-        </div>
-        <div class="top-margin">
           <uploadAllData
               class="inline-16"
               :total="total"
@@ -35,44 +18,27 @@
               @handleUploadApi="handleUploadApi"
               @onSuccess="onSuccess"
           ></uploadAllData>
-          <el-button :disabled="items.length === 0" :type="items.length > 0?'primary':''" size="small" class="inline-24 bottom-margin" @click="batchAdd">{{$t('添加选中商品')}}</el-button>
+          <el-button :disabled="items.length === 0" :type="items.length > 0?'primary':''" size="small" class="inline-24 bottom-margin" @click="batchAdd">{{$t(`添加选中商品`)}}</el-button>
           <el-input  style="width:200px;" :placeholder="$t(`商品名称/编码/品号`)" :suffix-icon="params.content.where.condition?params.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="params.content.where.condition" @keyup.native.enter="listData(params.content.pageNumber = 1)" @clear="listData(params.content.pageNumber = 1)" size="small" class="input-with-select inline-24 layout_search__panel bottom-margin" clearable>
           </el-input>
-          <el-select v-model="itemstandard" :placeholder="$t(`选择标准`)" size="small" clearable class="inline-24 bottom-margin" @change="queryChange">
-            <el-option
-                v-for="item in options.itemstandards"
-                :key="item.value"
-                :label="$t(item.value)"
-                :value="item.value">
-              <span style="float: left">{{ $t(item.value) }}</span>
-              <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?$t(item.remarks):$t('暂无描述') }}</span>
-            </el-option>
-          </el-select>
-          <el-select v-model="itemmaterial" :placeholder="$t(`选择材质`)" size="small" clearable class="inline-24 bottom-margin" @change="queryChange">
-            <el-option
-                v-for="item in options.itemmaterials"
-                :key="item.value"
-                :label="$t(item.value)"
-                :value="item.value">
-              <span style="float: left">{{ $t(item.value) }}</span>
-              <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?$t(item.remarks):$t('暂无描述') }}</span>
-            </el-option>
-          </el-select>
           <el-input  style="width:200px;" :placeholder="$t(`型号`)" :suffix-icon="params.content.where.model?params.content.where.model.length > 0?'':'':'el-icon-search'" v-model="params.content.where.model" @keyup.native.enter="listData(params.content.pageNumber = 1)" @clear="listData(params.content.pageNumber = 1)" size="small" class="bottom-margin input-with-select inline-24 layout_search__panel" clearable>
           </el-input>
           <el-input  style="width:200px;" :placeholder="$t(`规格`)" :suffix-icon="params.content.where.spec?params.content.where.spec.length > 0?'':'':'el-icon-search'" v-model="params.content.where.spec" @keyup.native.enter="listData(params.content.pageNumber = 1)" @clear="listData(params.content.pageNumber = 1)" size="small" class="bottom-margin input-with-select inline-24 layout_search__panel" clearable>
           </el-input>
+          <slot name="optionSystem"></slot>
         </div>
+        <selectClass ref="class" @clickAreaBase="clickAreaBase" @brandChange="brandChange" @onClassChange="onClassChange" @Search="Search" @clearSearch="clearSearch" @clickField="clickField" :default="true"></selectClass>
+        <div style="width: 100%;border-bottom: 1px solid #ebeef5;margin-bottom: 10px;"></div>
         <div >
           <tableTemp ref="tableTemp" :data="list" :layout="tablecolsAdd" :opwidth="200" :custom="true" height="calc(100vh - 370px)" @checkboxCallBack="checkboxCallBack" fixedName="operation">
             <template v-slot:customcol="scope">
               <p v-if="scope.column.columnname === 'cover'">
                 <previewImage v-if="scope.column.data.attinfos[0]" class="image" :image="scope.column.data.attinfos[0]" :list="scope.column.data.attinfos" :deletebtn="false"></previewImage>
               </p>
-              <p v-else>{{$t(scope.column.data[scope.column.columnname])}}</p>
+              <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
             </template>
             <template v-slot:opreation="scope">
-              <el-button type="text" size="mini" @click="addProduct(scope)">{{$t('添 加')}}</el-button>
+              <el-button type="text" size="mini" @click="addProduct(scope)">{{$t(`添 加`)}}</el-button>
             </template>
           </tableTemp>
           <div  class="container normal-panel" style="text-align:right">
@@ -97,10 +63,16 @@
 import tableTemp from './table'
 import uploadAllData from '@/components/uploadAllData/index'
 import previewImage from '@/components/previewImage/index'
+import selectClass from '@/SDrpManagement/ProductGroup/modules/Select2.vue'
 export default {
   name: "index",
   props:["data","tradefield","discountrate","params","title","tablecolsAdd","sa_projectid","querySa_brandid","typeName"],
-  components:{tableTemp,uploadAllData,previewImage},
+  components:{tableTemp,uploadAllData,previewImage,selectClass},
+  provide () {
+    return {
+      sys_enterpriseid:() => ''
+    }
+  },
   data(){
     return {
       dialogFormVisible:false,
@@ -122,15 +94,18 @@ export default {
   methods:{
     onShow(){
       this.dialogFormVisible = true
-      this.$store.dispatch('optiontypeselect','itemstandards').then(res=>{
-        this.options.itemstandards = res.data
-      })
-      this.$store.dispatch('optiontypeselect','itemmaterial').then(res=>{
-        this.options.itemmaterials = res.data
-      })
-      this.querySa_brandid !== '' ?this.sa_brandid = this.querySa_brandid : this.sa_brandid = ''
-      this.queryBrands()
-      this.queryClass()
+      // this.params = {
+      //   "id": 20221124093602,
+      //   "content": {
+      //     "sa_contractid": this.$route.query.id,
+      //     "pageNumber": 1,
+      //     "pageSize": 100,
+      //     "where": {
+      //       "condition": "",
+      //       "istool": 0
+      //     }
+      //   },
+      // }
       this.listData(this.params.content.pageNumber = 1)
     },
     /*可添加商品*/
@@ -157,6 +132,8 @@ export default {
       if (this.typeName === '居间'){
         this.params.id = 20221124093602
       }
+      console.log(this.params.id);
+
       this.params.content.where.tradefield = this.tradefield
       const res = await this.$api.requested(this.params)
       this.list = res.data
@@ -179,11 +156,6 @@ export default {
       this.sa_brandid = res.data[0].sa_brandid
       this.queryClass()
     },
-    brandChange(){
-      this.params.content.where.sa_brandid = this.sa_brandid
-      this.listData(this.params.content.pageNumber = 1)
-      this.queryClass()
-    },
     /*获取分类*/
     async queryClass () {
       const res = await this.$api.requested({
@@ -239,6 +211,34 @@ export default {
       this.options.itemclass = arr
       return arr
     },
+    brandChange(id){
+
+      this.params.content.where.sa_brandid = this.params.id == 20221021171802 || this.params.id == 20221020164903 || this.params.id == 20221124093602 ? id[0] : id
+      this.$refs.class.clickClass(false)
+      // this.listData(this.params.content.pageNumber = 1)
+    },
+    onClassChange (n) {
+      this.params.content.where.itemclassid = n.itemclassid
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    clickField (item) {
+      this.params.content.where.tradefield = item.tradefield
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    clickAreaBase (item) {
+      this.params.content.where.standards = item
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    Search(data) {
+      this.params.content.where.condition = data
+      this.params.content.pageNumber = 1
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    clearSearch() {
+      this.params.content.where.condition = ''
+      this.params.content.pageNumber = 1
+      this.listData(this.params.content.pageNumber = 1)
+    },
     classChange(){
       this.params.content.where.itemclassid = this.itemclassid[this.itemclassid.length -1]
       this.listData(this.params.content.pageNumber = 1)
@@ -279,10 +279,22 @@ export default {
     },
     onClose(){
       this.dialogFormVisible = false
-      this.sa_brandid = ''
-      this.itemclassid = ''
-      this.itemstandard = ''
-      this.itemmaterial = ''
+      this.$refs.class.value= "",
+      this.$refs.class.brands= []
+      this.$refs.class.ields= []
+      this.$refs.class.itemclass= []
+      this.$refs.class.activeClass= {}
+      this.$refs.class.field_act= ""
+      this.$refs.class.tradefield= ""
+      this.$refs.class.brand_act= 0
+      this.$refs.class.class_act= ""
+      this.$refs.class.areaBases= []
+      this.$refs.class.areaBase= ""
+      this.$refs.class.queryClass();
+      this.$refs.class.queryAgentiInfo();
+      this.$refs.class.queryBrands();
+      this.$refs.class.queryAreaBase();
+
       this.$emit("closeDrawer")
     },
     handleSizeChange(val) {
@@ -314,7 +326,7 @@ export default {
     margin-top: 20px;
   }
   .bottom-margin{
-    margin-bottom: 20px;
+    margin-bottom: 10px;
   }
  /deep/ input::-webkit-input-placeholder {
     color: #58585d;

+ 68 - 93
src/template/addProductContract/index.vue

@@ -153,39 +153,6 @@
           </el-popover>
         </div>
         <el-divider style="margin-top: -30px"></el-divider>
-        <div class="top-margin">
-          <el-select
-            v-model="sa_brandid"
-            :placeholder="$t(`选择品牌`)"
-            size="small"
-            clearable
-            class="inline-24"
-            @change="brandChange"
-            :disabled="querySa_brandid > 0"
-          >
-            <el-option
-              v-for="item in options.brands"
-              :key="item.sa_brandid"
-              :label="$t(item.brandname)"
-              :value="item.sa_brandid"
-            >
-            </el-option>
-          </el-select>
-          <el-cascader
-            :placeholder="$t(`选择分类`)"
-            size="small"
-            v-model="itemclassid"
-            :options="options.itemclass"
-            :props="{
-              checkStrictly: true,
-              children: 'subdep',
-              label: 'itemclassname',
-              value: 'itemclassid',
-            }"
-            clearable
-            @change="classChange"
-          ></el-cascader>
-        </div>
         <div class="top-margin">
           <uploadAllData
             class="inline-16"
@@ -220,46 +187,6 @@
             clearable
           >
           </el-input>
-          <el-select
-            v-model="itemstandard"
-            :placeholder="$t(`选择标准`)"
-            size="small"
-            clearable
-            class="inline-24 bottom-margin"
-            @change="queryChange"
-          >
-            <el-option
-              v-for="item in options.itemstandards"
-              :key="item.value"
-              :label="$t(item.value)"
-              :value="item.value"
-            >
-              <span style="float: left">{{ $t(item.value) }}</span>
-              <span style="float: right; color: #8492a6; font-size: 12px">{{
-                item.remarks ? $t(item.remarks) : $t("暂无描述")
-              }}</span>
-            </el-option>
-          </el-select>
-          <el-select
-            v-model="itemmaterial"
-            :placeholder="$t(`选择材质`)"
-            size="small"
-            clearable
-            class="inline-24 bottom-margin"
-            @change="queryChange"
-          >
-            <el-option
-              v-for="item in options.itemmaterials"
-              :key="item.value"
-              :label="$t(item.value)"
-              :value="item.value"
-            >
-              <span style="float: left">{{ $t(item.value) }}</span>
-              <span style="float: right; color: #8492a6; font-size: 12px">{{
-                item.remarks ? $t(item.remarks) : $t("暂无描述")
-              }}</span>
-            </el-option>
-          </el-select>
           <el-input
             style="width: 200px"
             :placeholder="$t(`型号`)"
@@ -297,6 +224,7 @@
           >
           </el-input>
         </div>
+        <selectClass ref="class" @clickAreaBase="clickAreaBase" @brandChange="brandChange" @onClassChange="onClassChange" @Search="Search" @clearSearch="clearSearch" @clickField="clickField" :default="true"></selectClass>
         <div>
           <tableTemp
             ref="tableTemp"
@@ -462,6 +390,7 @@
 import tableTemp from "./table";
 import uploadAllData from "@/components/uploadAllData/index";
 import previewImage from "@/components/previewImage/index";
+import selectClass from '@/SDrpManagement/ProductGroup/modules/Select2.vue'
 export default {
   name: "index",
   props: [
@@ -473,7 +402,12 @@ export default {
     "sa_projectid",
     "querySa_brandid",
   ],
-  components: { tableTemp, uploadAllData, previewImage },
+  components: { tableTemp, uploadAllData, previewImage , selectClass },
+  provide () {
+    return {
+      sys_enterpriseid:() => ''
+    }
+  },
   data() {
     return {
       billno: "",
@@ -523,18 +457,6 @@ export default {
   methods: {
     onShow() {
       this.dialogFormVisible = true;
-      this.$store.dispatch("optiontypeselect", "itemstandards").then((res) => {
-        this.options.itemstandards = res.data;
-      });
-      this.$store.dispatch("optiontypeselect", "itemmaterial").then((res) => {
-        this.options.itemmaterials = res.data;
-      });
-      this.querySa_brandid !== ""
-        ? (this.sa_brandid = this.querySa_brandid)
-        : (this.sa_brandid = "");
-      this.queryBrands();
-      this.queryClass();
-      /*this.listData()*/
     },
     /*获取报价单*/
     async queryQuotationData() {
@@ -577,8 +499,10 @@ export default {
     },
     brandChange() {
       this.params.content.where.sa_brandid = this.sa_brandid;
-      this.listData();
-      this.queryClass();
+      this.$refs.class.clickClass(false)
+      this.listData(this.params.content.pageNumber = 1)
+      // this.listData();
+      // this.queryClass();
     },
     /*获取分类*/
     async queryClass() {
@@ -677,10 +601,37 @@ export default {
     },
     onClose() {
       this.dialogFormVisible = false;
-      this.sa_brandid = "";
-      this.itemclassid = "";
-      this.itemstandard = "";
-      this.itemmaterial = "";
+      this.quotationParams.content.where.condition = ''
+      this.billno = ""
+      this.$refs.class.value= "",
+      this.$refs.class.brands= []
+      this.$refs.class.ields= []
+      this.$refs.class.itemclass= []
+      this.$refs.class.activeClass= {}
+      this.$refs.class.field_act= ""
+      this.$refs.class.tradefield= ""
+      this.$refs.class.brand_act= 0
+      this.$refs.class.class_act= ""
+      this.$refs.class.areaBases= []
+      this.$refs.class.areaBase= ""
+      this.$refs.class.queryClass();
+      this.$refs.class.queryAgentiInfo();
+      this.$refs.class.queryBrands();
+      this.$refs.class.queryAreaBase();
+      this.params = {
+        id: 20221123162902,
+        content: {
+          sa_contractid: this.$route.query.id,
+          sa_quotedpriceid: "",
+          pageNumber: 1,
+          pageSize: 100,
+          nocache: true,
+          where: {
+            condition: "",
+          },
+        },
+      }
+      this.listData(this.params.content.pageNumber = 1)
       this.$emit("closeDrawer");
     },
     handleSizeChange(val) {
@@ -703,8 +654,32 @@ export default {
       this.quotationParams.content.pageNumber = val;
       this.queryQuotationData();
     },
+    onClassChange (n) {
+      this.params.content.where.itemclassid = n.itemclassid
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    clickField (item) {
+      this.params.content.where.tradefield = item.tradefield
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    clickAreaBase (item) {
+      this.params.content.where.standards = item
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    Search(data) {
+      this.params.content.where.condition = data
+      this.params.content.pageNumber = 1
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    clearSearch() {
+      this.params.content.where.condition = ''
+      this.params.content.pageNumber = 1
+      this.listData(this.params.content.pageNumber = 1)
+    },
+  },
+  mounted() {
+
   },
-  mounted() {},
   created() {},
 };
 </script>

+ 37 - 1
src/template/addTool/index.vue

@@ -25,7 +25,10 @@
           </el-input>
           <el-input  style="width:200px;" :placeholder="$t(`规格`)" :suffix-icon="params.content.where.spec?params.content.where.spec.length > 0?'':'':'el-icon-search'" v-model="params.content.where.spec" @keyup.native.enter="listData(params.content.pageNumber = 1)" @clear="listData(params.content.pageNumber = 1)" size="small" class="bottom-margin input-with-select inline-24 layout_search__panel" clearable>
           </el-input>
+          <slot name="optionSystem"></slot>
         </div>
+        <selectClass ref="class" @clickAreaBase="clickAreaBase" @brandChange="brandChange" @onClassChange="onClassChange" @Search="Search" @clearSearch="clearSearch" @clickField="clickField" :default="true"></selectClass>
+        <div style="width: 100%;border-bottom: 1px solid #ebeef5;margin-bottom: 10px;"></div>
         <div >
           <tableTemp ref="table" :data="list" :layout="tablecolsAdd" :opwidth="200" :custom="true" height="calc(100vh - 370px)" @checkboxCallBack="checkboxCallBack" fixedName="operation">
             <template v-slot:customcol="scope">
@@ -60,10 +63,16 @@
 import tableTemp from './table'
 import uploadAllData from '@/components/uploadAllData/index'
 import previewImage from '@/components/previewImage/index'
+import selectClass from '@/SDrpManagement/ProductGroup/modules/Select2.vue'
 export default {
   name: "index",
   props:["data","tradefield","discountrate","params","title","tablecolsAdd","sa_projectid","querySa_brandid"],
-  components:{tableTemp,uploadAllData,previewImage},
+  components:{tableTemp,uploadAllData,previewImage,selectClass},
+  provide () {
+    return {
+      sys_enterpriseid:() => ''
+    }
+  },
   data(){
     return {
       dialogFormVisible:false,
@@ -94,6 +103,33 @@ export default {
       this.total = res.total
       this.$refs.table.$refs.table.doLayout()
     },
+    clickAreaBase (item) {
+      this.params.content.where.standards = item
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    brandChange(id){
+      this.params.content.where.sa_brandid = id[0]
+      this.$refs.class.clickClass(false)
+      // this.listData(this.params.content.pageNumber = 1)
+    },
+    Search(data) {
+      this.params.content.where.condition = data
+      this.params.content.pageNumber = 1
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    clearSearch() {
+      this.params.content.where.condition = ''
+      this.params.content.pageNumber = 1
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    clickField (item) {
+      this.params.content.where.tradefield = item.tradefield
+      this.listData(this.params.content.pageNumber = 1)
+    },
+    onClassChange (n) {
+      this.params.content.where.itemclassid = n.itemclassid
+      this.listData(this.params.content.pageNumber = 1)
+    },
     /*拉取数据*/
     handlePullApi (pullApi) {
       pullApi.content = JSON.parse(JSON.stringify(this.params.content))

+ 6 - 0
src/views/login/login.vue

@@ -317,6 +317,12 @@ export default {
           sessionStorage.setItem("active_password", res.remindchangepassword);
           this.basicData.query_userauth().then(() => {
             this.basicData.querySite_Parameter();
+            // let usertype = JSON.parse(sessionStorage.getItem('active_account')).usertype
+            // if (usertype == 1 || usertype == 0){
+            //   this.$router.push('/serviceDataScreen')
+            // }else {
+            //   this.$router.push({ path: "/main" });
+            // }
             this.$router.push({ path: "/main" });
             this.getAccountInfo();
           });

Some files were not shown because too many files changed in this diff