Ver código fonte

供应商价格bug修改

cz 1 ano atrás
pai
commit
cb38ae72c2
1 arquivos alterados com 16 adições e 82 exclusões
  1. 16 82
      src/views/purchaseManage/supplier/supplyPrice/index.vue

+ 16 - 82
src/views/purchaseManage/supplier/supplyPrice/index.vue

@@ -2,101 +2,48 @@
   <div class="tenant">
     <!-- <Banner /> -->
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        highlight-current-row
-        :selectConfig="selectConfig"
-        :table-events="{
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           //element talbe事件都能传
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           {
             text: '添加供应价格',
             action: () => openModal('add'),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
         <template #fileSlot="{ item }">
-          <div
-            style="cursor: pointer; color: #409eff"
-            @click="handleClickFile(item)"
-          >
+          <div style="cursor: pointer; color: #409eff" @click="handleClickFile(item)">
             {{ item.fileName }}
           </div>
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="modalType == 'add' ? '添加供应价格' : '编辑供应价格'"
-      v-model="dialogVisible"
-      width="800"
-      v-loading="loading"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
+    <el-dialog :title="modalType == 'add' ? '添加供应价格' : '编辑供应价格'" v-model="dialogVisible" width="800" v-loading="loading">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #details>
           <div style="width: 100%">
-            <el-button
-              type="primary"
-              @click="openProduct = true"
-              :disabled="modalType == 'edit'"
-            >
+            <el-button type="primary" @click="openProduct = true" :disabled="modalType == 'edit'">
               选择
             </el-button>
 
-            <el-form
-              ref="tableForm"
-              :model="formData.data"
-              :rules="rules"
-              label-width="0px"
-              style="margin-top: 15px"
-            >
+            <el-form ref="tableForm" :model="formData.data" :rules="rules" label-width="0px" style="margin-top: 15px">
               <el-table :data="formData.data.supplierPriceList">
                 <el-table-column prop="code" label="货品编码" />
                 <el-table-column prop="name" label="货品名称" min-width="150" />
                 <el-table-column prop="spec" label="规格" />
-                <el-table-column
-                  prop="unit"
-                  label="单位"
-                  :formatter="(row) => dictValueLabel(row.unit, productUnit)"
-                />
+                <el-table-column prop="unit" label="单位" :formatter="(row) => dictValueLabel(row.unit, productUnit)" />
                 <el-table-column prop="price" label="供应单价" min-width="150">
                   <template #default="{ row, $index }">
-                    <el-form-item
-                      :prop="'supplierPriceList.' + $index + '.price'"
-                      :rules="rules.price"
-                      :inline-message="true"
-                    >
-                      <el-input-number
-                        v-model="row.price"
-                        :precision="4"
-                        :controls="false"
-                        :min="1"
-                        onmousewheel="return false;"
-                      />
+                    <el-form-item :prop="'supplierPriceList.' + $index + '.price'" :rules="rules.price" :inline-message="true">
+                      <el-input-number v-model="row.price" :precision="4" :controls="false" :min="0" onmousewheel="return false;" />
                     </el-form-item>
                   </template>
                 </el-table-column>
 
                 <el-table-column prop="zip" label="操作" width="100">
                   <template #default="{ $index }">
-                    <el-button
-                      type="primary"
-                      link
-                      @click="handleRemove($index)"
-                      :disabled="modalType == 'edit'"
-                      >删除</el-button
-                    >
+                    <el-button type="primary" link @click="handleRemove($index)" :disabled="modalType == 'edit'">删除</el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -106,27 +53,14 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm('byform')"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" @click="submitForm('byform')" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      v-model="openProduct"
-      title="选择货品"
-      width="70%"
-      append-to-body
-    >
-      <SelectGoods
-        @cancel="openProduct = false"
-        @pushGoods="pushGoods"
-      ></SelectGoods>
+    <el-dialog v-model="openProduct" title="选择货品" width="70%" append-to-body>
+      <SelectGoods @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
     </el-dialog>
   </div>
 </template>