ソースを参照

Merge branch 'develop_yh12' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh12

chenrui 2 年 前
コミット
1ddc837aaa

+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "2.1.72",
+    "version": "2.1.73",
     "message": "发现有新版本发布,确定更新系统?"
 }

+ 1 - 1
src/views/financialManagement/collectionDetailStatic/list.vue

@@ -163,7 +163,7 @@
         <!-- 备注 -->
         <template slot="note" slot-scope="text, record">
           <div @click="handleNote(record)">
-            <span class="link-bule">{{ record.remarks || '--' }}</span>
+            <span :title="record.remarks" class="link-bule" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;width:100%;display:block;">{{ record.remarks || '--' }}</span>
           </div>
         </template>
       </s-table>

+ 2 - 0
src/views/purchasingManagement/bulkWarehousingOrder/productModal.vue

@@ -53,6 +53,7 @@
           <a-input-number
             id="bulkWarehousingOrder-product-productCost"
             v-model="form.productCost"
+            :disabled="!!form.productCost"
             :precision="2"
             :min="0"
             :max="999999"
@@ -180,6 +181,7 @@ export default {
       this.form.productOrigCode = this.productData[ind].product.origCode
       this.form.productCost = (this.productData[ind].cost && this.productData[ind].cost != 0) ? this.productData[ind].cost : ''
       this.$refs.productQty.focus()
+      this.$refs.ruleForm.validate()
     },
     // 详情
     getDetail () {

+ 7 - 7
src/views/salesManagement/receiptPrint/list.vue

@@ -14,22 +14,22 @@
         <div ref="tableSearch" class="table-page-search-wrapper">
           <a-form layout="inline">
             <a-row :gutter="15">
-              <a-col :md="8" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="允许打印时间">
                   <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
                 </a-form-item>
               </a-col>
-              <a-col :md="8" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-item label="收款单号">
                   <a-input id="salesCollectionList-bookNo" v-model.trim="queryParam.bookNo" allowClear placeholder="请输入备货单号"/>
                 </a-form-item>
               </a-col>
-              <a-col :md="8" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-item label="客户名称">
                   <dealerSubareaScopeList ref="payerName" id="salesCollectionList-payerName" @change="custChange" />
                 </a-form-item>
               </a-col>
-              <a-col :md="8" :sm="24" v-if="currentTab == 1">
+              <a-col :md="4" :sm="24" v-if="currentTab == 1">
                 <a-form-item label="收款打印状态">
                   <v-select
                     v-model="queryParam.printStatus"
@@ -41,8 +41,8 @@
                   ></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :offset="currentTab==2?8:0" :md="16" :sm="24">
-                <span style="float: right;" class="table-page-search-submitButtons">
+              <a-col :md="4" :sm="24">
+                <span class="table-page-search-submitButtons">
                   <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
                   <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
                 </span>
@@ -198,7 +198,7 @@ export default {
         { title: '户名', dataIndex: 'bankAccount', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '汇入银行', dataIndex: 'bankName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '足额打款', dataIndex: 'fullPaymentFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '说明', dataIndex: 'explainInfo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '说明', dataIndex: 'explainInfo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } , ellipsis: true},
         { title: '收款打印状态', dataIndex: 'printStatusDictValue', width: '6%', align: 'center', scopedSlots: { customRender: 'printStatus' } },
         { title: '打印次数', dataIndex: 'printNum', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }

+ 14 - 20
src/views/supplierManagement/associatedProduct/add.vue

@@ -14,35 +14,29 @@
         <div ref="tableSearch" class="table-page-search-wrapper">
           <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
             <a-row :gutter="15">
-              <a-col :md="6" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-item label="产品名称">
                   <a-input id="associatedProduct-name" v-model.trim="queryParam.product.name" allowClear placeholder="请输入产品名称"/>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-item label="产品编码/原厂编码">
                   <a-input id="associatedProduct-queryWord" v-model.trim="queryParam.product.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-item label="品牌">
                   <ProductBrand id="associatedProduct-productBrandSn" v-model="queryParam.product.productBrandSn"></ProductBrand>
                 </a-form-item>
               </a-col>
-              <template v-if="advanced">
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="产品分类">
-                    <ProductType id="associatedProduct-productType" v-model="productType" @change="changeProductType"></ProductType>
-                  </a-form-item>
-                </a-col>
-              </template>
-              <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-col :md="5" :sm="24">
+                <a-form-item label="产品分类">
+                  <ProductType id="associatedProduct-productType" v-model="productType" @change="changeProductType"></ProductType>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
                 <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="associatedProduct-refresh">查询</a-button>
                 <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="associatedProduct-reset">重置</a-button>
-                <a @click="advanced=!advanced" style="margin-left: 5px">
-                  {{ advanced ? '收起' : '展开' }}
-                  <a-icon :type="advanced ? 'up' : 'down'"/>
-                </a>
               </a-col>
             </a-row>
           </a-form>
@@ -77,12 +71,12 @@
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button
+            <!-- <a-button
               size="small"
               type="link"
               class="button-info"
               @click="handleSetPrice(record)"
-              id="associatedProduct-setCostPrice-btn">设置成本价</a-button>
+              id="associatedProduct-setCostPrice-btn">设置成本价</a-button> -->
             <a-button
               size="small"
               type="link"
@@ -169,9 +163,9 @@ export default {
         // { title: '成本价', dataIndex: 'cost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '13%', align: 'center' }
       ]
-      if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
-        arr.splice(6, 0, { title: '成本价', dataIndex: 'cost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-      }
+      // if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
+      //   arr.splice(6, 0, { title: '成本价', dataIndex: 'cost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      // }
       return arr
     }
   },

+ 4 - 4
src/views/supplierManagement/associatedProduct/chooseImportModal.vue

@@ -88,15 +88,15 @@ export default {
       nowColumns: [ //  可导入
         { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '30%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'product.name', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '成本', dataIndex: 'costText', width: '20%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品名称', dataIndex: 'product.name', width: '50%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '成本', dataIndex: 'costText', width: '20%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'product.unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       nowUnColumns: [ //  不可导入
         { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'product.name', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '成本', dataIndex: 'costText', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品名称', dataIndex: 'product.name', width: '40%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '成本', dataIndex: 'costText', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'product.unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '备注', dataIndex: 'errorDesc', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
       ],

+ 2 - 2
src/views/supplierManagement/associatedProduct/importGuideModal.vue

@@ -15,8 +15,8 @@
             <span>1</span>准备导入
           </div>
           <ul>
-            <li>1) 导入的Excel文件中必须包含名为“产品编码”、“成本”的列,且名称必须相同</li>
-            <li>2) 除了“产品编码”、“成本”两列,其他列可自定义,不影响数据导入</li>
+            <li>1) 导入的Excel文件中必须包含名为“产品编码”的列,且名称必须相同</li>
+            <li>2) 除了“产品编码”列,其他列可自定义,不影响数据导入</li>
             <li>3) 如果导入的产品已经存在,则不会导入该行</li>
           </ul>
           <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>

+ 3 - 3
src/views/supplierManagement/associatedProduct/settingCost.vue

@@ -17,10 +17,10 @@
           :label-col="labelCol"
           :wrapper-col="wrapperCol"
         >
-          <a-form-model-item label="产品名称">
-            {{ productName }}
+          <a-form-model-item style="margin-bottom:10px;" label="产品名称">
+            <div style="line-height:normal;padding-top:11px;">{{ productName }}</div>
           </a-form-model-item>
-          <a-form-model-item label="产品编码">
+          <a-form-model-item style="margin-bottom:10px;" label="产品编码">
             {{ productCode }}
           </a-form-model-item>
           <a-form-model-item label="成本价" prop="cost">

+ 67 - 105
src/views/supplierManagement/costSetting/addProductModal.vue

@@ -13,13 +13,15 @@
         <div style="display:flex;align-items: center;padding:10px 0;">
           <div style="font-size:14px;"><span style="color:red;">*</span>供应商名称:</div>
           <div style="flex-grow: 1;">
-            <supplier style="width:50%" v-model="queryParam.supplierSn" placeholder="请输入供应商名称搜索"></supplier>
+            <supplier style="width:50%" v-model="supplierSn" @change="getChoosed" placeholder="请输入供应商名称搜索"></supplier>
           </div>
         </div>
-       <div style="padding:10px 0;border-bottom: 1px solid #eee;">
-         <span style="font-size:14px;">选择产品</span>
-         <span style="font-weight: bold;">(已选:{{ rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length }}个)</span>
-       </div>
+        <div style="padding:10px 0;border-bottom: 1px solid #eee;">
+          <span style="font-size:14px;">选择产品</span>
+          <span style="font-weight: bold;" v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length">
+            (已选:{{ rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length||0 }}个)
+          </span>
+        </div>
         <div style="padding:15px 0 0;">
           <!-- 搜索条件 -->
           <div class="table-page-search-wrapper">
@@ -39,7 +41,7 @@
                   </a-form-model-item>
                 </a-col>
                 <a-col :md="6" :sm="24">
-                  <a-form-model-item label="产品品牌" :prop="type=='dealership'?'productBrandSn':''">
+                  <a-form-model-item label="产品品牌">
                     <a-select
                       placeholder="请选择产品品牌"
                       id="chooseProducts-productBrandSn"
@@ -53,7 +55,7 @@
                   </a-form-model-item>
                 </a-col>
                 <a-col :md="6" :sm="24">
-                  <a-form-model-item label="产品分类" :prop="type=='dealership'?'productType':''">
+                  <a-form-model-item label="产品分类">
                     <a-cascader
                       @change="changeProductType"
                       change-on-select
@@ -80,7 +82,7 @@
             size="small"
             :rowKey="(record) => record.productSn"
             rowKeyName="productSn"
-            :row-selection="{ columnWidth: 40, getCheckboxProps:record =>({props: { disabled: (this.type == 'supplier') && (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.indexOf(record.productSn) > -1) }}) }"
+            :row-selection="{ columnWidth: 40, getCheckboxProps:record =>({props: { disabled: this.chooseData && this.chooseData.indexOf(record.productSn) > -1 }}) }"
             @rowSelection="rowSelectionFun"
             :columns="columns"
             :data="loadData"
@@ -115,7 +117,8 @@ import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery, productTypeQueryAll } from '@/api/productType'
 import supplier from '@/views/common/supplier.js'
 import { dealerScopeValidProduct } from '@/api/dealerScope'
-import { productPricedList, productPricingList } from '@/api/product'
+import { addProduct, supplierProductSnList } from '@/api/supplier'
+import { productPricingList } from '@/api/product'
 export default {
   name: 'ChooseProductsModal',
   components: { STable, supplier },
@@ -124,15 +127,9 @@ export default {
       type: Boolean,
       default: false
     },
-    chooseData: {
-      type: Array,
-      default: () => {
-        return []
-      }
-    },
     type: { //  类型,经销权设置dealership,  供应商添加产品supplier
       type: String,
-      default: ''
+      default: 'supplier'
     },
     dealerSn: {
       type: String || Number,
@@ -147,6 +144,7 @@ export default {
         labelCol: { span: 4 },
         wrapperCol: { span: 20 }
       },
+      supplierSn: undefined, // 供应商sn
       queryParam: { //  查询条件
         code: '', //  产品编码
         productBrandSn: undefined, //  产品品牌
@@ -159,6 +157,7 @@ export default {
         productBrandSn: [ { required: true, message: '请选择产品品牌', trigger: 'change' } ],
         productType: [ { required: true, message: '请选择产品分类', trigger: 'change' } ]
       },
+      chooseData: [], // 已选产品
       disabled: false, //  查询、重置按钮是否可操作
       loading: false, //  表格加载中
       columns: [
@@ -170,15 +169,8 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        let url = productPricedList //  获取定过价的产品
-        if (this.type == 'supplier') { //  供应商增加产品
-          url = productPricingList //  获取定价产品
-        }
         const params = Object.assign(parameter, this.queryParam)
-        if (this.type != 'supplier' && this.type != 'dealership') { //  促销
-          params.onlineFalg = 1
-        }
-        return url(params).then(res => {
+        return productPricingList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -202,49 +194,26 @@ export default {
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
     },
+    // 查询所有已选sn
+    getChoosed () {
+      this.spinning = true
+      supplierProductSnList({ sn: this.supplierSn }).then(res => {
+        if (res.status == 200) {
+          this.chooseData = res.data //  包含先前所选产品
+          this.handleSearch()
+        }
+        this.spinning = false
+      })
+    },
     // 查询
     handleSearch () {
       const _this = this
       _this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          if (_this.type == 'dealership') { //  设置经销权时选择产品
-            // 校验产品是否被包含在品牌分类中
-            const params = []
-            if (_this.queryParam.productBrandSn) {
-              params.push({
-                dealerSn: _this.dealerSn,
-                goodsType: 'BRAND',
-                goodsSn: _this.queryParam.productBrandSn
-              })
-            }
-            if (_this.queryParam.productTypeSn1) {
-              params.push({
-                dealerSn: _this.dealerSn,
-                goodsType: 'CATEGORY',
-                goodsSn: _this.queryParam.productTypeSn1
-              })
-            }
-            if (_this.queryParam.productTypeSn2) {
-              params.push({
-                dealerSn: _this.dealerSn,
-                goodsType: 'CATEGORY',
-                goodsSn: _this.queryParam.productTypeSn2
-              })
-            }
-            if (_this.queryParam.productTypeSn3) {
-              params.push({
-                dealerSn: _this.dealerSn,
-                goodsType: 'CATEGORY',
-                goodsSn: _this.queryParam.productTypeSn3
-              })
-            }
-            dealerScopeValidProduct(params).then(res => {
-              if (res.status == 200) {
-                _this.$refs.table.refresh(true)
-              }
-            })
-          } else {
+          if (this.supplierSn) {
             _this.$refs.table.refresh(true)
+          } else {
+            this.$message.warning('请先选择供应商!')
           }
         } else {
           return false
@@ -268,22 +237,39 @@ export default {
     // 保存
     handleSave () {
       const _this = this
+      if (!this.supplierSn) {
+        this.$message.warning('请先选择供应商!')
+        return
+      }
       if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length < 1)) {
-        this.$message.warning('请在列表勾选后再进行操作!')
+        this.$message.warning('请选择产品!')
         return
       }
-      if (this.type == 'supplier') { //  供应商增加产品
-        const arr = []
-        this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.map(item => {
-          if (_this.chooseData.indexOf(item) == -1) {
-            arr.push(item)
-          }
-        })
-        this.$emit('ok', arr)
+      const arr = []
+      this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.map(item => {
+        if (_this.chooseData.indexOf(item) == -1) {
+          arr.push(item)
+        }
+      })
+      if (arr.length) {
+        this.addProduct(arr)
       } else {
-        this.$emit('ok', this.rowSelectionInfo && this.rowSelectionInfo.selectedRows)
+        this.$message.warning('请选择产品!')
       }
-      this.isShow = false
+    },
+    // 添加产品  数据处理
+    addProduct (arr) {
+      this.spinning = true
+      addProduct({
+        supplierSn: this.supplierSn,
+        productSnList: arr
+      }).then(res => {
+        if (res.status == 200) {
+          this.$emit('ok')
+          this.isShow = false
+        }
+        this.spinning = false
+      })
     },
     //  产品分类  change
     changeProductType (val, opt) {
@@ -308,23 +294,13 @@ export default {
     },
     //  产品分类  列表
     getProductType () {
-      if (this.type != 'supplier' && this.type != 'dealership') { //  促销
-        productTypeQueryAll({}).then(res => {
-          if (res.status == 200) {
-            this.productTypeList = res.data
-          } else {
-            this.productTypeList = []
-          }
-        })
-      } else {
-        productTypeQuery({}).then(res => {
-          if (res.status == 200) {
-            this.productTypeList = res.data
-          } else {
-            this.productTypeList = []
-          }
-        })
-      }
+      productTypeQuery({}).then(res => {
+        if (res.status == 200) {
+          this.productTypeList = res.data
+        } else {
+          this.productTypeList = []
+        }
+      })
     }
   },
   watch: {
@@ -337,24 +313,10 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.$refs.table.clearTable()
+        this.chooseData = []
+        this.supplierSn = undefined
         this.resetData()
       } else {
-        const _this = this
-        let selectedRows = []
-        let selectedRowKeys = []
-        if (this.type == 'supplier') { //  供应商增加产品
-          selectedRows = []
-          selectedRowKeys = this.chooseData
-        } else {
-          selectedRows = this.chooseData
-          selectedRowKeys = []
-          this.chooseData.map(item => {
-            selectedRowKeys.push(item.goodsSn)
-          })
-        }
-        this.$nextTick(() => { // 页面渲染完成后的回调
-          _this.$refs.table.setTableSelected(selectedRowKeys, selectedRows) // 设置表格选中项
-        })
         if (this.productBrandList.length == 0) {
           this.getProductBrand()
         }

+ 14 - 10
src/views/supplierManagement/costSetting/list.vue

@@ -98,7 +98,7 @@
         </template>
       </s-table>
     </a-spin>
-    
+
     <!-- 新增 -->
     <addProductModal :openModal="newProduct" @close="newProduct=false" @ok="handleProductsOk" />
     <!-- 设置成本价 -->
@@ -204,20 +204,24 @@ export default {
       this.queryParam.product.productTypeSn3 = val[2] ? val[2] : ''
     },
     // 导出明细
-    handleExport(){
-      
+    handleExport () {
+
     },
     // 新增成功
-    handleProductsOk(){
-      
+    handleProductsOk () {
+      this.newProduct = false
+      this.resetSearchForm()
     },
     // 批量导入
-    handleBatchImport(){
-      
+    handleBatchImport () {
+
     },
     // 批量审核
-    handleBatchAudit(){
-      
+    handleBatchAudit () {
+      if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length < 1)) {
+        this.$message.warning('请在列表中进行勾选!')
+        return false
+      }
     },
     // 单个审核
     handleAudit (row) {
@@ -241,7 +245,7 @@ export default {
       })
     },
     // 成本设置
-    handleCostSet(row){
+    handleCostSet (row) {
       this.openSetModal = true
       this.$refs.settingCost.setData(row)
     },

+ 10 - 6
src/views/supplierManagement/costSetting/settingCost.vue

@@ -17,16 +17,19 @@
           :label-col="labelCol"
           :wrapper-col="wrapperCol"
         >
-          <a-form-model-item label="产品名称">
-            {{ productName }}
+          <a-form-model-item style="margin-bottom:10px;" label="产品名称">
+            <div style="line-height:normal;padding-top:11px;">{{ productName }}</div>
           </a-form-model-item>
-          <a-form-model-item label="产品编码">
+          <a-form-model-item style="margin-bottom:10px;" label="产品编码">
             {{ productCode }}
           </a-form-model-item>
-          <a-form-model-item label="供应商名称">
+          <a-form-model-item style="margin-bottom:10px;" label="供应商名称">
             {{ supplierName }}
           </a-form-model-item>
-          <a-form-model-item label="成本价" prop="cost">
+          <a-form-model-item style="margin-bottom:10px;" label="原成本价">
+            {{ cost||'--' }}
+          </a-form-model-item>
+          <a-form-model-item label="变更成本价" prop="cost">
             <a-input-number
               id="setting-cost"
               v-model="form.cost"
@@ -76,6 +79,7 @@ export default {
       productName: '',
       productCode: '',
       supplierName: '',
+      cost: '',
       form: {
         supplierSn: '',
         supplierProductSn: '',
@@ -92,7 +96,7 @@ export default {
     setData (row) {
       this.form.supplierSn = row.supplierSn
       this.form.supplierProductSn = row.supplierProductSn
-      this.form.cost = row.cost
+      this.cost = row.cost
       this.productName = row.product.name
       this.productCode = row.product.code
       this.supplierName = row.supplierName