Browse Source

状态修改

lilei 3 years ago
parent
commit
bb1ccb489f
2 changed files with 87 additions and 8 deletions
  1. 57 0
      src/views/common/stateIcon.vue
  2. 30 8
      src/views/salesManagement/salesQuery/list.vue

+ 57 - 0
src/views/common/stateIcon.vue

@@ -0,0 +1,57 @@
+<template>
+  <div>
+    <svg
+      v-if="!state"
+      t="1647850921214"
+      class="icon"
+      viewBox="0 0 1024 1024"
+      version="1.1"
+      xmlns="http://www.w3.org/2000/svg"
+      p-id="40602"
+      :width="width"
+      :height="width"><path d="M923.701666 347.267145C879.363855 243.767909 796.379862 160.783917 692.879604 116.447129c27.989471-22.038946 63.218834-35.294854 101.608166-35.294854 90.854241 0 164.507728 73.652464 164.507728 164.508751C958.995497 284.049335 945.739589 319.277674 923.701666 347.267145zM916.988778 529.220197c0 107.872846-42.348504 205.649753-110.966301 278.364869l56.794517 56.795541c7.516184 7.518231 12.166087 17.898649 12.166087 29.370935 0 22.937408-18.596544 41.532929-41.535999 41.532929-11.468193 0-21.851681-4.64888-29.367865-12.165064l-61.007469-61.006446c-65.823148 45.99045-145.754618 73.17151-232.145198 73.17151-86.219687 0-166.015058-27.063379-231.764528-72.886007l-60.582797 60.581774c-7.603165 7.603165-18.10331 12.30321-29.704532 12.30321-23.198352 0-42.006719-18.807345-42.006719-42.006719 0-11.601222 4.702092-22.102391 12.305257-29.702486l56.338123-56.339146c-68.425416-72.681346-110.648053-170.312944-110.648053-278.015921 0-224.260623 181.800579-406.063249 406.063249-406.063249C735.189222 123.156948 916.988778 304.959573 916.988778 529.220197zM510.927575 207.170386c-177.86392 0-322.051857 144.18589-322.051857 322.04981S333.063655 851.27103 510.927575 851.27103c177.862897 0 322.048787-144.18589 322.048787-322.04981S688.790472 207.170386 510.927575 207.170386zM678.95343 571.227939 510.927575 571.227939c-23.201421 0-42.007743-18.806321-42.007743-42.007743L468.919832 305.186747c0-23.200398 18.806321-42.004673 42.007743-42.004673 23.198352 0 42.006719 18.805298 42.006719 42.004673l0 182.028776 126.020158 0c23.198352 0 42.004673 18.806321 42.004673 42.004673C720.959126 552.421618 702.152804 571.227939 678.95343 571.227939zM98.905614 352.955704C76.394924 324.371692 62.85556 288.388153 62.85556 249.178129c0-92.798523 75.228355-168.025854 168.025854-168.025854 39.209 0 75.194586 13.540388 103.779621 36.050054C228.949412 162.486698 144.189983 247.244081 98.905614 352.955704z" p-id="40603" :fill="color[0]"></path></svg>
+    <svg
+      v-else
+      t="1647852900652"
+      class="icon"
+      viewBox="0 0 1024 1024"
+      version="1.1"
+      xmlns="http://www.w3.org/2000/svg"
+      p-id="50728"
+      :width="width"
+      :height="width"><path d="M422.36247 839.786465c-13.320377 13.421684-34.909068 13.421684-48.126091 0l-10.69355-10.800997 0 0-11.398608-11.502985-50.145074-50.544163c-0.097214-0.201591 0-0.500397-0.201591-0.604774L72.380494 533.085224c-13.320377-13.421684-13.320377-35.218106 0-48.535413l72.132854-72.842005c13.319353-13.408381 34.907021-13.408381 48.224328 0l205.814506 209.252815L831.363631 184.208419c13.218046-13.414521 34.806737-13.414521 48.124044 0l72.134901 72.842005c13.317307 13.408381 13.317307 35.113729 0 48.52211L422.36247 839.786465 422.36247 839.786465z" :fill="color[1]" p-id="50729"></path></svg>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'StateIcon',
+  props: {
+    state: {
+      type: Boolean,
+      default: false
+    },
+    width: {
+      type: String,
+      default: '20'
+    },
+    color: {
+      type: Array,
+      default: function () {
+        return ['#ffbb0f', '#2ac30f']
+      }
+    }
+  },
+  data () {
+    return {
+    }
+  },
+  methods: {
+  },
+  mounted () {
+  }
+}
+</script>
+
+<style>
+</style>

+ 30 - 8
src/views/salesManagement/salesQuery/list.vue

@@ -109,17 +109,34 @@
           <span style="color: #ed1c24;cursor: pointer;" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
           <span v-else>{{ record.salesBillNo }}</span>
         </template>
+        <!-- 审核 -->
+        <template slot="audit" slot-scope="text, record">
+          <stateIcon :state="record.billStatus == 'WAIT_OUT_WAREHOUSE'||record.billStatus == 'FINISH'"></stateIcon>
+        </template>
         <!-- 急件 -->
         <template slot="oosFlag" slot-scope="text, record">
-          <a-tag v-if="record.oosFlag==1" color="red" style="margin-right: 0;" >{{ record.oosFlagDictValue }}</a-tag>
-          <span v-else>{{ record.oosFlagDictValue }}</span>
+          <!-- <a-tag v-if="record.oosFlag==1" color="red" style="margin-right: 0;" >{{ record.oosFlagDictValue }}</a-tag>
+          <span v-else>{{ record.oosFlagDictValue }}</span> -->
+          <stateIcon :state="record.oosFlag==1"></stateIcon>
+        </template>
+        <!-- 出库 -->
+        <template slot="waitOut" slot-scope="text, record">
+          <stateIcon :state="record.billStatus == 'FINISH'"></stateIcon>
+        </template>
+        <!-- 收款 -->
+        <template slot="financial" slot-scope="text, record">
+          <stateIcon :state="record.financialStatus == 'FINISH'"></stateIcon>
+        </template>
+        <!-- 完结 -->
+        <template slot="finish" slot-scope="text, record">
+          <stateIcon :state="record.billStatus == 'FINISH'"></stateIcon>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
             size="small"
             type="link"
-            class="button-warning"
+            class="button-primary"
             v-if="record.billStatus == 'WAIT_AUDIT' && $hasPermissions('B_salesAudit')"
             @click="handleEexamine(record)"
           >审核</a-button>
@@ -133,7 +150,7 @@
           <a-button
             size="small"
             type="link"
-            class="button-info"
+            class="button-primary"
             v-if="((record.salesBillSource == 'SATELLITE' || record.salesBillSource == 'SALES' || record.salesBillSource == 'TEMPORARY_DISPATCHING') && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'AUDIT_REJECT')) && $hasPermissions('B_salesEdit')"
             @click="handleEdit(record)"
           >
@@ -151,7 +168,7 @@
           <a-button
             size="small"
             type="link"
-            class="button-info"
+            class="button-primary"
             v-if="(record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'SUPERIOR_CHANGE')) && $hasPermissions('B_salesEdit')"
             @click="handleEdit(record)"
           >
@@ -188,9 +205,10 @@ import { settleStyleQueryAll } from '@/api/settleStyle'
 import rangeDate from '@/views/common/rangeDate.vue'
 import custList from '@/views/common/custList.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
+import stateIcon from '@/views/common/stateIcon'
 export default {
   name: 'SalesList',
-  components: { STable, VSelect, chooseCustomModal, rangeDate, auditModal, custList },
+  components: { STable, VSelect, chooseCustomModal, rangeDate, auditModal, custList, stateIcon },
   mixins: [commonMixin],
   data () {
     return {
@@ -235,9 +253,13 @@ export default {
         { title: '收款方式', dataIndex: 'settleStyleEntity.name', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核', dataIndex: 'billStatus', scopedSlots: { customRender: 'audit' }, width: '5%', align: 'center' },
         { title: '急件', dataIndex: 'oosFlag', scopedSlots: { customRender: 'oosFlag' }, width: '5%', align: 'center' },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库', dataIndex: 'oosFlag', scopedSlots: { customRender: 'waitOut' }, width: '5%', align: 'center' },
+        { title: '收款', dataIndex: 'oosFlag', scopedSlots: { customRender: 'financial' }, width: '5%', align: 'center' },
+        { title: '完结', dataIndex: 'oosFlag', scopedSlots: { customRender: 'finish' }, width: '5%', align: 'center' },
+        // { title: '业务状态', dataIndex: 'billStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象