Browse Source

bug 修复

lilei 3 years ago
parent
commit
b22f668c6e

+ 4 - 2
src/components/MultiTab/MultiTab.vue

@@ -163,8 +163,10 @@ export default {
         const ob = oldVal.meta.title.indexOf('新增') >= 0
         const oc = oldVal.meta.title.indexOf('编辑') >= 0
         // 是否时同一个父级菜单下的页面
-        const hasChildren = newVal.matched[2].name == oldVal.matched[2].name
-        console.log(newVal.matched[2].name, oldVal.matched[2].name, hasChildren)
+        const mnlen = newVal.matched.length < 3
+        const molen = oldVal.matched.length < 3
+        const hasChildren = newVal.matched[mnlen ? 1 : 2].name == oldVal.matched[molen ? 1 : 2].name
+        // console.log(newVal.matched[mnlen ? 1 : 2].name, oldVal.matched[molen ? 1 : 2].name, hasChildren)
         if ((na || nb || nc || oa || ob || oc) && hasChildren) {
           // 替换当前页签
           this.replaceTab(newVal, oldVal)

+ 7 - 5
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -272,12 +272,14 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '产品编码', scopedSlots: { customRender: 'code' }, width: '15%', align: 'center', sorter: true },
-        { title: '产品名称', dataIndex: 'name', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品名称', dataIndex: 'name', width: '23%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'origCode', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '箱/单位', dataIndex: 'unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '采购单价', dataIndex: 'purchasePrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '采购数量', dataIndex: 'qty', scopedSlots: { customRender: 'storageQuantity' }, width: '10%', align: 'center' },
-        { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '8%', align: 'center' },
+        { title: '箱/单位', dataIndex: 'unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购单价', dataIndex: 'purchasePrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '终端会员价', dataIndex: 'terminalPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '车主零售价', dataIndex: 'carOwnersPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '采购数量', dataIndex: 'qty', scopedSlots: { customRender: 'storageQuantity' }, width: '6%', align: 'center' },
+        { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '6%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象