huangbin 4 سال پیش
والد
کامیت
0f8ed5727f

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

@@ -32,4 +32,24 @@ export interface ButtonType {
     sell_pending_invoice: string; // 销售 发票登记
     sell_pending_storage: string; // 销售 出库登记
 
+    plan_uncommitted_recommit: string; // 计划 重新提交
+    plan_uncommitted_modif: string; // 计划 修改
+    plan_audit_audit: string; // 计划 审核
+
+    business_review_someprice_audit: string; // 点价 审核
+    business_review_someprice_cancel: string; // 点价 撤销
+
+    business_review_settlement_audit: string; // 交收 审核
+    business_review_settlement_cancel: string; // 交收 撤销
+
+    finance_review_funds_audit: string; // 款项 审核
+    finance_review_funds_cancel: string; // 款项 撤销
+
+    finance_review_invoice_audit: string; // 发票 审核
+    finance_review_invoice_cancel: string; // 发票 撤销
+
+    inventory_review_checkin_audit: string; // 入库 审核
+    inventory_review_checkin_cancel: string; // 入库 撤销
+    inventory_review_checkout_audit: string; // 出库 审核
+    inventory_review_checkout_cancel: string; // 出库 撤销
 }

+ 11 - 0
src/common/methods/format/index.ts

@@ -63,3 +63,14 @@ export const formatData = (date: string) => {
     if (date) return moment(date).format('YYYY-MM-DD');
     return date;
 };
+
+/**
+ * 格式化空字符情况,如果传入字符串且为空时候返回 --,传入数字且为空时候 返回 0,其它返回本身
+ */
+export function formartValue(value: number | string) {
+    if (typeof value === 'number') {
+        return value ? value : 0;
+    } else {
+        return value ? value : '--'
+    }
+}

+ 16 - 0
src/common/setup/buttonPermission/interface.ts

@@ -23,6 +23,22 @@ export interface MenuType {
     exposure_futures: string;   //期货头寸
     exposure_history: string;   //历史敞口
 
+    business_review_someprice: string; // 业务审核 点价
+    business_review_settlement: string; // 业务审核 交收
+
+    finance_review_funds: string; // 财务审核 款项
+    finance_review_invoice: string; // 财务审核 发票
+
+    inventory_review_checkin: string; // 库存审核 入库
+    inventory_review_checkout: string; // 财务审核 出库
+
+    inventory_current: string; // 库存查询 当前库存
+    inventory_applyrecord: string; // 库存查询 申请记录
+
+    finance_report_finance: string; // 财务报表
+    exposure_report_exposure: string; // 敞口报表
+    spot_report_spot: string; // 现货报表
+    inventory_report_inventory: string; // 库存报表
 }
 
 export interface BtnType {

+ 2 - 1
src/common/setup/contextMenu/index.ts

@@ -28,10 +28,11 @@ function getClassName(val: string): BtnClassName {
 export function getBtnList(menuType: keyof MenuType, hasDetail: boolean) {
     // 获取 数据
     const permissionData = inject('thirdMenuList') as Ref<OperationTabMenu[]>;
+    // debugger
     const name = 'permissionData'
     // 存入sessionStorageUtil 是为了处理页面刷新的情况(这个时候重新从服务获取数据,但页面已经先加载了,vue 中的 依赖注入在异步中不能建立通信)
     const data: OperationTabMenu[] = permissionData.value.length ? permissionData.value : sessionStorageUtil.getItem(name)
-    sessionStorageUtil.setItem(name, permissionData.value)
+    sessionStorageUtil.setItem(name, data)
 
     const commonBtn = ref<BtnList[]>([]); // 通用按钮列表,不用选中数据才显示
     const forDataBtn = ref<BtnList[]>([]); // 针对数据按钮列表,选中某条数据才显示

+ 8 - 4
src/common/setup/event/index.ts

@@ -1,12 +1,15 @@
-import { ref } from 'vue';
+import { reactive, ref } from 'vue';
 
 export function handleTableEvent<T>(clickCB?: Function) {
     const expandedRowKeys = ref<string[]>([]); // 表格展开行
-    const selectedRow = ref<T>()
+    const selectedRow = reactive({})
     function Rowclick(record: T, index: number) {
         return {
             onClick: () => {  // 表格点击
-                selectedRow.value = record;
+                Object.assign(selectedRow, record)
+                console.log('selectedRow', selectedRow);
+
+                // selectedRow.value = record;
                 const value = expandedRowKeys.value;
                 expandedRowKeys.value = value.length ? [] : [`${index}`];
                 clickCB && clickCB()
@@ -15,7 +18,8 @@ export function handleTableEvent<T>(clickCB?: Function) {
             //     console.log('onDblclick');
             // },
             onContextmenu: () => {  // 表格右键
-                selectedRow.value = record;
+                // selectedRow.value = record;
+                Object.assign(selectedRow, record)
             },
         };
     }

+ 4 - 4
src/router/index.ts

@@ -311,11 +311,11 @@ const routes: Array<RouteRecordRaw> = [
                 meta: {
                     requireAuth: true,
                 },
-                redirect: { name: EnumType.Plan.uncommitted },
+                redirect: { name: 'plan_uncommitted' },
                 children: [
                     {
                         path: '/plan/pending',
-                        name: EnumType.Plan.uncommitted,
+                        name: 'plan_uncommitted',
                         component: () => import('@/views/business/plan/list/uncommitted/index.vue'),
                         meta: {
                             requireAuth: true,
@@ -323,7 +323,7 @@ const routes: Array<RouteRecordRaw> = [
                     },
                     {
                         path: '/plan/audit',
-                        name: EnumType.Plan.audit,
+                        name: 'plan_audit_audit',
                         component: () => import('@/views/business/plan/list/audit/index.vue'),
                         meta: {
                             requireAuth: true,
@@ -331,7 +331,7 @@ const routes: Array<RouteRecordRaw> = [
                     },
                     {
                         path: '/plan/running',
-                        name: EnumType.Plan.running,
+                        name: 'plan_running',
                         component: () => import('@/views/business/plan/list/running/index.vue'),
                         meta: {
                             requireAuth: true,

+ 221 - 0
src/views/business/plan/compoments/add/index.vue

@@ -0,0 +1,221 @@
+<template>
+  <!-- 新增客户资料 -->
+  <a-modal class="add-custom"
+           title="新增客户资料"
+           v-model:visible="visible"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">完成</a-button>
+    </template>
+    <a-form class="inlineForm"
+            :form="form"
+            @submit="handleSearch">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="客户类型">
+            <a-select class="typeSelect"
+                      style="width: 200px"
+                      placeholder="请选择客户类型">
+              <a-select-option value="1">
+                客户一
+              </a-select-option>
+              <a-select-option value="2">
+                客户二
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="企业名称">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入企业名称" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="企业简称">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入企业简称" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="证件类型">
+            <a-select class="inlineFormSelect"
+                      style="width: 200px"
+                      placeholder="请选择证件类型">
+              <a-select-option value="1">
+                客户一
+              </a-select-option>
+              <a-select-option value="2">
+                客户二
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="法定代表人">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入法定代表人" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="证件号码">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入证件号码" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="纳税人识别号">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入纳税人识别号" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="营业执照">
+            <div class="upload">
+              <a-upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
+                        :transform-file="transformFile">
+                <a-button class="uploadBtn">上传</a-button>
+              </a-upload>
+              <div class="look">查看附件</div>
+            </div>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="联系人">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入联系人" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="联系人手机号">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入联系人手机号" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="联系电话">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入联系电话" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item>
+            &nbsp;
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="24">
+          <a-form-item label="通讯地址">
+            <a-select class="inlineFormSelect"
+                      style="width: 205px"
+                      placeholder="请选择省">
+              <a-select-option value="1">
+                客户一
+              </a-select-option>
+              <a-select-option value="2">
+                客户二
+              </a-select-option>
+            </a-select>
+            <a-select class="inlineFormSelect"
+                      style="width: 205px"
+                      placeholder="请选择市">
+              <a-select-option value="1">
+                客户一
+              </a-select-option>
+              <a-select-option value="2">
+                客户二
+              </a-select-option>
+            </a-select>
+            <a-select class="inlineFormSelect"
+                      style="width: 205px"
+                      placeholder="请选择县(区)">
+              <a-select-option value="1">
+                客户一
+              </a-select-option>
+              <a-select-option value="2">
+                客户二
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="24">
+          <a-form-item label="&nbsp;">
+            <a-input class="dialogInput"
+                     style="width: 635px"
+                     placeholder="请输入详细地址" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="24">
+          <a-form-item label="备注">
+            <a-input class="dialogInput"
+                     style="width: 635px"
+                     placeholder="请输入备注" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { initData } from '@/common/methods/index';
+
+export default defineComponent({
+    name: 'add-custom',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('custom_info_btn_add');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        initData(() => {});
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.add-custom {
+  
+}
+</style
+>;

+ 48 - 0
src/views/business/plan/compoments/delete/index.vue

@@ -0,0 +1,48 @@
+<template>
+  <!-- 恢复客户资料-->
+  <a-modal class="recover-custom"
+           title="恢复客户资料"
+           v-model:visible="visible"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">完成</a-button>
+    </template>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'recover-custom',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('custom_info_btn_delete');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.recover-custom {
+}
+</style
+>;

+ 170 - 0
src/views/business/plan/compoments/detail/index.vue

@@ -0,0 +1,170 @@
+<template>
+  <!-- 客户资料详情-->
+  <a-modal class="add-custom custom-detail"
+           title="客户资料详情"
+           v-model:visible="visible"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">关闭</a-button>
+    </template>
+    <a-form class="inlineForm"
+            :form="form"
+            @submit="handleSearch">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="客户类型">
+            <span class="white">{{ detail.userinfotype === '2' ? '企业' : '个人' }}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="企业名称">
+            <span class="white">{{ detail.customername }}</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="企业简称">
+            <span class="white">{{ detail.nickname }}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="证件类型">
+            <span class="white">{{ detail.cardtypename }}</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="法定代表人">
+            <span class="white">{{ detail.legalpersonname }}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="证件号码">
+            <span class="white">{{ detail.cardnum }}</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="纳税人识别号">
+            <span class="white">{{ detail.taxpayernum }}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="营业执照">
+            <div class="upload">
+                <div class="look">查看附件</div>
+            </div>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="联系人">
+            <span class="white">{{ detail.contactname }}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="联系人手机号">
+            <span class="white">{{ detail.mobile }}</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="联系电话">
+            <span class="white">{{ detail.telphone }}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="状态">
+            <span class="green">{{ detail.status }}</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="24">
+          <a-form-item label="通讯地址">
+            <span class="white">{{ detail.address }}</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="24">
+          <a-form-item label="备注">
+            <span class="white">{{ detail.remark }}</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType, reactive, ref, watchEffect } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
+import { mergeObj } from '@/utils/objHandle';
+import {getStatusName} from "@/views/information/custom/setup";
+
+export default defineComponent({
+    name: 'custom-detail',
+    components: {},
+    props: {
+        selectedRow: {
+            type: Object as PropType<QueryCustomInfoType>,
+            default: {},
+        },
+    },
+    setup(props) {
+        const { visible, cancel } = closeModal('detail');
+        const detail = reactive({
+            nickname: props.selectedRow.nickname || '--',
+            userinfotype: props.selectedRow.userinfotype || '--',
+            customername: props.selectedRow.customername || '--',
+            cardtypename: props.selectedRow.cardtypename || '--',
+            legalpersonname: props.selectedRow.legalpersonname || '--',
+            cardnum: props.selectedRow.cardnum || '--',
+            taxpayernum: props.selectedRow.taxpayernum || '--',
+            contactname: props.selectedRow.contactname || '--',
+            mobile: props.selectedRow.mobile || '--',
+            telphone: props.selectedRow.telphone || '--',
+            status: getStatusName(props.selectedRow.status) || '--',
+            address: props.selectedRow.address || '--',
+            remark: props.selectedRow.remark || '--'
+        });
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+            detail,
+        };
+    },
+
+});
+
+
+</script>
+
+<style lang="less">
+.custom-detail {
+    .ant-form.inlineForm {
+        margin-top: 20px;
+    }
+}
+</style>;

+ 140 - 0
src/views/business/plan/compoments/disable/index.vue

@@ -0,0 +1,140 @@
+<template>
+  <!-- 停用客户资料-->
+  <a-modal class="commonModal warehouse-disable"
+           title="停用客户资料"
+           v-model:visible="visible"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                class="cancelBtn"
+                @click="cancel">取消</a-button>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">确认停用</a-button>
+    </template>
+    <a-form class="inlineForm"
+            :form="form"
+            @submit="handleSearch">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="客户类型">
+            <span class="white">企业</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="企业名称">
+            <span class="white">深圳市前海矿业有限公司</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="企业简称">
+            <span class="white">前海矿业</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="证件类型">
+            <span class="white">营业执照</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="法定代表人">
+            <span class="white">李顺利</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="证件号码">
+            <span class="white">4328648236492432</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="纳税人识别号">
+            <span class="white">57465736DR46456</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="营业执照">
+            <a class="blue">查看附件</a>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="联系人">
+            <span class="white">王平</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="联系人手机号">
+            <span class="white">13745653421</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="联系电话">
+            <span class="white">0755-34342544</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="状态">
+            <span class="green">正常</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="24">
+          <a-form-item label="通讯地址">
+            <span class="white">广东省深圳市南山区前海街道路平路1324号</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="24">
+          <a-form-item label="备注">
+            <span class="white">无</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'custom-disable',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('custom_info_btn_disable');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.arehouse-disable {
+}
+</style>

+ 109 - 0
src/views/business/plan/compoments/filterTable/index.vue

@@ -0,0 +1,109 @@
+<template>
+  <!-- 过滤客户资料表格 -->
+  <div class="filter-custom-table">
+    <a-select label-in-value
+              class="conditionSelect"
+              style="width: 120px"
+              v-model:value="userinfotype"
+              placeholder="全部客户类型"
+              @change="handleChange">
+      <a-select-option value="1">个人</a-select-option>
+      <a-select-option value="2">企业</a-select-option>
+    </a-select>
+    <a-input v-model:value="nickname"
+             class="tableConditionInput"
+             placeholder="模糊搜索客户简称" />
+    <a-input v-model:value="name"
+             class="tableConditionInput"
+             placeholder="模糊搜索客户名称" />
+    <a-input v-model:value="phone"
+             class="tableConditionInput"
+             placeholder="模糊搜索手机号码" />
+    <a-button class="selectBtn"
+              @click="search">查询</a-button>
+    <a-button class="selectBtn"
+              @click="reset">重置</a-button>
+    <slot></slot>
+  </div>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref, SetupContext } from 'vue';
+
+// 搜索
+function handleSearch(context: SetupContext) {
+    const nickname = ref<string>('');
+    const name = ref<string>('');
+    const phone = ref<string>('');
+    interface Value {
+        key: string;
+        value: string;
+    }
+    let useType = '';
+    const userinfotype = ref<number | undefined>(undefined);
+    function handleChange(value: Value) {
+        useType = value.value;
+        search();
+    }
+    function search() {
+        const result = { nickname: [nickname.value], name: [name.value], mobile: [phone.value], userinfotype: [useType] };
+        context.emit('search', result);
+    }
+    function reset() {
+        nickname.value = '';
+        name.value = '';
+        phone.value = '';
+        userinfotype.value = undefined;
+        useType = '';
+        search();
+    }
+
+    return { nickname, name, phone, search, reset, userinfotype, handleChange };
+}
+
+export default defineComponent({
+    name: 'filter-custom-table',
+    components: {},
+    setup(props, context) {
+        return {
+            ...handleSearch(context),
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.filter-custom-table {
+    width: 100%;
+    display: inline-flex;
+    padding-top: 9px;
+    padding-bottom: 6px;
+    .ant-select-single:not(.ant-select-customize-input) {
+        margin-right: 10px;
+        // background: #252D34;
+        // .rounded-corners(3px);
+        .ant-select-selector {
+            height: 30px;
+            padding: 0 8px;
+            background: @m-grey9;
+            border: none;
+            .rounded-corners(3px);
+            color: @m-grey10;
+            .ant-select-arrow {
+                right: 8px;
+                color: @m-grey1;
+            }
+        }
+        .ant-select-arrow {
+            color: @m-grey1;
+        }
+        .ant-select-selection-item {
+            color: @m-white1;
+        }
+    }
+    .conditionSelect + .conditionSelect {
+        margin-left: 10px;
+    }
+    
+}
+</style>;

+ 252 - 0
src/views/business/plan/compoments/modify/index.vue

@@ -0,0 +1,252 @@
+<template>
+  <!-- 修改客户资料 -->
+  <a-modal class="commonModal modify-custom"
+           title="修改客户资料"
+           v-if="visible"
+           v-model:visible="visible"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">完成</a-button>
+    </template>
+    <a-form class="inlineForm"
+            :form="form"
+            @submit="handleSearch">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="客户类型">
+            <a-select class="typeSelect"
+                      style="width: 200px"
+                      placeholder="请选择客户类型">
+              <a-select-option value="1">
+                客户一
+              </a-select-option>
+              <a-select-option value="2">
+                客户二
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="企业名称">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入企业名称" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="企业简称">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入企业简称" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="证件类型">
+            <a-select class="inlineFormSelect"
+                      style="width: 200px"
+                      placeholder="请选择证件类型">
+              <a-select-option value="1">
+                客户一
+              </a-select-option>
+              <a-select-option value="2">
+                客户二
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="法定代表人">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入法定代表人" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="证件号码">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入证件号码" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="纳税人识别号">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入纳税人识别号" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="营业执照">
+            <div class="upload">
+              <a-upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
+                        :transform-file="transformFile">
+                <a-button class="uploadBtn">上传</a-button>
+              </a-upload>
+              <div class="look">查看附件</div>
+            </div>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="联系人">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入联系人" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="联系人手机号">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入联系人手机号" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="联系电话">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入联系电话" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item>
+            &nbsp;
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="24">
+          <a-form-item label="通讯地址">
+            <a-select class="inlineFormSelect"
+                      style="width: 205px"
+                      placeholder="请选择省">
+              <a-select-option value="1">
+                客户一
+              </a-select-option>
+              <a-select-option value="2">
+                客户二
+              </a-select-option>
+            </a-select>
+            <a-select class="inlineFormSelect"
+                      style="width: 205px"
+                      placeholder="请选择市">
+              <a-select-option value="1">
+                客户一
+              </a-select-option>
+              <a-select-option value="2">
+                客户二
+              </a-select-option>
+            </a-select>
+            <a-select class="inlineFormSelect"
+                      style="width: 205px"
+                      placeholder="请选择县(区)">
+              <a-select-option value="1">
+                客户一
+              </a-select-option>
+              <a-select-option value="2">
+                客户二
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="24">
+          <a-form-item label="&nbsp;">
+            <a-input class="dialogInput"
+                     style="width: 635px"
+                     placeholder="请输入详细地址" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="24">
+          <a-form-item label="备注">
+            <a-input class="dialogInput"
+                     style="width: 635px"
+                     placeholder="请输入备注" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { initData } from '@/common/methods/index';
+
+export default defineComponent({
+    name: 'modify-custom',
+    components: {},
+    props: {
+        // selectedRow: {
+        //   type:
+        // }
+    },
+    setup() {
+        // const { visible, cancel } = closeModal('modifyCustomInfo');
+        const { visible, cancel } = closeModal('custom_info_btn_modify');
+
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        initData(() => {});
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.modify-custom {
+    .upload {
+        display: inline-flex;
+        .ant-btn.uploadBtn {
+            width: 60px;
+            height: 30px;
+            background: @m-blue0;
+            border: 0;
+            padding: 0;
+            text-align: center;
+            font-size: 14px;
+            color: @m-white0;
+            .rounded-corners(3px);
+            &:hover {
+                background: rgba(@m-blue0, 0);
+                color: rgba(@m-white0, 0.8);
+            }
+        }
+        .look {
+            color: @m-blue0;
+            font-size: 14px;
+            margin-left: 10px;
+            cursor: pointer;
+        }
+    }
+}
+</style
+>;

+ 48 - 0
src/views/business/plan/compoments/recover/index.vue

@@ -0,0 +1,48 @@
+<template>
+  <!-- 恢复客户资料-->
+  <a-modal class="modify-custom"
+           title="恢复客户资料"
+           v-model:visible="visible"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">完成</a-button>
+    </template>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'modify-custom',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('custom_info_btn_recover');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.modify-custom {
+}
+</style
+>;

+ 67 - 73
src/views/business/plan/list/audit/index.vue

@@ -1,83 +1,77 @@
 <template>
-    <!-- 采购: 历史敞口-->
-    <div class="purchase-history">
-        采购:历史敞口
-    </div>
+  <!-- 计划: 未提交-->
+  <div class="plan_uncommitted"
+       :loading="loading">
+    <filterCustomTable @search="search">
+      <BtnList :btnList="commonBtn" />
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns"
+               class="topTable"
+               :pagination="false"
+               rowKey="key"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               :data-source="spotContractList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
+        <!-- <template #userinfotype="{ text }">
+          <a>{{ text === '2' ? '企业' : '个人'}}</a>
+        </template> -->
+      </a-table>
+    </contextMenu>
+    <!-- 现货合同: 详情 -->
+    <SpotContractDeatil />
+    <!-- 现货合同: 审核 -->
+    <Check />
+    <!-- 现货合同: 撤销 -->
+    <Cancel />
+  </div>
 </template>
 
 <script lang="ts">
-    import { defineComponent, ref } from 'vue';
-    import { QueryCustomInfo } from '@/services/go/ermcp/customInfo/index';
-    import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-    import { message } from 'ant-design-vue';
-    import { initData } from '@/common/methods';
+import { defineComponent, ref } from 'vue';
+import { initData } from '@/common/methods';
+import filterCustomTable from '@/views/information/spot-contract/components/filterTable/index.vue';
+import { getCustomList } from '../setup';
+import contextMenu from '@/common/components/contextMenu/index.vue';
+import { MenuItem } from '@/common/components/contextMenu/interface';
+import AddSpotContract from '@/views/information/spot-contract/components/add/index.vue';
+import SpotContractDeatil from '@/views/information/spot-contract/components/detail/index.vue';
+import Check from '@/views/information/spot-contract/components/check/index.vue';
+import Cancel from '@/views/information/spot-contract/components/cancel/index.vue';
+import { getBtnList } from '@/common/setup/contextMenu/index';
+import { handleTableEvent } from '@/common/setup/event/index';
+import BtnList from '@/common/components/buttonList/index.vue';
 
-    // 查询客户资料列表
-    function getCustomList() {
-        // const filteredInfo = ref();
-        // const sortedInfo = ref();
-        // const columns = computed(() => {
-        //     const filtered = filteredInfo.value || {};
-        //     const sorted = sortedInfo.value || {};
-        //     return [
-        //         {
-        //             title: '序号',
-        //             dataIndex: 'index',
-        //             key: 'index',
-        //             align: 'center',
-        //             width: 50,
-        //             customRender: (param: any) => `${param.index + 1}`,
-        //         },
-        //         {
-        //             title: 'Age',
-        //             dataIndex: 'age',
-        //             key: 'age',
-        //             sorter: (a: DataItem, b: DataItem) => a.age - b.age,
-        //             sortOrder: sorted.columnKey === 'age' && sorted.order,
-        //         },
-        //         {
-        //             title: 'Address',
-        //             dataIndex: 'address',
-        //             key: 'address',
-        //             filters: [
-        //                 { text: 'London', value: 'London' },
-        //                 { text: 'New York', value: 'New York' },
-        //             ],
-        //             filteredValue: filtered.address || null,
-        //             onFilter: (value: string, record: DataItem) => record.address.includes(value),
-        //             sorter: (a: DataItem, b: DataItem) => a.address.length - b.address.length,
-        //             sortOrder: sorted.columnKey === 'address' && sorted.order,
-        //             ellipsis: true,
-        //         },
-        //     ];
-        // });
-        const customList = ref<QueryCustomInfoType[]>([]);
-        function actionQuery() {
-            QueryCustomInfo(4)
-                .then((res) => {
-                    console.log('L', res);
-                })
-                .catch((err) => message.error(err));
-        }
+export default defineComponent({
+    name: 'plan_uncommitted',
+    components: {
+        filterCustomTable,
+        contextMenu,
+        AddSpotContract,
+        SpotContractDeatil,
+        Check,
+        Cancel,
+        BtnList,
+    },
+    setup() {
+        const contextMenuList = ref<MenuItem[]>([]);
+        const { spotContractList, actionQuery, columns, getColumns, search, loading } = getCustomList();
 
-        return { customList, actionQuery };
-    }
-
-    export default defineComponent({
-        name: 'purchase-history',
-        components: {},
-        setup() {
-            const { customList, actionQuery } = getCustomList();
-            initData(() => {
-                actionQuery();
-                // 加载数据在这里
-            });
-            return { customList };
-        },
-    });
+        initData(() => {
+            actionQuery(2);
+            getColumns();
+        });
+        return { spotContractList, columns, search, contextMenuList, ...getBtnList('business_review_someprice', true), loading, ...handleTableEvent() };
+    },
+});
 </script>
 
 <style lang="less">
-    .purchase-history {
-    }</style
+.spot-contract-peddding {
+}
+</style
 >;

+ 84 - 0
src/views/business/plan/list/setup.ts

@@ -0,0 +1,84 @@
+import { ColumnType, getTableHead } from '@/common/methods/table';
+import { QuerySpotContract } from '@/services/go/ermcp/spot-contract/index';
+import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
+import { message } from 'ant-design-vue';
+import { ref } from 'vue';
+
+// 处理现货列表
+export function getCustomList() {
+    // 表格数据
+    const spotContractList = ref<Ermcp3ContractRsp[]>([]);
+    // 表头数据
+    const columns = ref<ColumnType[]>([]);
+    // 过滤项
+    const filteredInfo = ref();
+    const loading = ref<boolean>(false);
+    // 获取表头
+    function getColumns() {
+        const list = getTableHead('table_pcweb_delivery');
+        const filtered = filteredInfo.value || {};
+        columns.value.length = 0;
+        list.forEach((e, i) => {
+            const { columnfield, columntitle, aligntype } = e;
+            const item: ColumnType = {
+                key: String(i),
+                dataIndex: columnfield, // 表格数据对应的key
+                title: columntitle,
+                align: aligntype === 1 ? 'center' : aligntype === 2 ? 'left' : 'right',
+                slots: { customRender: columnfield },
+            };
+            // 以下添加过滤数据对应的方法
+            if (e.columntitle === '类型') {
+                item.onFilter = (value: string, record: Ermcp3ContractRsp) => String(record.contracttype).includes(value);
+                item.filteredValue = filtered.contracttype || null;
+            }
+            if (e.columntitle === '定价类型') {
+                item.onFilter = (value: string, record: Ermcp3ContractRsp) => String(record.pricetype).includes(value);
+                item.filteredValue = filtered.pricetype || null;
+            }
+            if (e.columntitle === '合同编号') {
+                item.onFilter = (value: string, record: Ermcp3ContractRsp) => record.contractno.includes(value);
+                item.filteredValue = filtered.contractno || null;
+            }
+            if (e.columntitle === '对手方') {
+                item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
+                    if (record.contracttype === 1) {
+                        //采购方
+                        return record.sellusername.includes(value);
+                    } else {
+                        // 销售
+                        return record.buyusername.includes(value);
+                    }
+                };
+                item.filteredValue = filtered.negative || null;
+            }
+            columns.value.push(item);
+        });
+        console.log('columns', columns);
+    }
+    // 1-未提交 2-待审核 3-履约中 4-已完成
+    type EnumType = 1 | 2 | 3 | 4;
+    // 查询列表
+    function actionQuery(type: EnumType) {
+        loading.value = true;
+        QuerySpotContract({ querytype: type })
+            .then((res) => {
+                spotContractList.value = res.map((e, i) => {
+                    return { ...e, key: String(i) };
+                });
+                loading.value = false;
+                console.log('查询列表', spotContractList);
+            })
+            .catch((err) => {
+                message.error(err);
+                loading.value = false;
+            });
+    }
+    // 查询
+    function search(value: any) {
+        filteredInfo.value = value;
+        getColumns();
+    }
+
+    return { spotContractList, actionQuery, columns, filteredInfo, getColumns, search, loading };
+}

+ 11 - 9
src/views/information/custom/compoments/detail/index.vue

@@ -8,7 +8,7 @@
     <template #footer>
       <a-button key="submit"
                 type="primary"
-                :loading="loading"
+                :loading="loading.loading"
                 @click="submit">关闭</a-button>
     </template>
     <a-form class="inlineForm"
@@ -22,7 +22,7 @@
         </a-col>
         <a-col :span="12">
           <a-form-item label="企业名称">
-            <span class="white">{{ detail.customername }}</span>
+            <span class="white">{{ formartValue(selectedRow.customername)}}</span>
           </a-form-item>
         </a-col>
       </a-row>
@@ -59,7 +59,7 @@
         <a-col :span="12">
           <a-form-item label="营业执照">
             <div class="upload">
-                <div class="look">查看附件</div>
+              <div class="look">查看附件</div>
             </div>
           </a-form-item>
         </a-col>
@@ -84,7 +84,7 @@
         </a-col>
         <a-col :span="12">
           <a-form-item label="状态">
-            <span class="green">{{ detail.status }}</span>
+            <span class="green">{{ formartValue(getStatusName(selectedRow.status)) }}</span>
           </a-form-item>
         </a-col>
       </a-row>
@@ -111,7 +111,8 @@ import { defineComponent, PropType, reactive, ref, watchEffect } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
 import { mergeObj } from '@/utils/objHandle';
-import {getStatusName} from "@/views/information/custom/setup";
+import { getStatusName } from '@/views/information/custom/setup';
+import { formartValue } from '@/common/methods/format';
 
 export default defineComponent({
     name: 'custom-detail',
@@ -123,6 +124,8 @@ export default defineComponent({
         },
     },
     setup(props) {
+        console.log('props', props.selectedRow);
+
         const { visible, cancel } = closeModal('detail');
         const detail = reactive({
             nickname: props.selectedRow.nickname || '--',
@@ -137,7 +140,7 @@ export default defineComponent({
             telphone: props.selectedRow.telphone || '--',
             status: getStatusName(props.selectedRow.status) || '--',
             address: props.selectedRow.address || '--',
-            remark: props.selectedRow.remark || '--'
+            remark: props.selectedRow.remark || '--',
         });
         const loading = ref<boolean>(false);
         function submit() {
@@ -153,12 +156,11 @@ export default defineComponent({
             submit,
             loading,
             detail,
+            formartValue,
+            getStatusName,
         };
     },
-
 });
-
-
 </script>
 
 <style lang="less">