ysy пре 1 година
родитељ
комит
453b22905c

+ 34 - 38
src/components/CreatePlan/equipment-dailog.vue

@@ -10,7 +10,7 @@
       <el-input placeholder="请输入" v-model="name"></el-input>
     </div>
     <!-- 数据表格 -->
-	<!-- :highlight-current-row="isSingle" -->
+    <!-- :highlight-current-row="isSingle" -->
     <ele-pro-table
       ref="table"
       :columns="columns"
@@ -21,19 +21,16 @@
       :selection.sync="selectionList"
       :datasource="datasourceShow"
       :current.sync="current"
-	  highlight-current-row
+      highlight-current-row
       height="45vh"
-	  @row-click="choose"
+      @row-click="choose"
     >
-    <template v-slot:select="{ row }">
-		  <el-radio
-		    class="radio"
-		    v-model="radio"
-		    :label="row.id"
-		    ><i></i
-		  ></el-radio>
-	 </template>
-	</ele-pro-table>
+      <template v-slot:select="{ row }">
+        <el-radio class="radio" v-model="radio" :label="row.id"
+          ><i></i
+        ></el-radio>
+      </template>
+    </ele-pro-table>
     <div class="footer" slot="footer">
       <el-button @click="cancel">取消</el-button>
       <el-button @click="confirm" type="primary">确定</el-button>
@@ -42,10 +39,10 @@
 </template>
 
 <script>
-  import { getDeviceList , getPlanDeviceList } from '@/api/productionPlan/order';
+  import { getDeviceList, getPlanDeviceList } from '@/api/productionPlan/order';
   export default {
     props: ['produceVersionId'],
-    data () {
+    data() {
       return {
         visible: false,
         current: null,
@@ -55,11 +52,11 @@
         datasource: [],
         isSingle: false,
         callback: null,
-		radio:'',
+        radio: ''
       };
     },
     computed: {
-      columns () {
+      columns() {
         const list = [
           {
             label: '设备编码',
@@ -96,15 +93,15 @@
 
         if (!this.isSingle) {
           list.push({
-		    slot: 'select',
-		    prop: 'select',
-		    label: '选择',
-		    align: 'center'
-		  });
+            slot: 'select',
+            prop: 'select',
+            label: '选择',
+            align: 'center'
+          });
         }
         return list;
       },
-      datasourceShow () {
+      datasourceShow() {
         return this.datasource?.filter((item) => {
           if (this.name) {
             return item.name.includes(this.name);
@@ -115,20 +112,20 @@
       }
     },
     methods: {
-      open (val,list = []) {
+      open(val, list = []) {
         this.memoList = list;
         this.isSingle = false;
         this.visible = true;
         this._getList(val);
       },
-      openSingle (list = [], callback) {
+      openSingle(list = [], callback) {
         this.memoList = list;
         this.callback = callback;
         this.isSingle = true;
         this.visible = true;
         this._getList();
       },
-      handleDone ({ data }) {
+      handleDone({ data }) {
         if (this.memoList.length) {
           this.$nextTick(() => {
             if (this.isSingle) {
@@ -144,38 +141,37 @@
           });
         }
       },
-      async _getList (val) {
-		const fn = val?getPlanDeviceList:getDeviceList
+      async _getList(val) {
+        const fn = val ? getPlanDeviceList : getDeviceList;
         const data = await fn({
           name: this.name,
           produceVersionId: this.produceVersionId
         });
         this.datasource = data || [];
       },
-      confirm () {
+      confirm() {
         if (this.isSingle) {
           if (!this.current) return this.$message.error('请选择数据');
 
           this.callback && this.callback(this.current);
         } else {
-          if (!this.current)
-            return this.$message.error('请选择数据');
+          if (!this.current) return this.$message.error('请选择数据');
           this.$emit('success', [this.current]);
         }
 
         this.cancel();
       },
-      cancel () {
+      cancel() {
         this.$refs.table.clearSelection();
-		this.radio = ''
-		this.current = null
+        this.radio = '';
+        this.current = null;
         this.visible = false;
       },
-	  // 单击获取id
-	  choose (row) {
-	    this.current = row;
-	    this.radio = row.id;
-	  },
+      // 单击获取id
+      choose(row) {
+        this.current = row;
+        this.radio = row.id;
+      }
     }
   };
 </script>

+ 1 - 1
src/views/saleOrder/components/plan-submit.vue

@@ -46,7 +46,7 @@
           {{ info.contractNum }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template slot="label"> 产品重量 </template>
+          <template slot="label"> 订单重量 </template>
           {{ info.sumOrderWeight }} {{  info.newWeightUnit }}
         </el-descriptions-item>
         <el-descriptions-item>

+ 2 - 4
src/views/saleOrder/salesToProduction.vue

@@ -824,10 +824,8 @@ export default {
         }
       }
       row.planProductNum = Number(row.planProductNum.toFixed(5));
-      // row.contractNum=row.planProductNum;
-      // row.requiredFormingNum = row.planProductNum;
-      // row.lackNum = row.planProductNum;
-      // this.form.contractNum=row.planProductNum;
+      row.requiredFormingNum =Number(row.planProductNum *  (this.form.marginCoefficient || 1)).toFixed(5);
+ 
     },
     confirmChoose(list) {
       // 取出在弹窗中选中并且不在表格中的数据