Browse Source

提货查询

huangbin 4 years ago
parent
commit
e501c4f197

+ 5 - 0
src/common/constants/buttonType.ts

@@ -111,4 +111,9 @@ export interface ButtonType {
     platinum_recharge_review_refuse: string; // 千海金 充值审核 审核拒绝
     platinum_recharge_review_refuse: string; // 千海金 充值审核 审核拒绝
     platinum_withdrawal_review_confirm_withdrawal: string; // 千海金 提现审核 确认提现
     platinum_withdrawal_review_confirm_withdrawal: string; // 千海金 提现审核 确认提现
     platinum_withdrawal_review_refuse: string; // 千海金 提现审核 审核拒绝
     platinum_withdrawal_review_refuse: string; // 千海金 提现审核 审核拒绝
+
+    platinum_pick_query_complete_stocking: string; // 千海金 提货查询 完成备货
+    platinum_pick_query_upload_logistics: string; // 千海金 提货查询 上传物流
+    platinum_pick_query_receipt: string; // 千海金 提货查询 确认收货
+    platinum_pick_query_confirm_pickup: string; // 千海金 提货查询 确认提货
 }
 }

+ 2 - 1
src/common/setup/table/button.ts

@@ -13,7 +13,8 @@ import { BtnClassName, BtnList, ButtonListKey } from './interface';
 function getClassName(val: string): BtnClassName {
 function getClassName(val: string): BtnClassName {
     let result: BtnClassName = 'btnDeafault'
     let result: BtnClassName = 'btnDeafault'
     const btnDanger = ['disable', 'cancle', 'cancel', 'delete', 'logout', 'locked', 'refuse']
     const btnDanger = ['disable', 'cancle', 'cancel', 'delete', 'logout', 'locked', 'refuse']
-    const operBtn = ['add', 'modify', 'reset', 'credit', 'payment', 'confirm_withdrawal']
+    const operBtn = ['add', 'modify', 'reset', 'credit', 'payment', 'confirm_withdrawal', 'complete_stocking', 'upload_logistics',
+        'receipt', 'confirm_pickup']
     const map = new Map<BtnClassName, string[]>([
     const map = new Map<BtnClassName, string[]>([
         ['btnDanger', btnDanger],
         ['btnDanger', btnDanger],
         ['operBtn', operBtn],
         ['operBtn', operBtn],

+ 1 - 0
src/common/setup/table/interface.ts

@@ -82,5 +82,6 @@ export interface ButtonListKey {
 
 
     platinum_withdrawal_review_tab: string; // 千海金 提现审核
     platinum_withdrawal_review_tab: string; // 千海金 提现审核
     platinum_recharge_review_tab: string; // 千海金 充值审核
     platinum_recharge_review_tab: string; // 千海金 充值审核
+    platinum_pick_query_tab: string; // 千海金 提货查询
 
 
 }
 }

+ 72 - 0
src/views/platinum/platinum_pick_query/compoments/filter/index.vue

@@ -0,0 +1,72 @@
+<template>
+  <!-- 过滤 -->
+  <div class="filterTable">
+    <a-range-picker v-model:value="date"
+                    class="commonPicker"
+                    style="width: 200px"
+                    :show-time="{hideDisabledOptions: true}"
+                    format="YYYY-MM-DD" />
+    <FilterOption :selectList="selectList"
+                  :inputList="inputList"
+                  :fixedBtnList="fixedBtnList" />
+    <slot></slot>
+  </div>
+</template>
+
+<script lang="ts">
+import FilterOption from '@/common/components/filter/index.vue';
+import { defineComponent, ref } from 'vue';
+import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
+import { Moment } from 'moment';
+
+export default defineComponent({
+    name: 'filter-platinum_pick_query',
+    components: { FilterOption },
+    setup(props, context) {
+        const date = ref<Moment[]>([]);
+        const select: SelectList[] = [
+            {
+                value: undefined,
+                key: 'contracttype1',
+                placeholder: '选择提货商品',
+                list: [
+                    { value: 1, lable: '采购' },
+                    { value: -1, lable: '销售' },
+                ],
+            },
+            {
+                value: undefined,
+                key: 'contracttype2',
+                placeholder: '选择提货状态',
+                list: [
+                    { value: 1, lable: '采购' },
+                    { value: -1, lable: '销售' },
+                ],
+            },
+        ];
+        const input: InputList[] = [{ value: '', placeholder: '模糊搜索商品名称', key: 'account' }];
+        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context);
+        return {
+            date,
+            selectList,
+            inputList,
+            fixedBtnList,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.filterTable {
+    .commonPicker.ant-calendar-picker {
+        display: inline-flex;
+        padding-top: 9px;
+        padding-bottom: 6px;
+        margin-right: 10px;
+        .ant-input {
+            border: 0;
+            background: @m-grey9;
+        }
+    }
+}
+</style>;

+ 91 - 0
src/views/platinum/platinum_pick_query/list/tab/compoments/common-detail/index.vue

@@ -0,0 +1,91 @@
+<template>
+  <div>
+    <Des :list="desList" />
+  </div>
+
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType, watchEffect } from 'vue';
+import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
+import { getStatusName } from '@/common/constants/enumsName';
+import { formatValue } from '@/common/methods';
+import { getCardTypeEnumItemName } from '@/common/constants/enumsName';
+import { Des, handleDesList } from '@/common/components/commonDes';
+import { handlePreviewImg } from '@/common/setup/upload';
+
+export default defineComponent({
+    name: 'custom-detail-desc',
+    components: { Des },
+    props: {
+        selectedRow: {
+            type: Object as PropType<QueryCustomInfoType>,
+            default: {},
+        },
+    },
+    setup(props) {
+        function isPersonal() {
+            return props.selectedRow.userinfotype === '1';
+        }
+        const { desList, getDesList } = handleDesList();
+        // 预览附件
+        const { previewVisible, previewImage, cancelImg, previewImg, getImgName } = handlePreviewImg();
+
+        watchEffect(() => {
+            if (props.selectedRow.customername) {
+                const data = props.selectedRow;
+                // 个人
+                const person = [
+                    { label: '客户类型', value: '个人' },
+                    { label: '姓名', value: data.customername },
+                    { label: '身份证号码', value: formatValue(data.cardnum) },
+                    { label: '手机号码', value: formatValue(data.mobile) },
+                    { label: '身份证正面照', value: formatValue(getImgName(data.cardfrontphotourl)), className: 'blue' },
+                    { label: '身份证反面照', value: formatValue(getImgName(data.cardbackphotourl)), className: 'blue' },
+                    { label: '邮箱', value: formatValue(data.email) },
+                    { label: '联系电话', value: formatValue(data.telphone) },
+                    { label: '通讯地址', value: formatValue(data.address) },
+                    { label: '备注', value: formatValue(data.remark) },
+                ];
+                // 企业
+                const company = [
+                    { label: '客户类型', value: '企业' },
+                    { label: '企业名称', value: data.customername },
+                    { label: '企业简称', value: formatValue(data.nickname) },
+                    { label: '证件类型', value: getCardTypeEnumItemName(data.cardtype) },
+                    { label: '法定代表人', value: formatValue(data.legalpersonname) },
+                    { label: '证件号码', value: formatValue(data.cardnum) },
+                    { label: '纳税人识别号', value: formatValue(data.taxpayernum) },
+                    { label: '营业执照', value: formatValue(getImgName(data.attachment1)), className: 'blue' },
+                    { label: '联系人', value: formatValue(data.contactname) },
+                    { label: '联系人手机号', value: formatValue(data.mobile) },
+                    { label: '联系电话', value: formatValue(data.telphone) },
+                    { label: '状态', value: getStatusName(data.status), className: 'green' },
+                    { label: '通讯地址', value: formatValue(data.address) },
+                    { label: '备注', value: formatValue(data.remark) },
+                ];
+                getDesList(isPersonal() ? person : company);
+            }
+        });
+        return {
+            desList,
+            previewVisible,
+            previewImage,
+            cancelImg,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.custom-detail {
+    .ant-form.inlineForm {
+        margin-top: 20px;
+    }
+    .upload {
+        .look {
+            margin-left: 0;
+        }
+    }
+}
+</style>;

+ 44 - 0
src/views/platinum/platinum_pick_query/list/tab/compoments/complete_stocking/index.vue

@@ -0,0 +1,44 @@
+<template>
+  <!-- 提货查询 完成备货-->
+  <a-modal class="add-custom custom-detail"
+           title="完成备货"
+           centered
+           v-model:visible="visible"
+           :maskClosable="false"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading.loading"
+                @click="cancel">关闭</a-button>
+    </template>
+    <CommomDetail :selectedRow="selectedRow" />
+  </a-modal>
+</template>
+<script lang="ts">
+import { defineComponent, PropType, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
+import CommomDetail from '../common-detail/index.vue';
+
+export default defineComponent({
+    name: 'platinum_pick_query_complete_stocking',
+    components: { CommomDetail },
+    props: {
+        selectedRow: {
+            type: Object as PropType<QueryCustomInfoType>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        const { visible, cancel } = closeModal('platinum_pick_query_complete_stocking');
+        const loading = ref<boolean>(false);
+        return {
+            cancel,
+            visible,
+            loading,
+        };
+    },
+});
+</script>

+ 44 - 0
src/views/platinum/platinum_pick_query/list/tab/compoments/confirm_pickup/index.vue

@@ -0,0 +1,44 @@
+<template>
+  <!-- 提货查询 确认提货-->
+  <a-modal class="add-custom custom-detail"
+           title="确认提货"
+           centered
+           v-model:visible="visible"
+           :maskClosable="false"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading.loading"
+                @click="cancel">关闭</a-button>
+    </template>
+    <CommomDetail :selectedRow="selectedRow" />
+  </a-modal>
+</template>
+<script lang="ts">
+import { defineComponent, PropType, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
+import CommomDetail from '../common-detail/index.vue';
+
+export default defineComponent({
+    name: 'platinum_pick_query_confirm_pickup',
+    components: { CommomDetail },
+    props: {
+        selectedRow: {
+            type: Object as PropType<QueryCustomInfoType>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        const { visible, cancel } = closeModal('platinum_pick_query_confirm_pickup');
+        const loading = ref<boolean>(false);
+        return {
+            cancel,
+            visible,
+            loading,
+        };
+    },
+});
+</script>

+ 57 - 0
src/views/platinum/platinum_pick_query/list/tab/compoments/controlModal/index.vue

@@ -0,0 +1,57 @@
+<template>
+  <div>
+    <!-- 详情 -->
+    <Detail :selectedRow="selectedRow" />
+    <!-- 完成备货- -->
+    <CompleteStocking :selectedRow="selectedRow" />
+    <!-- 确认提货 -->
+    <ConfirmPickup :selectedRow="selectedRow" />
+    <!-- 确认收货 -->
+    <Receipt :selectedRow="selectedRow" />
+    <!-- 上传物流 -->
+    <UploadLogistics :selectedRow="selectedRow" />
+  </div>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType } from 'vue';
+import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
+import Detail from '../detail/index.vue';
+import CompleteStocking from '../complete_stocking/index.vue';
+import ConfirmPickup from '../confirm_pickup/index.vue';
+import Receipt from '../query_receipt/index.vue';
+import UploadLogistics from '../upload_logistics/index.vue';
+
+export default defineComponent({
+    name: 'custom-control-modal',
+    components: { Detail, CompleteStocking, ConfirmPickup, Receipt, UploadLogistics },
+    props: {
+        selectedRow: {
+            type: Object as PropType<QueryCustomInfoType>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        function refresh() {
+            context.emit('context');
+        }
+        return {
+            refresh,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.custom-detail {
+    .ant-form.inlineForm {
+        margin-top: 20px;
+    }
+    .upload {
+        .look {
+            margin-left: 0;
+        }
+    }
+}
+</style>;
+

+ 44 - 0
src/views/platinum/platinum_pick_query/list/tab/compoments/detail/index.vue

@@ -0,0 +1,44 @@
+<template>
+  <!-- 提货查询详情-->
+  <a-modal class="add-custom custom-detail"
+           title="提货查询详情"
+           centered
+           v-model:visible="visible"
+           :maskClosable="false"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading.loading"
+                @click="cancel">关闭</a-button>
+    </template>
+    <CommomDetail :selectedRow="selectedRow" />
+  </a-modal>
+</template>
+<script lang="ts">
+import { defineComponent, PropType, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
+import CommomDetail from '../common-detail/index.vue';
+
+export default defineComponent({
+    name: 'platinum_withdrawal_review_detail-desc',
+    components: { CommomDetail },
+    props: {
+        selectedRow: {
+            type: Object as PropType<QueryCustomInfoType>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        const { visible, cancel } = closeModal('detail');
+        const loading = ref<boolean>(false);
+        return {
+            cancel,
+            visible,
+            loading,
+        };
+    },
+});
+</script>

+ 44 - 0
src/views/platinum/platinum_pick_query/list/tab/compoments/query_receipt/index.vue

@@ -0,0 +1,44 @@
+<template>
+  <!-- 提货查询 确认收货-->
+  <a-modal class="add-custom custom-detail"
+           title="确认收货"
+           centered
+           v-model:visible="visible"
+           :maskClosable="false"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading.loading"
+                @click="cancel">关闭</a-button>
+    </template>
+    <CommomDetail :selectedRow="selectedRow" />
+  </a-modal>
+</template>
+<script lang="ts">
+import { defineComponent, PropType, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
+import CommomDetail from '../common-detail/index.vue';
+
+export default defineComponent({
+    name: 'platinum_pick_query_receipt',
+    components: { CommomDetail },
+    props: {
+        selectedRow: {
+            type: Object as PropType<QueryCustomInfoType>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        const { visible, cancel } = closeModal('platinum_pick_query_receipt');
+        const loading = ref<boolean>(false);
+        return {
+            cancel,
+            visible,
+            loading,
+        };
+    },
+});
+</script>

+ 44 - 0
src/views/platinum/platinum_pick_query/list/tab/compoments/upload_logistics/index.vue

@@ -0,0 +1,44 @@
+<template>
+  <!-- 提货查询 上传物流-->
+  <a-modal class="add-custom custom-detail"
+           title="上传物流"
+           centered
+           v-model:visible="visible"
+           :maskClosable="false"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading.loading"
+                @click="cancel">关闭</a-button>
+    </template>
+    <CommomDetail :selectedRow="selectedRow" />
+  </a-modal>
+</template>
+<script lang="ts">
+import { defineComponent, PropType, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
+import CommomDetail from '../common-detail/index.vue';
+
+export default defineComponent({
+    name: 'platinum_pick_query_upload_logistics',
+    components: { CommomDetail },
+    props: {
+        selectedRow: {
+            type: Object as PropType<QueryCustomInfoType>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        const { visible, cancel } = closeModal('platinum_pick_query_upload_logistics');
+        const loading = ref<boolean>(false);
+        return {
+            cancel,
+            visible,
+            loading,
+        };
+    },
+});
+</script>

+ 81 - 3
src/views/platinum/platinum_pick_query/list/tab/index.vue

@@ -1,8 +1,86 @@
 <template>
 <template>
   <!-- 提货查询 -->
   <!-- 提货查询 -->
-  <div>platinum_pick_query_tab</div>
+  <div class="platinum_pick_query_tab">
+    <Filter />
+    <contextMenu :contextMenuList="firstBtn">
+      <a-table :columns="columns"
+               class="topTable hiddenFirstCol"
+               :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               rowKey="key"
+               :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="firstBtn"
+                   @onClick="btnClick" />
+        </template>
+      </a-table>
+    </contextMenu>
+    <ControlModal :selectedRow="selectedRow" />
+  </div>
 </template>
 </template>
 
 
 <script lang="ts">
 <script lang="ts">
-export default {};
-</script>
+import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList, _getBtnList } from '@/common/export/table';
+import { ErmcpWareHouseInfo } from '@/views/information/warehouse-info/list';
+import Filter from '../../compoments/filter/index.vue';
+import { queryTableList } from './setup';
+import ControlModal from './compoments/controlModal/index.vue';
+
+export default defineComponent({
+    name: 'platinum_pick_query_tab',
+    components: { Filter, contextMenu, BtnList, ControlModal },
+    setup() {
+        // 表头数据
+        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
+        // 表格事件
+        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<ErmcpWareHouseInfo>({});
+        // 表格操作按钮列表
+        const [firstBtn] = _getBtnList('platinum_pick_query_tab', true).value;
+        // 表格列表数据
+        const { loading, tableList, queryTable } = queryTableList('in');
+        initData(() => {
+            // 获取列表数据
+            queryTable();
+            // 注册表头信息 过滤
+            registerColumn('table_pcweb_warehouse', ['warehousetype', 'warehousename', 'address']);
+            // registerColumn('table_pcweb_qhj_withdrawal_review', ['warehousetype', 'warehousename', 'address']);
+        });
+
+        // 查询
+        function search(value: any) {
+            filteredInfo.value = value;
+            // 更新表信息
+            updateColumn();
+        }
+
+        return {
+            columns,
+            filteredInfo,
+            expandedRowKeys,
+            selectedRow,
+            Rowclick,
+            firstBtn,
+            loading,
+            tableList,
+            search,
+            queryTable,
+            btnClick,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.platinum_recharge_review_tab {
+    .topTable {
+        .operBtn.ant-btn {
+            margin-top: 0;
+            margin-bottom: 0;
+            height: 26px;
+            line-height: 26px;
+        }
+    }
+}
+</style>;

+ 51 - 0
src/views/platinum/platinum_pick_query/list/tab/setup.ts

@@ -0,0 +1,51 @@
+import { QueryWareHouse } from '@/services/go/ermcp/warehouse-info/index';
+import { ErmcpWareHouseInfo } from '@/services/go/ermcp/warehouse-info/interface';
+import { message } from 'ant-design-vue';
+import { ref } from 'vue';
+
+
+
+/**
+ * 获取表格列表数据
+ * @param type 
+ * @returns 
+ */
+export function queryTableList(type: string) {
+    // 加载状态
+    const loading = ref<boolean>(false);
+    // 表格数据
+    const tableList = ref<ErmcpWareHouseInfo[]>([]);
+    function queryTable() {
+        QueryWareHouse('1')
+            .then((res) => {
+                tableList.value = res.map((e, i) => {
+                    return { ...e, key: String(i) };
+                });
+                loading.value = false;
+                console.log('查询列表', tableList);
+            })
+            .catch((err) => {
+                message.error(err);
+                loading.value = false;
+            });
+    }
+    return { loading, tableList, queryTable }
+}
+
+// export function queryTableList(type: 'in' | 'out') {
+//     // 加载状态
+//     const loading = ref<boolean>(false);
+//     // 表格数据
+//     const tableList = ref<QhjAccountOutInApply[]>([]);
+//     function queryTable() {
+//         queryResultLoadingAndInfo(queryAccountInOutApply, loading)
+//             .then(res => {
+//                 //申请类型 - 1:出金 2:入金 3: 单边账调整:入金; 4:单边账调整:出金 5:外部母账户调整:入金 6:外部母账户调整:出金 7:外部子账户:入金 8:外部子账户:出金
+//                 const arr = type === 'in' ? [1, 3, 5, 7] : [2, 4, 6, 8]
+//                 tableList.value = res.filter((e: QhjAccountOutInApply) => arr.includes(e.executetype)).map((e: QhjAccountOutInApply, i: number) => {
+//                     return { ...e, key: String(i) };
+//                 });
+//             })
+//     }
+//     return { loading, tableList, queryTable }
+// }

+ 0 - 2
src/views/platinum/platinum_recharge_withdrawal_review/list/recharge/index.vue

@@ -1,5 +1,3 @@
-
-
 <template>
 <template>
   <!-- 充值审核 -->
   <!-- 充值审核 -->
   <div class="platinum_recharge_review_tab">
   <div class="platinum_recharge_review_tab">