lilei 4 anos atrás
pai
commit
4bf6ac51f0

+ 25 - 10
src/views/financialManagement/expenseManagement/list.vue

@@ -88,12 +88,27 @@
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="primary" class="button-info" @click="handleExamine(record, 1)" id="expenseManagement-adopt-btn">通过</a-button>
-        <a-button size="small" type="primary" class="button-warning" @click="handleExamine(record, 2)" id="expenseManagement-unadopt-btn">不通过</a-button>
-        <a-button size="small" type="primary" class="button-primary" @click="handleEdit(record)" id="expenseManagement-edit-btn">编辑</a-button>
-        <a-button size="small" type="primary" class="button-geekblue" @click="handleSubmit(record)" id="expenseManagement-submit-btn">提交</a-button>
-        <a-button size="small" type="primary" class="button-success" @click="handleDetail(record)" id="expenseManagement-detail-btn">详情</a-button>
-        <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="expenseManagement-del-btn">删除</a-button>
+        <a-button
+          size="small"
+          type="primary"
+          v-if="record.state != 'AUDIT_PASS'"
+          class="button-primary"
+          @click="handleEdit(record)"
+          id="expenseManagement-edit-btn">编辑</a-button>
+        <a-button
+          size="small"
+          type="primary"
+          v-if="record.state != 'AUDIT_PASS'"
+          class="button-error"
+          @click="handleDel(record)"
+          id="expenseManagement-del-btn">删除</a-button>
+        <a-button
+          size="small"
+          type="primary"
+          v-if="record.state == 'AUDIT_PASS'"
+          class="button-success"
+          @click="handleDetail(record)"
+          id="expenseManagement-detail-btn">详情</a-button>
       </template>
     </s-table>
     <!-- 详情 -->
@@ -137,11 +152,11 @@ export default {
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '费用单号', dataIndex: 'accountExpensesSn', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '费用类型', dataIndex: 'name', width: 300, align: 'center', customRender: function (text, record) { return [record.expensesTypeSn1, record.expensesTypeSn2, record.expensesTypeSn3].join(' > ') } },
+        { title: '费用类型', dataIndex: 'name', align: 'center', customRender: function (text, record) { return [record.expensesTypeName1, record.expensesTypeName2, record.expensesTypeName3].join(' > ') } },
         { title: '金额', dataIndex: 'settleAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
-        { title: '单据状态', scopedSlots: { customRender: 'auditStatus' }, width: 110, align: 'center' },
-        { title: '结算状态', dataIndex: 'settleState', width: 110, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 450, align: 'center', fixed: 'right' }
+        { title: '单据状态', dataIndex: 'stateDictValue', width: 110, align: 'center' },
+        { title: '结算状态', dataIndex: 'settleStateDictValue', width: 110, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 2 - 3
src/views/productManagement/productInfo/edit.vue

@@ -248,10 +248,9 @@ export default {
         if (res.status == 200) {
           this.productBrandList = res.data
           if (val) { //  需将新增加的品牌回填到产品品牌的地方,即不需要用户再选一下
-            this.form.productBrandSn = this.productBrandList[this.productBrandList.length - 1].brandSn
+            this.form.productBrandSn = this.productBrandList[0].brandSn
+            this.$refs.ruleForm.clearValidate('productBrandSn')
           }
-        } else {
-          this.productBrandList = []
         }
       })
     },