Browse Source

修改bug

chenrui 2 years ago
parent
commit
8c5a532217
1 changed files with 45 additions and 48 deletions
  1. 45 48
      src/views/productManagement/productInfo/offlineImportModal.vue

+ 45 - 48
src/views/productManagement/productInfo/offlineImportModal.vue

@@ -11,18 +11,47 @@
     <div class="chooseImport-con">
       <!-- 可导入数据 -->
       <p style="font-weight:bold;">可导入数据{{ loadData.length }}条,确认要批量下线吗?</p>
-      <a-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.allocateSn"
-        :columns="nowColumns"
-        :dataSource="loadData"
-        :loading="loading"
-        :scroll="{ y: 200}"
-        :pagination="false"
-        bordered>
-      </a-table>
+      <a-form-model :model="form" :label-col="labelCol" :wrapper-col="wrapperCol">
+          <a-form-model-item label="下线选项">
+           <a-select
+               label-in-value
+               @change="handleChange"
+             >
+               <a-select-option value="1">
+                 淘汰
+               </a-select-option>
+               <a-select-option value="2">
+                通用
+               </a-select-option>
+             </a-select>
+          </a-form-model-item>
+          <a-form-model-item label="通用编码">
+           <a-table
+             class="sTable"
+             ref="table"
+             size="small"
+             :rowKey="(record) => record.allocateSn"
+             :columns="nowColumns"
+             :dataSource="loadData"
+             :loading="loading"
+             :scroll="{ y: 200}"
+             :pagination="false"
+             bordered>
+             <template slot="currency" slot-scope="text, record">
+                <a-input placeholder="请输入通用编码" />
+             </template>
+           </a-table>
+          </a-form-model-item>
+          <a-form-model-item label="下线备注">
+           <a-textarea 
+                 v-model="value"
+                 placeholder="请输入下线备注(最多60个字符)"
+                 :maxLength="60"
+                 :auto-size="{ minRows: 2, maxRows: 5 }"
+               />
+          </a-form-model-item>
+        </a-form-model>
+      
       <a-divider />
       <!-- 不可导入数据 -->
       <p class="red">不可导入数据{{ unLoadData.length }}条</p>
@@ -86,51 +115,19 @@ export default {
   },
   data () {
     return {
+       labelCol: { span: 2 },
+       wrapperCol: { span: 22 },
       isShow: this.openModal, //  是否打开弹框
       nowColumns: [
         { title: '序号', dataIndex: 'no', width: '3%', align: 'center' },
-        { title: '产品名称', dataIndex: 'name', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'code', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'origCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '其它编码', dataIndex: 'otherCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品品牌', dataIndex: 'productBrandName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '一级分类', dataIndex: 'productTypeName1', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '二级分类', dataIndex: 'productTypeName2', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '三级分类', dataIndex: 'productTypeName3', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位', dataIndex: 'unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '包装数', dataIndex: 'packQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '包装数单位', dataIndex: 'packQtyUnit', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '是否箭冠产品', dataIndex: 'arrow', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '条形码', dataIndex: 'qrCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品尺寸', dataIndex: 'size', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '产品重量', dataIndex: 'weight', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '颜色', dataIndex: 'color', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '产品内盒尺寸', dataIndex: 'boxSize', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '产品说明', dataIndex: 'description', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '其他说明', dataIndex: 'otherDesc', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '通用编码',scopedSlots: { customRender: 'currency' },  width: '5%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       loadData: [],
       nowUnColumns: [
         { title: '序号', dataIndex: 'no', width: '3%', align: 'center' },
-        { title: '产品名称', dataIndex: 'name', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'code', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'origCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '其它编码', dataIndex: 'otherCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品品牌', dataIndex: 'productBrandName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '一级分类', dataIndex: 'productTypeName1', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '二级分类', dataIndex: 'productTypeName2', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '三级分类', dataIndex: 'productTypeName3', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位', dataIndex: 'unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '包装数', dataIndex: 'packQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '包装数单位', dataIndex: 'packQtyUnit', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '是否箭冠产品', dataIndex: 'arrow', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '条形码', dataIndex: 'qrCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品尺寸', dataIndex: 'size', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '产品重量', dataIndex: 'weight', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '颜色', dataIndex: 'color', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '产品内盒尺寸', dataIndex: 'boxSize', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '产品说明', dataIndex: 'description', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '其他说明', dataIndex: 'otherDesc', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '通用编码', dataIndex: 'origCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '备注', dataIndex: 'errorMsg', width: '5%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       unLoadData: [],