Browse Source

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

lilei 2 years ago
parent
commit
99a021d0fd

+ 1 - 1
src/views/purchasingManagement/bulkWarehousingOrder/detailModal.vue

@@ -110,7 +110,7 @@ export default {
       ]
       if (this.$hasPermissions('B_sparePartsDetail_costPrice')) { //  成本价权限
         arr.splice(5, 0, { title: '入库单价', dataIndex: 'productCost', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
-        arr.splice(6, 0, { title: '小计', dataIndex: 'subtotal', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(6, 0, { title: '小计', dataIndex: 'subtotal', width: '12%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
       return arr
     }

+ 18 - 23
src/views/setting/erpMessageManagement/list.vue

@@ -12,7 +12,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="同步状态">
-                <a-select placeholder="请选择同步状态">
+                <a-select placeholder="请选择同步状态" v-model="queryParam.statusVal">
                   <a-select-option value="1">
                     同步成功
                   </a-select-option>
@@ -41,6 +41,11 @@
         :scroll="{ y: tableHeight }"
         :defaultLoadData="false"
         bordered>
+        <!-- 同步状态 -->
+        <template slot="syncStatus" slot-scope="text, record">
+          <span v-if="record.status&&record.status=='success'">同步成功</span>
+          <span v-else style="color:#ed1c24;">同步失败</span>
+        </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
@@ -48,7 +53,7 @@
             type="link"
             v-if="$hasPermissions('B_rebateSettings_edit')"
             class="button-info"
-            @click="handleEdit(record)"
+            @click="handleAgainSync(record)"
             id="rebateSettingsList-edit-btn">重新同步</a-button>
           <span v-else>--</span>
         </template>
@@ -63,21 +68,17 @@ import { STable, VSelect } from '@/components'
 import { queryRebatePage } from '@/api/dealerRelation'
 import rangeDate from '@/views/common/rangeDate.vue'
 export default {
-  name: 'RebateSettingsList',
+  name: 'ErpMessageManagementList',
   mixins: [commonMixin],
   components: { STable, VSelect, rangeDate },
   data () {
     return {
       spinning: false,
       tableHeight: 0,
-      formItemLayout: {
-        labelCol: { span: 6 },
-        wrapperCol: { span: 16 }
-      },
       queryParam: {
-        dealerName: '',
         beginDate: '',
-        endDate: ''
+        endDate: '',
+        statusVal: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
@@ -86,7 +87,7 @@ export default {
         { title: '同步时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务模块', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务编码', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '同步状态', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '同步状态', scopedSlots: { customRender: 'syncStatus' }, width: '7%', align: 'center' },
         { title: '错误信息', dataIndex: 'createDate', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
       ],
@@ -107,10 +108,7 @@ export default {
           this.spinning = false
           return data
         })
-      },
-      defaultExpandedRowKeys: [], //  树形数据默认展开项
-      openModal: false, //  新增编辑  弹框
-      nowData: null //  当前记录数据
+      }
     }
   },
   methods: {
@@ -121,19 +119,16 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.dealerName = ''
+      this.queryParam.statusVal = undefined
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.$refs.rangeDate.resetDate()
       this.$refs.table.refresh(true)
     },
-    // 编辑
-    handleEdit (row) {
-      this.nowData = row
+    // 重新同步
+    handleAgainSync (row) {
       this.openModal = true
     },
-    //  关闭弹框
-    closeModal () {
-      this.nowData = null
-      this.openModal = false
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调