Browse Source

Merge branch 'purchaseDev' of http://172.16.100.139/new-business/drp-web into purchaseDev

002390 1 year ago
parent
commit
852860fcdf

+ 4 - 4
src/api/business/ehr/pm/performance.js

@@ -17,11 +17,11 @@ export function getPerformance(id) {
   })
 }
 
-// 保存绩效
-export function savePerformance(data) {
+// 复制绩效明细
+export function copyItem(data) {
   return request({
-    url: '/ehr/pm/performance/save',
-    method: 'put',
+    url: '/ehr/pm/performance/copyItem',
+    method: 'post',
     data: data
   })
 }

+ 23 - 20
src/views/WMS/historical-route/index.vue

@@ -195,7 +195,6 @@
                 path.push([latitudeLongitude[i].gpsLongitude, latitudeLongitude[i].gpsLatitude]);
               }
             }
-            console.log(latitudeLongitude, 'latitudeLongitude')
             //计算各值
             this.calculate(res.data);
             //对订单温湿度列表进行赋值
@@ -207,7 +206,6 @@
               probeSum[i] = latitudeLongitude[i].measuringPointAddr;
             }
             probe = Array.from(new Set(probeSum));
-            console.log(probe, 'probe');
             //车辆温度数组
             let c, d;
             this.initEcharts();
@@ -275,12 +273,8 @@
               }
               this.option.series.push(carForm);
               this.option.legend.data.push(carForm.name);
-              console.log(this.option.series, 'this.option.series');
             }
-            // console.log(path, 'path')
-            console.log(this.temperatureData, 'temperatureData')
             //筛选保温箱的数组
-            console.log(this.carMessage.boxCode, 'this.carMessage.boxCode')
             if (this.carMessage.boxCode != null) {
               let e, f;
               for (let i = 0; i < this.carMessage.boxCode.length; i++) {
@@ -348,7 +342,6 @@
                 this.option.series.push(boxForm);
                 this.option.legend.data.push(boxForm.name);
               }
-              console.log(this.option.series, 'this.option.series');
             }
             //如果车辆温度数组为空,则其它数组前移一位
             for (let i = 1;;) {
@@ -364,13 +357,12 @@
                 break;
               }
             }
-            console.log(this.option, 'this.option');
             this.windowSize();
             //对基础数据进行赋值
             this.basicData.billCode = this.carMessage.billCode;
             this.basicData.plateNumber = this.carMessage.plateNumber;
-            this.basicData.startTime = res.data[0].hisDate;
-            this.basicData.endTime = res.data[res.data.length - 1].hisDate;
+            this.basicData.startTime = this.xData[0];
+            this.basicData.endTime = this.xData[this.xData.length - 1];
             //基本地图加载
             this.loadMap(path);
           }
@@ -428,10 +420,11 @@
             }
           },
           grid: {
-            left: '3%',
-            right: '4%',
-            bottom: '5%',
-            containLabel: true
+            x: 22,
+            y: 30,
+            x2: 20,
+            y2: 18,
+            borderWidth: 1,
           },
           toolbox: {
             //保存图
@@ -454,6 +447,9 @@
             name: '温度',
             // Y轴最大值
             max: 10,
+            // Y轴最大值
+            min: -30,
+            splitNumber: 2,
             // 间隔值
             // interval: 3
           },
@@ -531,9 +527,19 @@
           this.aggT += array[i].temperature;
           this.aggH += array[i].humidity;
         }
-        //x轴时间去重
-        this.xData = Array.from(new Set(x));
-        // console.log(this.xData, 'this.xData')
+        //x数组去重
+        x = Array.from(new Set(x));
+        let xSort = [];
+        for (let i = 0; i < x.length; i++) {
+          xSort[i] = new Date(x[i]);
+        }
+        xSort.sort(function (a, b) {
+          return a - b;
+        })
+        for (let i = 0; i < xSort.length; i++) {
+          x[i] = this.formatDateTime(xSort[i], 'yyyy-MM-dd HH:mm:ss');
+        }
+        this.xData = x;
         //温湿度平均值
         this.avgT = this.aggT / array.length;
         this.avgH = this.aggH / array.length;
@@ -550,7 +556,6 @@
         this.modelData1[0].endTime = array[array.length - 1].hisDate;
         this.tableData1 = this.modelData1;
         let median = (array.length / 2).toFixed(0);
-        console.log(median, 'median');
         let table = []
         for (let i = 0; i < median; i++) {
           table[i] = {
@@ -564,7 +569,6 @@
             hisDate1: ''
           }
         }
-        console.log(table, 'table');
         if (array.length % 2 == 0) {
           for (let i = 0, j = 0, z = 1; i < median; i++, j = j + 2, z = z + 2) {
             table[i].measuringPointName = array[j].measuringPointName;
@@ -590,7 +594,6 @@
             }
           }
         }
-        console.log(table, 'table');
         this.tableData2 = table;
       },
       //获取当前时间

+ 14 - 6
src/views/business/ehr/pm/mark/index.vue

@@ -19,8 +19,8 @@
           <el-descriptions-item label="三级部门">{{form.threeDeptName}}</el-descriptions-item>
           <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
           <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
-          <el-descriptions-item label="评估人编号">{{form.startTime}}</el-descriptions-item>
-          <el-descriptions-item label="评估人姓名">{{form.deadlineTime}}</el-descriptions-item>
+          <el-descriptions-item label="评估人">{{form.evaluatorName}}</el-descriptions-item>
+          <el-descriptions-item label="所属分组">{{form.deadlineTime}}</el-descriptions-item>
         </el-descriptions>
         <el-descriptions v-if="form.status > 3">
           <el-descriptions-item label="个人总结">{{form.summary}}</el-descriptions-item>
@@ -28,9 +28,9 @@
         <div>
           评语<el-input type="textarea" v-model="form.comment"></el-input>
         </div>
-        <div style="float:right">
+        <!-- <div style="float:right">
           <el-button size="mini" @click="btnUnfold">{{isUnfold == true ? "收起" : "展开"}}</el-button>
-        </div>
+        </div> -->
         <el-table size="mini"  :data="form.performanceItem" show-summary :summary-method="getSummaries">
           <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估方面" align="center" prop="aspect">
             <template slot-scope="scope">
@@ -38,14 +38,22 @@
             </template>
           </el-table-column>
           <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估指标" align="center" prop="target" />
-          <el-table-column :show-overflow-tooltip="!isUnfold" label="评估说明" align="center" prop="instructions" />
+          <el-table-column :show-overflow-tooltip="!isUnfold" label="评估说明" align="center" prop="instructions">
+            <template slot-scope="scope">
+              <div style="white-space: pre-wrap;text-align: left">{{scope.row.instructions}}</div>
+            </template>
+          </el-table-column>
           <el-table-column width="100" label="角色" align="center" prop="role">
             <template slot-scope="scope">
               <dict-tag :options="dict.type.ehr_pm_role" :value="scope.row.role"/>
             </template>
           </el-table-column>
           <el-table-column width="80" label="权重" align="center" prop="weight"/>
-          <el-table-column :show-overflow-tooltip="!isUnfold" label="绩效标准" align="center" prop="standard" />
+          <el-table-column :show-overflow-tooltip="!isUnfold" label="绩效标准" align="center" prop="standard">
+            <template slot-scope="scope">
+              <div style="white-space: pre-wrap;text-align: left">{{scope.row.standard}}</div>
+            </template>
+          </el-table-column>
           <el-table-column width="100" label="数据来源" align="center" prop="source" />
           <el-table-column width="80" label="自评分" align="center" prop="selfScoring"/>
           <el-table-column :show-overflow-tooltip="!isUnfold" label="自评语" align="center" prop="selfComment"/>

+ 8 - 7
src/views/business/ehr/pm/performance/btnCopyItem.vue

@@ -44,6 +44,9 @@ export default {
         pageNum: 1,
         pageSize: 10,
         staff: null,
+        params:{
+          includeCurrentMonth: null,
+        },
       },
       // 总条数
       total: 0,
@@ -73,15 +76,13 @@ export default {
     },
     //复制
     async btnCopy(row){
-      let res = await getPerformance(row.id);
-      if(res.code === 200){
-        this.$emit('setItems',res.data.performanceItem);
-        this.$modal.msgSuccess("复制成功");
-        this.open = false;
-      }
+      this.$emit('setItems',row.id);
+      this.open = false;
     },
   },
-  created() {},
+  created() {
+    this.queryParams.params.includeCurrentMonth = "N";
+  },
 };
 </script>
 

+ 21 - 20
src/views/business/ehr/pm/performance/detail.vue

@@ -23,8 +23,8 @@
           <el-descriptions-item label="三级部门">{{form.threeDeptName}}</el-descriptions-item>
           <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
           <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
-          <el-descriptions-item label="评估人编号">{{form.startTime}}</el-descriptions-item>
-          <el-descriptions-item label="评估人姓名">{{form.deadlineTime}}</el-descriptions-item>
+          <el-descriptions-item label="评估人">{{form.evaluatorName}}</el-descriptions-item>
+          <el-descriptions-item label="所属分组">{{form.deadlineTime}}</el-descriptions-item>
         </el-descriptions>
         <el-descriptions v-if="form.status > 3">
           <el-descriptions-item label="个人总结">{{form.summary}}</el-descriptions-item>
@@ -37,7 +37,7 @@
         </el-descriptions>
         <div style="float:right">
           <el-button type="primary" size="mini" @click="btnAddRow" v-if="this.$store.state.user.name == form.staff && form.status == '0'">增加指标</el-button>
-          <el-button size="mini" @click="btnUnfold">{{isUnfold == true ? "收起" : "展开"}}</el-button>
+          <!-- <el-button size="mini" @click="btnUnfold">{{isUnfold == true ? "收起" : "展开"}}</el-button> -->
         </div>
         <el-table size="mini"  :data="form.performanceItem" show-summary :summary-method="getSummaries">
           <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估方面" align="center" prop="aspect">
@@ -56,7 +56,7 @@
               <dict-tag :options="dict.type.ehr_pm_role" :value="scope.row.role"/>
             </template>
           </el-table-column>
-          <el-table-column width="80" label="权重" align="center" prop="weight"/>
+          <el-table-column width="80" label="权重(%)" align="center" prop="weight"/>
           <el-table-column :show-overflow-tooltip="!isUnfold" label="绩效标准" align="center" prop="standard">
             <template slot-scope="scope">
               <div style="white-space: pre-wrap;text-align: left">{{scope.row.standard}}</div>
@@ -128,7 +128,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="加/减分项" prop="asItem">
-          <el-checkbox v-model="rowData.asItem"></el-checkbox>
+          <el-checkbox v-model="rowData.asItem" @change="handleCheckedChange"></el-checkbox>
         </el-form-item>
         <el-form-item label="权重(%)" prop="weight" v-if="!rowData.asItem">
           <el-input 
@@ -160,8 +160,8 @@
 <script>
 import ApproveLogDialog from './btnApproveLog.vue'
 import CopyItemDialog from './btnCopyItem.vue'
-import { getPerformance,fillinFinish,selfestimate} from "@/api/business/ehr/pm/performance";
-import { getPerformanceItem,addPerformanceItem,updatePerformanceItem,batchUpdatePerformanceItem,delPerformanceItem} from "@/api/business/ehr/pm/performanceitem";
+import { getPerformance,fillinFinish,selfestimate,copyItem} from "@/api/business/ehr/pm/performance";
+import { getPerformanceItem,addPerformanceItem,updatePerformanceItem,delPerformanceItem} from "@/api/business/ehr/pm/performanceitem";
 
 export default {
   name: 'detail',
@@ -368,19 +368,20 @@ export default {
       }
     },
     //设置明细
-    setItems(items){
-      console.log(111);
-      items.forEach((e) => {
-        e.id = null;
-        e.standard = null;
-        e.selfScoring = null;
-        e.selfComment = null;
-        e.leaderScoring = null;
-        e.leaderComment = null;
-        e.weightedScore = null;
-      });
-      this.form.performanceItem = items;
-      return true;
+    async setItems(cId){
+      let params = {
+        id : this.id,
+        cId : cId
+      }
+      let res = await copyItem(params);
+      if("200" == res.code){
+        this.$modal.msgSuccess("复制成功");
+        this.fetchPerformance(this.id);
+      }
+    },
+    //选择加减分项后
+    handleCheckedChange(value){
+      this.rowData.weight = value ? 0 : null;
     },
   }
 }

+ 10 - 5
src/views/business/ehr/pm/performance/index.vue

@@ -37,6 +37,8 @@
         </el-form-item>
       </el-form>
       <div style="float:right">
+        <!-- <el-button type="primary" size="mini" >待确认</el-button>
+        <el-button type="primary" size="mini" >待评分</el-button> -->
         <el-button type="primary" size="mini" @click="btnGradeAdjust" v-if="adjustCount > 0">等级调整({{adjustCount}})</el-button>
         <el-button type="primary" size="mini" @click="btnCurrentMonth">本月绩效</el-button>
         <el-button type="primary" size="mini" @click="btnNextMonth">下月绩效</el-button>
@@ -238,10 +240,14 @@ export default {
     //查看当月绩效
     async btnCurrentMonth(){
       let res = await getCurrentMonthId();
-      this.rowId = res.id;
-      this.page = 'add';
-      this.ids = [res.id];
-      this.isList = false;
+      if(!res.id){
+        this.$modal.msgSuccess("未查询到本月绩效!");
+      }else{
+        this.rowId = res.id;
+        this.page = 'add';
+        this.ids = [res.id];
+        this.isList = false;
+      }
     },
     //查看下月绩效
     async btnNextMonth(){
@@ -254,7 +260,6 @@ export default {
         this.ids = [res.id];
         this.isList = false;
       }
-      
     },
     //查询周期列表
     getlistStage() {

+ 40 - 10
src/views/business/ehr/pm/psnrelation/detail.vue

@@ -37,9 +37,9 @@
           </el-table-column>
           <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
             <template slot-scope="scope">
-              <el-button size="mini" type="text" @click="btnMoveUp(scope.row)">上移</el-button>
-              <el-button size="mini" type="text" @click="btnMoveDown(scope.row)">下移</el-button>
-              <el-button size="mini" type="text" @click="btnDelete(scope.row)">删行</el-button>
+              <el-button size="mini" type="text" @click="btnMoveUp(scope.row, scope.$index)">上移</el-button>
+              <el-button size="mini" type="text" @click="btnMoveDown(scope.row, scope.$index)">下移</el-button>
+              <el-button size="mini" type="text" @click="btnDelete(scope.$index, scope.row)">删行</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -72,6 +72,8 @@ export default {
       id:null,
       //表单
       form:{},
+      //删除的子表数据
+      delItems:[],
       //表单校验规则
       formRules:{
       },
@@ -111,19 +113,44 @@ export default {
     },
     //新增
     btnAddRow(){
-      this.form.psnrelationItem.push({delFlag: 0});
+      this.form.psnrelationItem.push({psnrelationId: this.id,delFlag: 0});
     },
     //上移
-    btnMoveUp(){
-
+    btnMoveUp(row, index){
+      if (index > 0) {
+        let upData = this.form.psnrelationItem[index - 1];
+        this.form.psnrelationItem.splice(index - 1, 1);
+        this.form.psnrelationItem.splice(index, 0, upData);
+      } else {
+        this.$message({
+            message: '已经是第一条,上移失败',
+            type: 'warning'
+        });
+      }
     },
     //下移
-    btnMoveDown(){
-
+    btnMoveDown(row, index){
+      if ((index + 1) == this.form.psnrelationItem.length) {
+        this.$message({
+            message: '已经是最后一条,下移失败',
+            type: 'warning'
+        });
+      } else {
+        let downData = this.form.psnrelationItem[index + 1];
+        this.form.psnrelationItem.splice(index + 1, 1);
+        this.form.psnrelationItem.splice(index, 0, downData);
+      }
     },
     //删除
-    btnDelete(){
-
+    btnDelete(index){
+      console.log('index',index);
+      this.form.psnrelationItem[index].delFlag = '2';
+      console.log('this.form.psnrelationItem',this.form.psnrelationItem);
+      if(this.form.psnrelationItem[index].id){
+        this.delItems.push(this.form.psnrelationItem[index]);
+      }
+      console.log('this.delItems',this.delItems);
+      this.form.psnrelationItem.splice(index, 1);
     },
     //修改
     btnEdit(){
@@ -140,8 +167,11 @@ export default {
     },
     //保存
     btnSave(){
+      this.form.psnrelationItem.push(...this.delItems);
+      this.form.psnrelationItem = this.form.psnrelationItem.filter(e => e.staff);
       savePsnrelation(this.form).then(response => {
         this.$modal.msgSuccess("保存成功");
+        this.fetchPsnrelation(this.id);
         this.pageState = "see";
       });
     },

+ 14 - 6
src/views/business/ehr/pm/verify/index.vue

@@ -19,12 +19,12 @@
           <el-descriptions-item label="三级部门">{{form.threeDeptName}}</el-descriptions-item>
           <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
           <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
-          <el-descriptions-item label="评估人编号">{{form.startTime}}</el-descriptions-item>
-          <el-descriptions-item label="评估人姓名">{{form.deadlineTime}}</el-descriptions-item>
+          <el-descriptions-item label="评估人">{{form.evaluatorName}}</el-descriptions-item>
+          <el-descriptions-item label="所属分组">{{form.deadlineTime}}</el-descriptions-item>
         </el-descriptions>
-        <div style="float:right">
+        <!-- <div style="float:right">
           <el-button size="mini" @click="btnUnfold">{{isUnfold == true ? "收起" : "展开"}}</el-button>
-        </div>
+        </div> -->
         <el-table size="mini"  :data="form.performanceItem" show-summary :summary-method="getSummaries">
           <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估方面" align="center" prop="aspect">
             <template slot-scope="scope">
@@ -32,14 +32,22 @@
             </template>
           </el-table-column>
           <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估指标" align="center" prop="target" />
-          <el-table-column :show-overflow-tooltip="!isUnfold" label="评估说明" align="center" prop="instructions" />
+          <el-table-column :show-overflow-tooltip="!isUnfold" label="评估说明" align="center" prop="instructions">
+            <template slot-scope="scope">
+              <div style="white-space: pre-wrap;text-align: left">{{scope.row.instructions}}</div>
+            </template>
+          </el-table-column>
           <el-table-column width="100" label="角色" align="center" prop="role">
             <template slot-scope="scope">
               <dict-tag :options="dict.type.ehr_pm_role" :value="scope.row.role"/>
             </template>
           </el-table-column>
           <el-table-column width="80" label="权重" align="center" prop="weight"/>
-          <el-table-column :show-overflow-tooltip="!isUnfold" label="绩效标准" align="center" prop="standard" />
+          <el-table-column :show-overflow-tooltip="!isUnfold" label="绩效标准" align="center" prop="standard">
+            <template slot-scope="scope">
+              <div style="white-space: pre-wrap;text-align: left">{{scope.row.standard}}</div>
+            </template>
+          </el-table-column>
           <el-table-column width="100" label="数据来源" align="center" prop="source" />
         </el-table>
       </div>

+ 13 - 185
src/views/business/spd/target/AnnualSaleGoal.vue

@@ -251,7 +251,7 @@
               <el-table max-height="560" show-summary :summary-method="getSummaries" v-loading="loading" size="mini"
                 :data="annualSaleGoalDetailsList" @selection-change="handleSelectionChange" v-horizontal-scroll>
                 <el-table-column label="序号" type="index" width="70" align="center" fixed />
-                <el-table-column label="销售组织" align="center" width="180"
+                <!-- <el-table-column label="销售组织" align="center" width="180"
                   :render-header="(h, obj) => addRedStar(h, obj, '0')">
                   <template slot-scope="scope">
                     <el-popover-select-v2 v-model="annualSaleGoalDetailsList[scope.$index].saleOrg" title="销售组织"
@@ -287,7 +287,7 @@
                       :source.sync="annualSaleGoalDetailsList[scope.$index]" placeholder="请输入负责人">
                     </el-popover-select-v2>
                   </template>
-                </el-table-column>
+                </el-table-column> -->
                 <el-table-column label="一级分类" align="center" width="180">
                   <template slot-scope="scope">
                     <el-input v-model="annualSaleGoalDetailsList[scope.$index].oneLevelClassify" placeholder="请输入一级分类"
@@ -426,185 +426,6 @@
                 </el-table-column>
               </el-table>
 
-              <!-- <ux-grid max-height="560" show-summary :summary-method="getSummaries" v-loading="loading"
-                :data="annualSaleGoalDetailsList" @selection-change="handleSelectionChange" v-horizontal-scroll>
-                <ux-table-column title="序号" type="index" width="70" align="center" fixed />
-                <ux-table-column title="销售组织" align="center" width="180"
-                  :render-header="(h, obj) => addRedStar(h, obj, '0')">
-                  <template slot-scope="scope">
-                    <el-popover-select-v2 v-model="annualSaleGoalDetailsList[scope.$index].saleOrg" title="销售组织"
-                      valueKey="name" referName="ORG_PARAM" :dataMapping="{ saleOrgCode: 'code', saleOrg: 'name'}"
-                      :source.sync="annualSaleGoalDetailsList[scope.$index]" placeholder="请输入销售组织">
-                    </el-popover-select-v2>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="销售区域" align="center" width="180"
-                  :render-header="(h, obj) => addRedStar(h, obj, '0')">
-                  <template slot-scope="scope">
-                    <el-popover-select-v2 v-model="annualSaleGoalDetailsList[scope.$index].saleZone" title="销售区域"
-                      valueKey="name" referName="MK_SALESAREA_PARAM"
-                      :dataMapping="{ saleZoneCode: 'code', saleZone: 'name'}"
-                      :source.sync="annualSaleGoalDetailsList[scope.$index]" placeholder="请输入销售区域">
-                    </el-popover-select-v2>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="客户" align="center" width="180"
-                  :render-header="(h, obj) => addRedStar(h, obj, '0')">
-                  <template slot-scope="scope">
-                    <el-popover-select-v2 v-model="annualSaleGoalDetailsList[scope.$index].custom" title="客户"
-                      valueKey="name" referName="CUSTOMER_PARAM" :dataMapping="{ customCode: 'code', custom: 'name'}"
-                      :source.sync="annualSaleGoalDetailsList[scope.$index]" placeholder="请输入客户">
-                    </el-popover-select-v2>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="负责人" align="center" width="180"
-                  :render-header="(h, obj) => addRedStar(h, obj, '0')">
-                  <template slot-scope="scope">
-                    <el-popover-select-v2 v-model="annualSaleGoalDetailsList[scope.$index].creator" title="负责人"
-                      valueKey="name" referName="CONTACTS_PARAM" :dataMapping="{ creatorCode: 'code', creator: 'name'}"
-                      :source.sync="annualSaleGoalDetailsList[scope.$index]" placeholder="请输入负责人">
-                    </el-popover-select-v2>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="一级分类" align="center" width="180">
-                  <template slot-scope="scope">
-                    <el-input v-model="annualSaleGoalDetailsList[scope.$index].oneLevelClassify" placeholder="请输入一级分类"
-                      disabled></el-input>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="二级分类" align="center" width="180">
-                  <template slot-scope="scope">
-                    <el-input v-model="annualSaleGoalDetailsList[scope.$index].twoLevelClassify" placeholder="请输入二级分类"
-                      disabled></el-input>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="物料" align="center" width="220">
-                  <template slot-scope="scope">
-                    <el-popover-select-v2 v-model="annualSaleGoalDetailsList[scope.$index].material" title="物料"
-                      valueKey="name" referName="MATERIAL_PARAM"
-                      @change="setClassify(scope.row.oneLevelClassify, scope.row.twoLevelClassify, annualSaleGoalDetailsList[scope.$index])"
-                      @clear=""
-                      :dataMapping="{ materialCode: 'code', material: 'name', oneLevelClassify: 'oneClass', twoLevelClassify: 'twoClass'}"
-                      :source.sync="annualSaleGoalDetailsList[scope.$index]" placeholder="请输入物料">
-                    </el-popover-select-v2>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="合计(元)" align="center" field="totalGoal" width="180">
-                  <template slot-scope="scope">
-                    <el-input v-model="annualSaleGoalDetailsList[scope.$index].totalGoal" disabled></el-input>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="一月(元)" align="center" field="januaryGoal" width="220">
-                  <template slot-scope="scope">
-                    <el-input-number
-                      @change="computeTotalDetails(scope.$index, annualSaleGoalDetailsList[scope.$index])"
-                      v-model="annualSaleGoalDetailsList[scope.$index].januaryGoal" :precision="2" :step="0.1" :min="0">
-                    </el-input-number>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="二月(元)" align="center" field="februaryGoal" width="220">
-                  <template slot-scope="scope">
-                    <el-input-number
-                      @change="computeTotalDetails(scope.$index, annualSaleGoalDetailsList[scope.$index])"
-                      v-model="annualSaleGoalDetailsList[scope.$index].februaryGoal" :precision="2" :step="0.1"
-                      :min="0">
-                    </el-input-number>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="三月(元)" align="center" field="marchGoal" width="220">
-                  <template slot-scope="scope">
-                    <el-input-number
-                      @change="computeTotalDetails(scope.$index, annualSaleGoalDetailsList[scope.$index])"
-                      v-model="annualSaleGoalDetailsList[scope.$index].marchGoal" :precision="2" :step="0.1" :min="0">
-                    </el-input-number>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="四月(元)" align="center" field="aprilGoal" width="220">
-                  <template slot-scope="scope">
-                    <el-input-number
-                      @change="computeTotalDetails(scope.$index, annualSaleGoalDetailsList[scope.$index])"
-                      v-model="annualSaleGoalDetailsList[scope.$index].aprilGoal" :precision="2" :step="0.1" :min="0">
-                    </el-input-number>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="五月(元)" align="center" field="mayGoal" width="220">
-                  <template slot-scope="scope">
-                    <el-input-number
-                      @change="computeTotalDetails(scope.$index, annualSaleGoalDetailsList[scope.$index])"
-                      v-model="annualSaleGoalDetailsList[scope.$index].mayGoal" :precision="2" :step="0.1" :min="0">
-                    </el-input-number>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="六月(元)" align="center" field="juneGoal" width="220">
-                  <template slot-scope="scope">
-                    <el-input-number
-                      @change="computeTotalDetails(scope.$index, annualSaleGoalDetailsList[scope.$index])"
-                      v-model="annualSaleGoalDetailsList[scope.$index].juneGoal" :precision="2" :step="0.1" :min="0">
-                    </el-input-number>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="七月(元)" align="center" field="julyGoal" width="220">
-                  <template slot-scope="scope">
-                    <el-input-number
-                      @change="computeTotalDetails(scope.$index, annualSaleGoalDetailsList[scope.$index])"
-                      v-model="annualSaleGoalDetailsList[scope.$index].julyGoal" :precision="2" :step="0.1" :min="0">
-                    </el-input-number>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="八月(元)" align="center" field="augustGoal" width="220">
-                  <template slot-scope="scope">
-                    <el-input-number
-                      @change="computeTotalDetails(scope.$index, annualSaleGoalDetailsList[scope.$index])"
-                      v-model="annualSaleGoalDetailsList[scope.$index].augustGoal" :precision="2" :step="0.1" :min="0">
-                    </el-input-number>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="九月(元)" align="center" field="septemberGoal" width="220">
-                  <template slot-scope="scope">
-                    <el-input-number
-                      @change="computeTotalDetails(scope.$index, annualSaleGoalDetailsList[scope.$index])"
-                      v-model="annualSaleGoalDetailsList[scope.$index].septemberGoal" :precision="2" :step="0.1"
-                      :min="0">
-                    </el-input-number>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="十月(元)" align="center" field="octoberGoal" width="220">
-                  <template slot-scope="scope">
-                    <el-input-number
-                      @change="computeTotalDetails(scope.$index, annualSaleGoalDetailsList[scope.$index])"
-                      v-model="annualSaleGoalDetailsList[scope.$index].octoberGoal" :precision="2" :step="0.1" :min="0">
-                    </el-input-number>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="十一月(元)" align="center" field="novemberGoal" width="220">
-                  <template slot-scope="scope">
-                    <el-input-number
-                      @change="computeTotalDetails(scope.$index, annualSaleGoalDetailsList[scope.$index])"
-                      v-model="annualSaleGoalDetailsList[scope.$index].novemberGoal" :precision="2" :step="0.1"
-                      :min="0">
-                    </el-input-number>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="十二月(元)" align="center" field="decemberGoal" width="220">
-                  <template slot-scope="scope">
-                    <el-input-number
-                      @change="computeTotalDetails(scope.$index, annualSaleGoalDetailsList[scope.$index])"
-                      v-model="annualSaleGoalDetailsList[scope.$index].decemberGoal" :precision="2" :step="0.1"
-                      :min="0">
-                    </el-input-number>
-                  </template>
-                </ux-table-column>
-                <ux-table-column title="操作" align="center" class-name="small-padding fixed-width" width="120px"
-                  fixed="right">
-                  <template slot-scope="scope">
-                    <el-button size="mini" type="text" icon="el-icon-delete"
-                      @click="handleDeleteDetails(scope.$index, scope.row)">删除</el-button>
-                    <el-button size="mini" type="text" icon="el-icon-delete" @click="handleCopyDetails(scope.row)">复制
-                    </el-button>
-                  </template>
-                </ux-table-column>
-              </ux-grid> -->
-
             </el-tab-pane>
           </el-tabs>
           <div slot="footer" class="dialog-footer" style="margin-left: 88%; margin-top: 1%">
@@ -1063,15 +884,22 @@
       },
       /** 提交按钮 */
       submitForm() {
+        // 明细行赋值
+        for (let i = 0; i < this.annualSaleGoalDetailsList.length; i++) {
+          this.annualSaleGoalDetailsList[i].saleOrg = this.$store.state.user.orgName;
+          this.annualSaleGoalDetailsList[i].saleZone = this.form.saleZone;
+          this.annualSaleGoalDetailsList[i].custom = this.form.custom;
+          this.annualSaleGoalDetailsList[i].creator = this.form.creator;
+        }
         if (this.justiceDetailsList()) {
           return this.$message.error('子表有必填字段未填,或者目标值为0')
         }
         for (let i = 0; i < this.annualSaleGoalDetailsList.length; i++) {
           for (let j = i + 1; j < this.annualSaleGoalDetailsList.length; j++) {
             if (this.annualSaleGoalDetailsList[i].materialCode == this.annualSaleGoalDetailsList[j].materialCode &&
-              this.annualSaleGoalDetailsList[i].materialCode != null && 
-              this.annualSaleGoalDetailsList[j].materialCode != null && 
-              this.annualSaleGoalDetailsList[i].materialCode != "" && 
+              this.annualSaleGoalDetailsList[i].materialCode != null &&
+              this.annualSaleGoalDetailsList[j].materialCode != null &&
+              this.annualSaleGoalDetailsList[i].materialCode != "" &&
               this.annualSaleGoalDetailsList[j].materialCode != "") {
               return this.$message.error('子表存在重复物料');
             }
@@ -1337,7 +1165,7 @@
           console.error(err);
           this.$modal.closeLoading();
         }
-      },      
+      },
       //收回
       handleReback(row) {
         this.$modal.loading("收回中...");

+ 16 - 9
src/views/business/spd/target/MonthSaleGoal.vue

@@ -261,7 +261,7 @@
               <el-table max-height="560" show-summary :summary-method="getSummaries" v-loading="loading" size="mini"
                 :data="monthSaleGoalDetailsList" @selection-change="handleSelectionChange" v-horizontal-scroll>
                 <el-table-column label="序号" type="index" width="70" align="center" fixed />
-                <el-table-column label="销售组织" align="center" width="180" :render-header="addRedStar">
+                <!-- <el-table-column label="销售组织" align="center" width="180" :render-header="addRedStar">
                   <template slot-scope="scope">
                     <el-popover-select-v2 v-model="monthSaleGoalDetailsList[scope.$index].saleOrg" title="销售组织"
                       valueKey="name" referName="ORG_PARAM" :dataMapping="{ saleOrgCode: 'code', saleOrg: 'name'}"
@@ -301,7 +301,7 @@
                       :source.sync="monthSaleGoalDetailsList[scope.$index]" placeholder="请输入制单人">
                     </el-popover-select-v2>
                   </template>
-                </el-table-column>
+                </el-table-column> -->
                 <el-table-column label="一级分类" align="center" width="180" :render-header="addRedStar">
                   <template slot-scope="scope">
                     <el-input v-model="monthSaleGoalDetailsList[scope.$index].oneLevelClassify" placeholder="请输入一级分类"
@@ -862,6 +862,13 @@
       },
       /** 提交按钮 */
       submitForm() {
+        for (let i = 0; i < this.monthSaleGoalDetailsList.length; i++) {
+          this.monthSaleGoalDetailsList[i].saleOrg = this.$store.state.user.orgName;
+          this.monthSaleGoalDetailsList[i].saleZone = this.form.saleZone;
+          this.monthSaleGoalDetailsList[i].custom = this.form.custom;
+          this.monthSaleGoalDetailsList[i].dept = this.form.dept;
+          this.monthSaleGoalDetailsList[i].creator = this.form.creator;
+        }
         if (this.justiceDetailsList()) {
           return this.$message.error('子表有必填字段未填,或者目标值为0')
         }
@@ -1205,13 +1212,13 @@
           console.log(res, 'res')
           this.monthSaleGoalDetailsList = res;
           for (const item of this.monthSaleGoalDetailsList) {
-            item.saleOrg = this.$store.state.user.orgName,
-            item.saleZone = this.form.saleZone,
-            item.custom = this.form.custom,
-            item.dept = this.form.dept,
-            item.creator = this.form.creator
-            item.monthly = new Date().getFullYear().toString() + '-' + (new Date().getMonth() + 1).toString().padStart(2,
-            '0')
+            item.saleOrg = this.$store.state.user.orgName;
+            item.saleZone = this.form.saleZone;
+            item.custom = this.form.custom;
+            item.dept = this.form.dept;
+            item.creator = this.form.creator;
+            item.monthly = new Date().getFullYear().toString() + '-' + (new Date().getMonth() + 1).toString()
+              .padStart(2, '0');
           }
         }).catch((e) => {
           this.$message.error(e.message)

+ 13 - 25
src/views/ehrentrance.vue

@@ -4,7 +4,7 @@
 </template>
 
 <script>
-import { setToken,getToken } from '@/utils/auth'
+import { setToken } from '@/utils/auth'
 import { ehrLogin } from '@/api/sso/ssoLogin';
 export default {
   data () {
@@ -20,31 +20,19 @@ export default {
   },
   methods: {
     jump() {
-      var code = this.GetQueryString('code')
-      var jumpPath = this.GetQueryString('path')
-      let str = jumpPath + window.location.search;
-      if(getToken()){
-        this.$router.push({ path: str});
-      }else{
-        ehrLogin(code).then(res => {
-          if (res.code === 200) {
-            let token = res.token
-            setToken(token);
-            this.$store.commit('SET_TOKEN', token)
-            this.$store.dispatch("GetInfo").then(() => {})
-            console.log("str", str)
-            this.$store.dispatch("GenerateRoutes").then(
-              this.$router.push({ path: str}).catch(()=>{})
-            )
-          }
-        })
-      }
+      let query = this.$route.query;
+      let str = query.path + window.location.search;
+      ehrLogin(query.code).then(res => {
+        if (res.code === 200) {
+          let token = res.token;
+          setToken(token);
+          this.$store.commit('SET_TOKEN', token)
+          this.$store.dispatch("GetInfo").then(
+            this.$router.push({ path: str})
+          )
+        }
+      })
     },
-    GetQueryString(name) {
-      var  reg = new  RegExp( "(^|&)" + name + "=([^&]*)(&|$)" );
-      var  r = window.location.search.substr(1).match(reg);
-      if (r!= null ) return   unescape(r[2]); return  null ;
-    }
   }
 }
 </script>

+ 2 - 2
src/views/material/classify/index.vue

@@ -3,7 +3,7 @@
 
     <el-card v-loading="loading">
 
-      <el-row :gutter="10" class="mb10">
+      <el-row :gutter="10" class="mb10" style="position: fixed;top: 20px; right: 50px;z-index: 999;">
         <div>
           <el-button type="primary" size="mini" @click="mbDownload">模板下载</el-button>
           <el-button type="primary" size="mini" @click="importMb">导入</el-button>
@@ -40,7 +40,7 @@
           </el-tree>
         </el-col>
 
-        <el-col :span="18">
+        <el-col :span="16" style="position: fixed;top: 40px; right: 40px;z-index: 999;">
           <span class="title">基本信息</span>
           <el-form
             :model="ruleForm"

+ 27 - 6
src/views/purchase/PurchaseDemandList/add.vue

@@ -6,7 +6,7 @@
       <el-row :gutter="10">
         <el-col :span="1.5">
           <el-form-item label="业务类型" prop="billType" :rules="{ required: true, message: '请选择业务类型', trigger: 'blur' }">
-            <el-select clearable v-model="basicForm.billType" @change="changeBillType" :disabled="sonDisable" size="mini" style="width: 200px">
+            <el-select clearable v-model="basicForm.billType" @change="changeBillType(basicForm.billType)" :disabled="sonDisable" size="mini" style="width: 200px">
               <el-option v-for=" dict in dict.type.sys_business" :key="dict.value" :label="dict.label" :value="dict.value">
               </el-option>
             </el-select>
@@ -44,7 +44,7 @@
 
         <el-col :span="1.5">
           <el-form-item label="需求计划" prop="planType" :rules="{ required: true, message: '请选择需求计划', trigger: 'blur' }">
-            <el-select :disabled="sonDisable" v-model="basicForm.planType" size="mini" style="width: 200px" @change="changeplanType()">
+            <el-select :disabled="sonDisable" v-model="basicForm.planType" size="mini" style="width: 200px" @change="changeplanType(basicForm.planType)">
               <el-option v-for="dict in dict.type.sys_plan_type" :key="dict.value" :label="dict.label" :value="dict.value">
               </el-option>
             </el-select>
@@ -837,8 +837,21 @@ export default {
       }
     },
     // 改变需求计划改变需求日期
-    changeplanType() {
+    changeplanType(val) {
       this.dafaultDate()
+      console.log(val)
+      if (val == 'JJXQ') {
+        this.basicForm.billType = 'JJXQ'
+      } else {
+        if (this.basicForm.billType == 'JJXQ') {
+          this.basicForm.billType = ''
+        }
+      }
+      if (val == 'JJXQ' && this.basicForm.puDemandItemList.length != 0) {
+        this.basicForm.puDemandItemList.forEach(item => {item.isUrgency = 'Y'})
+      } else {
+        this.basicForm.puDemandItemList.forEach(item => {item.isUrgency = 'N'})
+      }
     },
     // 无限滚动加载配置
     load() {
@@ -858,8 +871,9 @@ export default {
       })
     },
     // 更改业务类型调整明细行内补单或紧急标识
-    changeBillType() {
-      if (this.basicForm.billType == 'BDXQ' && this.basicForm.puDemandItemList.length != 0) {
+    changeBillType(val) {
+      console.log(val)
+      if (val == 'BDXQ' && this.basicForm.puDemandItemList.length != 0) {
         this.isBDXQ = true
         this.BDZT = false
         this.basicForm.puDemandItemList.forEach(item => {item.isReplenishment = 'Y'})
@@ -872,7 +886,14 @@ export default {
           item.additionalSupplierName = null
         })
       }
-      if (this.basicForm.billType == 'JJXQ' && this.basicForm.puDemandItemList.length != 0) {
+      if (val == 'JJXQ') {
+        this.basicForm.planType = 'JJXQ'
+      } else {
+        if (this.basicForm.planType == 'JJXQ') {
+          this.basicForm.planType = ''
+        }
+      }
+      if (val == 'JJXQ' && this.basicForm.puDemandItemList.length != 0) {
         this.basicForm.puDemandItemList.forEach(item => {item.isUrgency = 'Y'})
       } else {
         this.basicForm.puDemandItemList.forEach(item => { item.isUrgency = 'N' })

+ 87 - 87
src/views/purchase/apply/add/columns.js

@@ -115,6 +115,13 @@ export default function useColumns() {
       },
       TableColumns: [
         {
+          item: { key: "materialCode", title: "物料编码", required: true },
+          attr: {
+            is: "el-input",
+            clearable: true,
+          },
+        },
+        {
           item: { key: "materialName", title: "物料名称", required: true },
           attr: {
             is: "el-popover-select-v2",
@@ -136,18 +143,11 @@ export default function useColumns() {
             },
           },
         },
-        {
-          item: { key: "materialCode", title: "物料编码", required: true },
-          attr: {
-            is: "el-input",
-            clearable: true,
-          }, 
-        },
-        { item: { key: "manufacturerName", title: "生产厂家" }, attr: {} },
         { item: { key: "specification", title: "规格" }, attr: {} },
         { item: { key: "model", title: "型号" }, attr: {} },
+        { item: { key: "manufacturerName", title: "生产厂家" }, attr: {} },
         {
-          item: { key: "unitName", title: "单位", hidden: false },
+          item: { key: "unitName", title: "单位" },
           attr: {
             is: "el-popover-select-v2",
             valueKey: "name",
@@ -155,27 +155,37 @@ export default function useColumns() {
             dataMapping: { unit: "id", unitCode: "code", unitName: "name" },
           },
         },
+        // {
+        //   item: { key: "puUnitName", title: "采购单位", hidden: false },
+        //   attr: {
+        //     is: "el-popover-select-v2",
+        //     valueKey: "name",
+        //     referName: "UNIT_PARAM",
+        //     dataMapping: {
+        //       puUnit: "id",
+        //       puUnitCode: "code",
+        //       puUnitName: "name",
+        //     },
+        //   },
+        // },
         {
-          item: { key: "puUnitName", title: "采购单位", hidden: false },
+          item: { key: "customerName", title: "客户" },
           attr: {
             is: "el-popover-select-v2",
             valueKey: "name",
-            referName: "UNIT_PARAM",
+            referName: "CUSTOMER_PARAM",
             dataMapping: {
-              puUnit: "id",
-              puUnitCode: "code",
-              puUnitName: "name",
+              customer: "id",
+              customerCode: "code",
+              customerName: "name",
             },
           },
         },
         {
-          item: { key: "conversionRate", title: "采购换算率", required: true },
+          item: { key: "taxPrice", title: "含税单价", required: true },
           attr: {
             is: "el-input-number",
-            min: 0,
-            precision: CONFIG.precision,
-            value: 1,
-            disabled: true,
+            min: 0.00000001,
           },
         },
         {
@@ -189,13 +199,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "taxPrice", title: "含税单价", required: true },
-          attr: {
-            is: "el-input-number",
-            min: 0.00000001,
-          },
-        },
-        {
           item: { key: "price", title: "无税单价", required: true },
           attr: {
             formatter: (prop) => {
@@ -204,19 +207,19 @@ export default function useColumns() {
             },
           },
         },
-        {
-          item: { key: "currencyName", title: "币种" },
-          attr: {
-            is: "el-popover-select-v2",
-            valueKey: "name",
-            referName: "CURRENCY_PARAM",
-            dataMapping: {
-              currency: "id",
-              currencyCode: "code",
-              currencyName: "name",
-            },
-          },
-        },
+        // {
+        //   item: { key: "currencyName", title: "币种" },
+        //   attr: {
+        //     is: "el-popover-select-v2",
+        //     valueKey: "name",
+        //     referName: "CURRENCY_PARAM",
+        //     dataMapping: {
+        //       currency: "id",
+        //       currencyCode: "code",
+        //       currencyName: "name",
+        //     },
+        //   },
+        // },
         {
           item: {
             key: "periodBegin",
@@ -243,19 +246,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "customerName", title: "客户" },
-          attr: {
-            is: "el-popover-select-v2",
-            valueKey: "name",
-            referName: "CUSTOMER_PARAM",
-            dataMapping: {
-              customer: "id",
-              customerCode: "code",
-              customerName: "name",
-            },
-          },
-        },
-        {
           item: { key: "recentlyPrice", title: "最近价格" },
           attr: {
             is: "el-input-number",
@@ -295,39 +285,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "priceType", title: "价格类型", required: true },
-          attr: {
-            is: "el-select",
-            dictName: "sys_price_type",
-            value: "order",
-          },
-        },
-        {
-          item: { key: "isDistributionPrice", title: "配送价", required: true },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-
-        {
-          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-        {
-          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-        {
           item: { width: 100, key: "priceDiffer", title: "单价差" },
           attr: {
             formatter: (prop) => {
@@ -375,8 +332,40 @@ export default function useColumns() {
             },
           },
         },
+        {
+          item: { key: "priceType", title: "价格类型", required: true },
+          attr: {
+            is: "el-select",
+            dictName: "sys_price_type",
+            value: "order",
+          },
+        },
+        {
+          item: { key: "isDistributionPrice", title: "配送价", required: true },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
 
         {
+          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
+        {
+          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
+        {
           item: { width: 150, key: "supplierName", title: "供应商名称1" },
           attr: { is: "el-input" },
         },
@@ -462,8 +451,8 @@ export default function useColumns() {
             precision: CONFIG.precision,
           },
         },
-        { item: { key: "createByName", title: "创建人名称" }, attr: {} },
-        { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
+        // { item: { key: "createByName", title: "创建人名称" }, attr: {} },
+        // { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
         {
           item: { key: "isPriceAdjustment", title: "", width: 10 },
           attr: {
@@ -474,6 +463,17 @@ export default function useColumns() {
             },
           },
         },
+        // 采购换算率隐藏
+        {
+          item: { key: "conversionRate", title: "", required: true, width: 5 },
+          attr: {
+            is: "el-input-number",
+            min: 0,
+            precision: CONFIG.precision,
+            value: 1,
+            disabled: true,
+          },
+        },
       ],
     },
   ];

+ 1 - 0
src/views/purchase/apply/add/index.vue

@@ -530,6 +530,7 @@
         >
           <div v-loading="loading" style="height: 250px; display: flex">
             <el-super-ux-table
+              index
               v-model="params[item.key]"
               :dict="dict"
               :ref="tabName"

+ 87 - 87
src/views/purchase/apply/copy/columns.js

@@ -115,6 +115,13 @@ export default function useColumns() {
       },
       TableColumns: [
         {
+          item: { key: "materialCode", title: "物料编码", required: true },
+          attr: {
+            is: "el-input",
+            clearable: true,
+          },
+        },
+        {
           item: { key: "materialName", title: "物料名称", required: true },
           attr: {
             is: "el-popover-select-v2",
@@ -136,18 +143,11 @@ export default function useColumns() {
             },
           },
         },
-        {
-          item: { key: "materialCode", title: "物料编码", required: true },
-          attr: {
-            is: "el-input",
-            clearable: true,
-          },
-        },
-        { item: { key: "manufacturerName", title: "生产厂家" }, attr: {} },
         { item: { key: "specification", title: "规格" }, attr: {} },
         { item: { key: "model", title: "型号" }, attr: {} },
+        { item: { key: "manufacturerName", title: "生产厂家" }, attr: {} },
         {
-          item: { key: "unitName", title: "单位", hidden: false },
+          item: { key: "unitName", title: "单位"},
           attr: {
             is: "el-popover-select-v2",
             valueKey: "name",
@@ -155,27 +155,37 @@ export default function useColumns() {
             dataMapping: { unit: "id", unitCode: "code", unitName: "name" },
           },
         },
+        // {
+        //   item: { key: "puUnitName", title: "采购单位", hidden: false },
+        //   attr: {
+        //     is: "el-popover-select-v2",
+        //     valueKey: "name",
+        //     referName: "UNIT_PARAM",
+        //     dataMapping: {
+        //       puUnit: "id",
+        //       puUnitCode: "code",
+        //       puUnitName: "name",
+        //     },
+        //   },
+        // },
         {
-          item: { key: "puUnitName", title: "采购单位", hidden: false },
+          item: { key: "customerName", title: "客户" },
           attr: {
             is: "el-popover-select-v2",
             valueKey: "name",
-            referName: "UNIT_PARAM",
+            referName: "CUSTOMER_PARAM",
             dataMapping: {
-              puUnit: "id",
-              puUnitCode: "code",
-              puUnitName: "name",
+              customer: "id",
+              customerCode: "code",
+              customerName: "name",
             },
           },
         },
         {
-          item: { key: "conversionRate", title: "采购换算率", required: true },
+          item: { key: "taxPrice", title: "含税单价", required: true },
           attr: {
             is: "el-input-number",
-            min: 0,
-            precision: CONFIG.precision,
-            value: 1,
-            disabled: true,
+            min: 0.00000001,
           },
         },
         {
@@ -189,13 +199,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "taxPrice", title: "含税单价", required: true },
-          attr: {
-            is: "el-input-number",
-            min: 0.00000001,
-          },
-        },
-        {
           item: { key: "price", title: "无税单价", required: true },
           attr: {
             formatter: (prop) => {
@@ -204,19 +207,19 @@ export default function useColumns() {
             },
           },
         },
-        {
-          item: { key: "currencyName", title: "币种" },
-          attr: {
-            is: "el-popover-select-v2",
-            valueKey: "name",
-            referName: "CURRENCY_PARAM",
-            dataMapping: {
-              currency: "id",
-              currencyCode: "code",
-              currencyName: "name",
-            },
-          },
-        },
+        // {
+        //   item: { key: "currencyName", title: "币种" },
+        //   attr: {
+        //     is: "el-popover-select-v2",
+        //     valueKey: "name",
+        //     referName: "CURRENCY_PARAM",
+        //     dataMapping: {
+        //       currency: "id",
+        //       currencyCode: "code",
+        //       currencyName: "name",
+        //     },
+        //   },
+        // },
         {
           item: {
             key: "periodBegin",
@@ -243,19 +246,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "customerName", title: "客户" },
-          attr: {
-            is: "el-popover-select-v2",
-            valueKey: "name",
-            referName: "CUSTOMER_PARAM",
-            dataMapping: {
-              customer: "id",
-              customerCode: "code",
-              customerName: "name",
-            },
-          },
-        },
-        {
           item: { key: "recentlyPrice", title: "最近价格" },
           attr: {
             is: "el-input-number",
@@ -295,39 +285,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "priceType", title: "价格类型", required: true },
-          attr: {
-            is: "el-select",
-            dictName: "sys_price_type",
-            value: "order",
-          },
-        },
-        {
-          item: { key: "isDistributionPrice", title: "配送价", required: true },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-
-        {
-          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-        {
-          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-        {
           item: { width: 100, key: "priceDiffer", title: "单价差" },
           attr: {
             formatter: (prop) => {
@@ -376,8 +333,40 @@ export default function useColumns() {
             },
           },
         },
+        {
+          item: { key: "priceType", title: "价格类型", required: true },
+          attr: {
+            is: "el-select",
+            dictName: "sys_price_type",
+            value: "order",
+          },
+        },
+        {
+          item: { key: "isDistributionPrice", title: "配送价", required: true },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
 
         {
+          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
+        {
+          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
+        {
           item: { width: 150, key: "supplierName", title: "供应商名称1" },
           attr: { is: "el-input" },
         },
@@ -463,8 +452,8 @@ export default function useColumns() {
             precision: CONFIG.precision,
           },
         },
-        { item: { key: "createByName", title: "创建人名称" }, attr: {} },
-        { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
+        // { item: { key: "createByName", title: "创建人名称" }, attr: {} },
+        // { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
         {
           item: { key: "isPriceAdjustment", title: "", width: 10 },
           attr: {
@@ -475,6 +464,17 @@ export default function useColumns() {
             },
           },
         },
+        // 采购换算率隐藏
+        {
+          item: { key: "conversionRate", title: "采购换算率", required: true, width: 5 },
+          attr: {
+            is: "el-input-number",
+            min: 0,
+            precision: CONFIG.precision,
+            value: 1,
+            disabled: true,
+          },
+        },
       ],
     },
   ];

+ 1 - 0
src/views/purchase/apply/copy/index.vue

@@ -581,6 +581,7 @@
         >
           <div v-loading="loading" style="height: 250px; display: flex">
             <el-super-ux-table
+              index
               v-model="params[item.key]"
               :dict="dict"
               :ref="tabName"

+ 87 - 87
src/views/purchase/apply/edit/columns.js

@@ -115,6 +115,13 @@ export default function useColumns() {
       },
       TableColumns: [
         {
+          item: { key: "materialCode", title: "物料编码", required: true },
+          attr: {
+            is: "el-input",
+            clearable: true,
+          },
+        },
+        {
           item: { key: "materialName", title: "物料名称", required: true },
           attr: {
             is: "el-popover-select-v2",
@@ -136,18 +143,11 @@ export default function useColumns() {
             },
           },
         },
-        {
-          item: { key: "materialCode", title: "物料编码", required: true },
-          attr: {
-            is: "el-input",
-            clearable: true,
-          },
-        },
-        { item: { key: "manufacturerName", title: "生产厂家" }, attr: {} },
         { item: { key: "specification", title: "规格" }, attr: {} },
         { item: { key: "model", title: "型号" }, attr: {} },
+        { item: { key: "manufacturerName", title: "生产厂家" }, attr: {} },
         {
-          item: { key: "unitName", title: "单位", hidden: false },
+          item: { key: "unitName", title: "单位" },
           attr: {
             is: "el-popover-select-v2",
             valueKey: "name",
@@ -155,27 +155,37 @@ export default function useColumns() {
             dataMapping: { unit: "id", unitCode: "code", unitName: "name" },
           },
         },
+        // {
+        //   item: { key: "puUnitName", title: "采购单位", hidden: false },
+        //   attr: {
+        //     is: "el-popover-select-v2",
+        //     valueKey: "name",
+        //     referName: "UNIT_PARAM",
+        //     dataMapping: {
+        //       puUnit: "id",
+        //       puUnitCode: "code",
+        //       puUnitName: "name",
+        //     },
+        //   },
+        // },
         {
-          item: { key: "puUnitName", title: "采购单位", hidden: false },
+          item: { key: "customerName", title: "客户" },
           attr: {
             is: "el-popover-select-v2",
             valueKey: "name",
-            referName: "UNIT_PARAM",
+            referName: "CUSTOMER_PARAM",
             dataMapping: {
-              puUnit: "id",
-              puUnitCode: "code",
-              puUnitName: "name",
+              customer: "id",
+              customerCode: "code",
+              customerName: "name",
             },
           },
         },
         {
-          item: { key: "conversionRate", title: "采购换算率", required: true },
+          item: { key: "taxPrice", title: "含税单价", required: true },
           attr: {
             is: "el-input-number",
-            min: 0,
-            precision: CONFIG.precision,
-            value: 1,
-            disabled: true,
+            min: 0.00000001,
           },
         },
         {
@@ -189,13 +199,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "taxPrice", title: "含税单价", required: true },
-          attr: {
-            is: "el-input-number",
-            min: 0.00000001,
-          },
-        },
-        {
           item: { key: "price", title: "无税单价", required: true },
           attr: {
             formatter: (prop) => {
@@ -204,19 +207,19 @@ export default function useColumns() {
             },
           },
         },
-        {
-          item: { key: "currencyName", title: "币种" },
-          attr: {
-            is: "el-popover-select-v2",
-            valueKey: "name",
-            referName: "CURRENCY_PARAM",
-            dataMapping: {
-              currency: "id",
-              currencyCode: "code",
-              currencyName: "name",
-            },
-          },
-        },
+        // {
+        //   item: { key: "currencyName", title: "币种" },
+        //   attr: {
+        //     is: "el-popover-select-v2",
+        //     valueKey: "name",
+        //     referName: "CURRENCY_PARAM",
+        //     dataMapping: {
+        //       currency: "id",
+        //       currencyCode: "code",
+        //       currencyName: "name",
+        //     },
+        //   },
+        // },
         {
           item: {
             key: "periodBegin",
@@ -243,19 +246,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "customerName", title: "客户" },
-          attr: {
-            is: "el-popover-select-v2",
-            valueKey: "name",
-            referName: "CUSTOMER_PARAM",
-            dataMapping: {
-              customer: "id",
-              customerCode: "code",
-              customerName: "name",
-            },
-          },
-        },
-        {
           item: { key: "recentlyPrice", title: "最近价格" },
           attr: {
             is: "el-input-number",
@@ -295,39 +285,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "priceType", title: "价格类型", required: true },
-          attr: {
-            is: "el-select",
-            dictName: "sys_price_type",
-            value: "order",
-          },
-        },
-        {
-          item: { key: "isDistributionPrice", title: "配送价", required: true },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-
-        {
-          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-        {
-          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
-          attr: {
-            is: "el-select",
-            dictName: "is_effective",
-            value: "N",
-          },
-        },
-        {
           item: { width: 100, key: "priceDiffer", title: "单价差" },
           attr: {
             formatter: (prop) => {
@@ -376,8 +333,40 @@ export default function useColumns() {
             },
           },
         },
+        {
+          item: { key: "priceType", title: "价格类型", required: true },
+          attr: {
+            is: "el-select",
+            dictName: "sys_price_type",
+            value: "order",
+          },
+        },
+        {
+          item: { key: "isDistributionPrice", title: "配送价", required: true },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
 
         {
+          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
+        {
+          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
+          attr: {
+            is: "el-select",
+            dictName: "is_effective",
+            value: "N",
+          },
+        },
+        {
           item: { width: 150, key: "supplierName", title: "供应商名称1" },
           attr: { is: "el-input" },
         },
@@ -463,8 +452,8 @@ export default function useColumns() {
             precision: CONFIG.precision,
           },
         },
-        { item: { key: "createByName", title: "创建人名称" }, attr: {} },
-        { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
+        // { item: { key: "createByName", title: "创建人名称" }, attr: {} },
+        // { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
         {
           item: { key: "isPriceAdjustment", title: "", width: 10 },
           attr: {
@@ -475,6 +464,17 @@ export default function useColumns() {
             },
           },
         },
+        // 采购换算率隐藏
+        {
+          item: { key: "conversionRate", title: "采购换算率", required: true, width: 5 },
+          attr: {
+            is: "el-input-number",
+            min: 0,
+            precision: CONFIG.precision,
+            value: 1,
+            disabled: true,
+          },
+        },
       ],
     },
   ];

+ 1 - 0
src/views/purchase/apply/edit/index.vue

@@ -597,6 +597,7 @@
         >
           <div v-loading="loading" style="height: 250px; display: flex">
             <el-super-ux-table
+              index
               v-model="priceApply[item.key]"
               :dict="dict"
               :ref="tabName"

+ 59 - 60
src/views/purchase/apply/see/columns.js

@@ -77,29 +77,42 @@ export default function useColumns() {
       },
       TableColumns: [
         {
-          item: { width: 100, key: "materialName", title: "物料名称" },
+          item: { width: 100, key: "materialCode", title: "物料编码" },
           attr: {},
         },
         {
-          item: { width: 100, key: "materialCode", title: "物料编码" },
+          item: { width: 100, key: "materialName", title: "物料名称" },
           attr: {},
         },
+        { item: { width: 100, key: "specification", title: "规格" }, attr: {} },
+        { item: { width: 100, key: "model", title: "型号" }, attr: {} },
         {
           item: { width: 100, key: "manufacturerName", title: "生产厂家" },
           attr: {},
         },
-        { item: { width: 100, key: "specification", title: "规格" }, attr: {} },
-        { item: { width: 100, key: "model", title: "型号" }, attr: {} },
         {
           item: { width: 100, key: "unitName", title: "单位" },
           attr: {},
         },
+        // {
+        //   item: { width: 100, key: "puUnitName", title: "采购单位" },
+        //   attr: {},
+        // },
+        // {
+        //   item: { width: 100, key: "conversionRate", title: "采购换算率" },
+        //   attr: {
+        //     is: "el-computed-input-v2",
+        //     formatter: (prop) => {
+        //       return prop == null ? 0 : (prop * 1);
+        //     },
+        //   },
+        // },
         {
-          item: { width: 100, key: "puUnitName", title: "采购单位" },
+          item: { width: 100, key: "customerName", title: "客户" },
           attr: {},
         },
         {
-          item: { width: 100, key: "conversionRate", title: "采购换算率" },
+          item: { width: 100, key: "taxPrice", title: "含税单价" },
           attr: {
             is: "el-computed-input-v2",
             formatter: (prop) => {
@@ -117,15 +130,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { width: 100, key: "taxPrice", title: "含税单价" },
-          attr: {
-            is: "el-computed-input-v2",
-            formatter: (prop) => {
-              return prop == null ? 0 : (prop * 1);
-            },
-          },
-        },
-        {
           item: { width: 100, key: "price", title: "无税单价" },
           attr: {
             is: "el-computed-input-v2",
@@ -134,10 +138,10 @@ export default function useColumns() {
             },
           },
         },
-        {
-          item: { width: 100, key: "currencyName", title: "币种" },
-          attr: {},
-        },
+        // {
+        //   item: { width: 100, key: "currencyName", title: "币种" },
+        //   attr: {},
+        // },
         {
           item: { width: 100, key: "periodBegin", title: "价格有效期(起)" },
           attr: {},
@@ -147,10 +151,6 @@ export default function useColumns() {
           attr: {},
         },
         {
-          item: { width: 100, key: "customerName", title: "客户" },
-          attr: {},
-        },
-        {
           item: { width: 100, key: "recentlyPrice", title: "最近价格" },
           attr: {},
         },
@@ -175,35 +175,6 @@ export default function useColumns() {
           },
         },
         {
-          item: { width: 100, key: "priceType", title: "价格类型" },
-          attr: {
-            is: "el-dict-tag",
-            dictName: "sys_price_type",
-          },
-        },
-        {
-          item: { width: 100, key: "isDistributionPrice", title: "配送价" },
-          attr: {
-            is: "el-dict-tag",
-            dictName: "is_effective",
-          },
-        },
-
-        {
-          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
-          attr: {
-            is: "el-dict-tag",
-            dictName: "is_effective",
-          },
-        },
-        {
-          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
-          attr: {
-            is: "el-dict-tag",
-            dictName: "is_effective",
-          },
-        },
-        {
           item: { width: 100, key: "priceDiffer", title: "单价差" },
           attr: {
             is: "el-computed-input-v2",
@@ -250,8 +221,36 @@ export default function useColumns() {
             },
           },
         },
+        {
+          item: { width: 100, key: "priceType", title: "价格类型" },
+          attr: {
+            is: "el-dict-tag",
+            dictName: "sys_price_type",
+          },
+        },
+        {
+          item: { width: 100, key: "isDistributionPrice", title: "配送价" },
+          attr: {
+            is: "el-dict-tag",
+            dictName: "is_effective",
+          },
+        },
 
         {
+          item: { width: 100, key: "isChannel", title: "是否渠道变更" },
+          attr: {
+            is: "el-dict-tag",
+            dictName: "is_effective",
+          },
+        },
+        {
+          item: { width: 100, key: "brandReplacement", title: "是否品牌替换" },
+          attr: {
+            is: "el-dict-tag",
+            dictName: "is_effective",
+          },
+        },
+        {
           item: { width: 100, key: "supplierName", title: "供应商名称1" },
           attr: {},
         },
@@ -347,14 +346,14 @@ export default function useColumns() {
           },
         },
 
-        {
-          item: { width: 100, key: "createByName", title: "创建人名称" },
-          attr: {},
-        },
-        {
-          item: { width: 100, key: "updateByName", title: "更新人名称" },
-          attr: {},
-        },
+        // {
+        //   item: { width: 100, key: "createByName", title: "创建人名称" },
+        //   attr: {},
+        // },
+        // {
+        //   item: { width: 100, key: "updateByName", title: "更新人名称" },
+        //   attr: {},
+        // },
       ],
     },
   ];

+ 1 - 0
src/views/purchase/apply/see/index.vue

@@ -186,6 +186,7 @@ export default {
           lazy
         >
           <el-super-table
+            index
             v-model="params[item.key]"
             :size="$attrs.size"
             :dict="dict"

+ 1 - 1
src/views/purchase/equipmentData/add.vue

@@ -59,7 +59,7 @@
         <el-row>
           <el-col :span="1.5">
             <el-form-item label="是否项目/厂家年度授权" prop="isProjectOrFactoryEmpower">
-              <el-checkbox true-label= '0' false-label= '2' v-model="basicForm.isProjectOrFactoryEmpower"></el-checkbox>
+              <el-checkbox :disabled="sonDisable" true-label= '0' false-label= '2' v-model="basicForm.isProjectOrFactoryEmpower"></el-checkbox>
             </el-form-item>
           </el-col>
         </el-row>