Browse Source

Merge remote-tracking branch 'origin/master'

yu jie 4 years ago
parent
commit
c7dfd60bf6

+ 8 - 2
src/views/manage/business-review/list/settlement/setup.ts

@@ -5,8 +5,8 @@ import { ref } from 'vue';
 
 /**
  * 获取表格列表数据
- * @param type 
- * @returns 
+ * @param type
+ * @returns
  */
 export function queryTableList(type: QueryBusinessJsReq) {
     // 加载状态
@@ -18,6 +18,12 @@ export function queryTableList(type: QueryBusinessJsReq) {
             .then((res) => {
                 tableList.value = res.map((e, i) => {
                     return { ...e, key: String(i) };
+                }).sort((a, b) => {
+                    if (a.applystatus === 1) {
+                        return b.applystatus === 1 ? 0 : -1
+                    } else {
+                        return b.applystatus === 1 ? 1 : 0
+                    }
                 });
                 loading.value = false;
                 console.log('查询列表', tableList);

+ 8 - 2
src/views/manage/business-review/list/someprice/setup.ts

@@ -5,8 +5,8 @@ import { ref } from 'vue';
 
 /**
  * 获取表格列表数据
- * @param type 
- * @returns 
+ * @param type
+ * @returns
  */
 export function queryTableList(type: QueryBusinessDjReq) {
     // 加载状态
@@ -18,6 +18,12 @@ export function queryTableList(type: QueryBusinessDjReq) {
             .then((res) => {
                 tableList.value = res.map((e, i) => {
                     return { ...e, key: String(i) };
+                }).sort((a, b) => {
+                    if (a.applystatus === 1) {
+                        return b.applystatus === 1 ? 0 : -1
+                    } else {
+                        return b.applystatus === 1 ? 1 : 0
+                    }
                 });
                 loading.value = false;
                 console.log('查询列表', tableList);

+ 19 - 2
src/views/manage/finance-review/components/invoiceDetail/index.vue

@@ -63,7 +63,11 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="发票附件">
-              <span class="white">{{ formatValue(selectedRow.attachurl) }}</span>
+              <span class="blue"
+                    v-if="selectedRow.attachurl"
+                    @click="previewImg(selectedRow.attachurl)">查看</span>
+              <span class="white"
+                    v-else>--</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
@@ -82,6 +86,13 @@
       </fieldset>
     </a-form>
   </a-modal>
+  <a-modal :visible="previewVisible"
+           :footer="null"
+           @cancel="cancelImg">
+    <img alt="预览附件"
+         style="width: 100%"
+         :src="previewImage" />
+  </a-modal>
 </template>
 
 <script lang="ts">
@@ -94,6 +105,7 @@ import { formatValue, formatTime } from '@/common/methods';
 import { QryBussinessFpRsp } from '@/services/go/ermcp/finance-review/interface';
 import { invoiceStatusName } from '@/views/manage/finance-review/setup';
 import { getContractTypeName, getPriceTypeName } from '@/common/constants/enumsName';
+import { handlePreviewImg } from '@/common/setup/upload';
 
 export default defineComponent({
     name: 'finance_review_invoice_detail',
@@ -108,7 +120,8 @@ export default defineComponent({
         const { visible, cancel } = closeModal('detail');
         const loading = ref<boolean>(false);
         const maskClosableFlag = ref<boolean>(false);
-
+        // 预览附件
+        const { previewVisible, previewImage, cancelImg, previewImg, getImgName } = handlePreviewImg();
         function submit() {
             context.emit('refresh');
             cancel();
@@ -125,6 +138,10 @@ export default defineComponent({
             invoiceStatusName,
             getPriceTypeName,
             getContractTypeName,
+            previewVisible,
+            previewImage,
+            cancelImg,
+            previewImg,
         };
     },
 });

+ 8 - 2
src/views/manage/finance-review/list/funds/setup.ts

@@ -5,8 +5,8 @@ import { ref } from 'vue';
 
 /**
  * 获取表格列表数据
- * @param type 
- * @returns 
+ * @param type
+ * @returns
  */
 export function queryTableList(type: QueryBusinessKxReq) {
     // 加载状态
@@ -18,6 +18,12 @@ export function queryTableList(type: QueryBusinessKxReq) {
             .then((res) => {
                 tableList.value = res.map((e, i) => {
                     return { ...e, key: String(i) };
+                }).sort((a, b) => {
+                    if (a.applystatus === 1) {
+                        return b.applystatus === 1 ? 0 : -1
+                    } else {
+                        return b.applystatus === 1 ? 1 : 0
+                    }
                 });
                 loading.value = false;
                 console.log('查询列表', tableList);

+ 8 - 2
src/views/manage/finance-review/list/invoice/setup.ts

@@ -6,8 +6,8 @@ import { ref } from 'vue';
 
 /**
  * 获取表格列表数据
- * @param type 
- * @returns 
+ * @param type
+ * @returns
  */
 export function queryTableList(type: QueryBusinessFpReq) {
     // 加载状态
@@ -19,6 +19,12 @@ export function queryTableList(type: QueryBusinessFpReq) {
             .then((res) => {
                 tableList.value = res.map((e, i) => {
                     return { ...e, key: String(i) };
+                }).sort((a, b) => {
+                    if (a.applystatus === 1) {
+                        return b.applystatus === 1 ? 0 : -1
+                    } else {
+                        return b.applystatus === 1 ? 1 : 0
+                    }
                 });
                 loading.value = false;
                 console.log('查询列表', tableList);

+ 6 - 0
src/views/manage/inventory-review/list/setup.ts

@@ -17,6 +17,12 @@ export function queryTableList(type: QueryAreaStockApplyReq) {
             .then((res) => {
                 tableList.value = res.map((e, i) => {
                     return { ...e, key: String(i) };
+                }).sort((a, b) => {
+                    if (a.applystatus === 1) {
+                        return b.applystatus === 1 ? 0 : -1
+                    } else {
+                        return b.applystatus === 1 ? 1 : 0
+                    }
                 });
                 loading.value = false;
                 console.log('查询列表', tableList);