瀏覽代碼

部分新需求

cz 1 年之前
父節點
當前提交
3c1bd58455

+ 7 - 7
src/components/process/SF/Contract.vue

@@ -887,13 +887,13 @@ const formConfig = computed(() => {
       ],
       itemWidth: 25,
     },
-    // {
-    //   type: "select",
-    //   prop: "rr",
-    //   label: "结算方式",
-    //   data: settlementWay.value,
-    //   itemWidth: 25,
-    // },
+    {
+      type: "select",
+      prop: "rr",
+      label: "客户结算方式",
+      data: settlementWay.value,
+      itemWidth: 25,
+    },
     {
       type: "select",
       prop: "paymentMethod",

+ 6 - 1
src/components/process/SF/SalesOutBound.vue

@@ -175,6 +175,10 @@ defineExpose({
 });
 
 const getAllData = (businessId) => {
+  let obj = {};
+  if (route.query && route.query.obj) {
+    obj = JSON.parse(route.query.obj);
+  }
   proxy.post("/contract/detail", { id: businessId }).then((res) => {
     formData.data = {
       contractId: businessId,
@@ -182,11 +186,12 @@ const getAllData = (businessId) => {
         ...x,
         contractProductId: x.id,
         orderQuantity: x.quantity,
-        quantity: null,
+        quantity: obj[x.id] || null,
         amount: "",
       })),
       amount: "",
     };
+    totalAmount();
     if (
       formData.data.outboundRecordList &&
       formData.data.outboundRecordList.length > 0

+ 376 - 0
src/views/EHSD/saleContract/collectionClaim/index.vue

@@ -0,0 +1,376 @@
+<template>
+  <div class="pageIndexClass">
+    <div>
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :action-list="[
+              
+        ]" @get-list="getList">
+
+        <template #name="{ item }">
+          <div>
+            <span class="el-click">{{ item.name }}</span>
+          </div>
+        </template>
+
+      </byTable>
+    </div>
+    <el-dialog :title="modalType == 'add' ? '订单回款认领' : '编辑客户联系人'" v-model="dialogVisible" width="50%" destroy-on-close>
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
+        <template #rawMaterialIdSlot>
+          <div style="width:100%;display:flex">
+            <div style="width:calc(100% - 105px)">
+              <el-form-item label="客户" prop="customerId" class="margin-b-0">
+                <el-input disabled v-model="formData.data.customerIdLabel" placeholder="请选择"></el-input>
+              </el-form-item>
+            </div>
+            <el-button type="primary" style="width:88px;margin-left:15px" @click="openSelectCustomer = true" plain>选择</el-button>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="defualt" v-debounce>取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="defualt" v-debounce :loading="submitLoading">
+          确 定
+        </el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog v-model="openSelectCustomer" title="选择客户" width="80%" append-to-body>
+      <SelectCustomer @selectCustomer="selectCustomer" :isSelect="true"></SelectCustomer>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="openSelectCustomer = false">取消</el-button>
+        </span>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import SelectCustomer from "@/views/customer/file/index";
+
+const { proxy } = getCurrentInstance();
+const loading = ref(false);
+const submitLoading = ref(false);
+const openSelectCustomer = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+  },
+});
+const treeData = ref([]);
+const userList = ref([]);
+const deptData = ref([]);
+const claimStatus = ref([
+  {
+    label: "未认领",
+    value: "0",
+  },
+  {
+    label: "已认领",
+    value: "1",
+  },
+]);
+const dialogVisible = ref(false);
+const modalType = ref("add");
+const selectConfig = computed(() => [
+  {
+    label: "出纳认领",
+    prop: "type",
+    data: claimStatus.value,
+  },
+  {
+    type: "time",
+    label: "交易日期",
+    placeholder: "开始日期",
+    prop: "beginTime",
+    placeholderOne: "结束日期",
+    propOne: "endTime",
+  },
+]);
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "业务公司",
+        prop: "code",
+      },
+    },
+    {
+      attrs: {
+        label: "业务部门",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "发起人",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "交易金额",
+        prop: "ssa",
+      },
+    },
+    {
+      attrs: {
+        label: "交易日期",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "交易流水号",
+        prop: "deptName",
+      },
+    },
+
+    {
+      attrs: {
+        label: "交易摘要",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "付款人",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "付款账号",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "付款开户行",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "收款人",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "收款账号",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "收款开户行",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "出纳认领",
+        prop: "deptName",
+      },
+    },
+
+    {
+      attrs: {
+        label: "操作",
+        width: "80",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "认领",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtl(row);
+            },
+          },
+          // {
+          //   attrs: {
+          //     label: "删除",
+          //     type: "danger",
+          //     text: true,
+          //   },
+          //   el: "button",
+          //   click() {
+          //     proxy
+          //       .msgConfirm()
+          //       .then((res) => {
+          //         proxy
+          //           .post("/shopInfo/delete", {
+          //             id: row.id,
+          //           })
+          //           .then((res) => {
+          //             proxy.msgTip("删除成功", 1);
+          //             getList();
+          //           });
+          //       })
+          //       .catch((err) => {});
+          //   },
+          // },
+        ];
+      },
+    },
+  ];
+});
+const formData = reactive({
+  data: {},
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+});
+const formDom = ref(null);
+const formConfig = computed(() => {
+  return [
+    {
+      type: "upload",
+      listType: "text",
+      accept: "",
+      prop: "licenseFileList",
+      label: "凭证上传",
+    },
+    {
+      type: "input",
+      itemType: "textarea",
+      prop: "name",
+      label: "备注",
+      itemWidth: 100,
+    },
+  ];
+});
+const rules = ref({
+  deptId: [{ required: true, message: "请选择负责部门", trigger: "change" }],
+  name: [{ required: true, message: "请输入店铺名称", trigger: "blur" }],
+  code: [{ required: true, message: "请输入店铺编号", trigger: "blur" }],
+});
+
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/shopInfo/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+
+const openModal = () => {
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {
+    companyId: proxy.useUserStore().user.companyId,
+    deptId: proxy.useUserStore().user.dept.deptId,
+    devUserId: proxy.useUserStore().user.userId,
+    fileList: [],
+  };
+  getDeptData(formData.data.companyId);
+};
+
+const getDeptData = (val) => {
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      companyId: val,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      ancestors: val,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // type: 2,
+    })
+    .then((res) => {
+      deptData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+
+const submitForm = () => {
+  formDom.value.handleSubmit((valid) => {
+    submitLoading.value = true;
+    proxy.post("/shopInfo/" + modalType.value, formData.data).then(
+      (res) => {
+        proxy.msgTip("操作成功", 1);
+        dialogVisible.value = false;
+        submitLoading.value = false;
+        getList();
+      },
+      (err) => {
+        submitLoading.value = false;
+      }
+    );
+  });
+};
+
+const getDict = () => {
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      tenantId: proxy.useUserStore().user.tenantId,
+      type: 0,
+    })
+    .then((res) => {
+      treeData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+getDict();
+
+const getDtl = (row) => {
+  modalType.value = "add";
+  formData.data = {
+    fileList: [],
+    remake: "",
+  };
+  dialogVisible.value = true;
+};
+
+getList();
+
+const selectCustomer = (row) => {
+  formData.data.customerId = row.id;
+  formData.data.customerIdLabel = row.name;
+  openSelectCustomer.value = false;
+  proxy.msgTip("选择成功");
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+  padding: 20px;
+}
+</style>

+ 485 - 0
src/views/EHSD/saleContract/collectionRegistration/index.vue

@@ -0,0 +1,485 @@
+<template>
+  <div class="pageIndexClass">
+    <div>
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :action-list="[
+              {
+                text: '添加',
+                action: () => openModal('add'),
+                disabled: false,
+              },
+        ]" @get-list="getList">
+
+        <template #name="{ item }">
+          <div>
+            <span class="el-click">{{ item.name }}</span>
+          </div>
+        </template>
+
+      </byTable>
+    </div>
+    <el-dialog :title="modalType == 'add' ? '订单回款登记' : '编辑客户联系人'" v-model="dialogVisible" width="70%" destroy-on-close>
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
+        <template #rawMaterialIdSlot>
+          <div style="width:100%;display:flex">
+            <div style="width:calc(100% - 105px)">
+              <el-form-item label="客户" prop="customerId" class="margin-b-0">
+                <el-input disabled v-model="formData.data.customerIdLabel" placeholder="请选择"></el-input>
+              </el-form-item>
+            </div>
+            <el-button type="primary" style="width:88px;margin-left:15px" @click="openSelectCustomer = true" plain>选择</el-button>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="defualt" v-debounce>取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="defualt" v-debounce :loading="submitLoading">
+          确 定
+        </el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog v-model="openSelectCustomer" title="选择客户" width="80%" append-to-body>
+      <SelectCustomer @selectCustomer="selectCustomer" :isSelect="true"></SelectCustomer>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="openSelectCustomer = false">取消</el-button>
+        </span>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import SelectCustomer from "@/views/customer/file/index";
+
+const { proxy } = getCurrentInstance();
+const loading = ref(false);
+const submitLoading = ref(false);
+const openSelectCustomer = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+  },
+});
+const treeData = ref([]);
+const userList = ref([]);
+const deptData = ref([]);
+const claimStatus = ref([
+  {
+    label: "未认领",
+    value: "0",
+  },
+  {
+    label: "已认领",
+    value: "1",
+  },
+]);
+const dialogVisible = ref(false);
+const modalType = ref("add");
+const selectConfig = computed(() => [
+  {
+    label: "出纳认领",
+    prop: "type",
+    data: claimStatus.value,
+  },
+  {
+    type: "time",
+    label: "交易日期",
+    placeholder: "开始日期",
+    prop: "beginTime",
+    placeholderOne: "结束日期",
+    propOne: "endTime",
+  },
+]);
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "业务公司",
+        prop: "code",
+      },
+    },
+    {
+      attrs: {
+        label: "业务部门",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "发起人",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "交易金额",
+        prop: "ssa",
+      },
+    },
+    {
+      attrs: {
+        label: "交易日期",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "交易流水号",
+        prop: "deptName",
+      },
+    },
+
+    {
+      attrs: {
+        label: "交易摘要",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "付款人",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "付款账号",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "付款开户行",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "收款人",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "收款账号",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "收款开户行",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "出纳认领",
+        prop: "deptName",
+      },
+    },
+
+    {
+      attrs: {
+        label: "操作",
+        width: "80",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          // {
+          //   attrs: {
+          //     label: "修改",
+          //     type: "primary",
+          //     text: true,
+          //   },
+          //   el: "button",
+          //   click() {
+          //     getDtl(row);
+          //   },
+          // },
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              proxy
+                .msgConfirm()
+                .then((res) => {
+                  proxy
+                    .post("/shopInfo/delete", {
+                      id: row.id,
+                    })
+                    .then((res) => {
+                      proxy.msgTip("删除成功", 1);
+                      getList();
+                    });
+                })
+                .catch((err) => {});
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+const formData = reactive({
+  data: {},
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+});
+const formDom = ref(null);
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "基本信息",
+    },
+    {
+      type: "treeSelect",
+      prop: "companyId",
+      label: "业务公司",
+      data: treeData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      disabled: true,
+      itemWidth: 33.33,
+      fn: (val) => {
+        // getDeptData(val);
+      },
+    },
+    {
+      type: "treeSelect",
+      prop: "deptId",
+      label: "业务部门",
+      data: deptData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      disabled: true,
+      itemWidth: 33.33,
+    },
+    {
+      type: "select",
+      prop: "devUserId",
+      label: "发起人",
+      disabled: true,
+      filterable: true,
+      data: userList.value,
+      itemWidth: 33.33,
+    },
+    {
+      type: "number",
+      prop: "netWeight",
+      label: "交易金额",
+      precision: 2,
+      min: 0,
+      controls: false,
+      itemWidth: 33.33,
+    },
+    {
+      type: "date",
+      itemType: "date",
+      prop: "name",
+      label: "交易日期",
+      itemWidth: 33.33,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "交易流水号",
+      itemWidth: 33.33,
+    },
+    {
+      type: "input",
+      itemType: "textarea",
+      prop: "name",
+      label: "交易摘要",
+      itemWidth: 100,
+    },
+    {
+      type: "title1",
+      title: "付款信息",
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "付款人",
+      itemWidth: 33.33,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "付款账号",
+      itemWidth: 33.33,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "付款开户行",
+      itemWidth: 33.33,
+    },
+    {
+      type: "title1",
+      title: "收款信息",
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "收款人",
+      itemWidth: 33.33,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "收款账号",
+      itemWidth: 33.33,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "收款开户行",
+      itemWidth: 33.33,
+    },
+    {
+      type: "title1",
+      title: "凭证",
+    },
+    {
+      type: "upload",
+      listType: "text",
+      accept: "",
+      prop: "licenseFileList",
+      label: "凭证上传",
+    },
+  ];
+});
+const rules = ref({
+  deptId: [{ required: true, message: "请选择负责部门", trigger: "change" }],
+  name: [{ required: true, message: "请输入店铺名称", trigger: "blur" }],
+  code: [{ required: true, message: "请输入店铺编号", trigger: "blur" }],
+});
+
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/shopInfo/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+
+const openModal = () => {
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {
+    companyId: proxy.useUserStore().user.companyId,
+    deptId: proxy.useUserStore().user.dept.deptId,
+    devUserId: proxy.useUserStore().user.userId,
+    fileList: [],
+  };
+  getDeptData(formData.data.companyId);
+};
+
+const getDeptData = (val) => {
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      companyId: val,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      ancestors: val,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // type: 2,
+    })
+    .then((res) => {
+      deptData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+
+const submitForm = () => {
+  formDom.value.handleSubmit((valid) => {
+    submitLoading.value = true;
+    proxy.post("/shopInfo/" + modalType.value, formData.data).then(
+      (res) => {
+        proxy.msgTip("操作成功", 1);
+        dialogVisible.value = false;
+        submitLoading.value = false;
+        getList();
+      },
+      (err) => {
+        submitLoading.value = false;
+      }
+    );
+  });
+};
+
+const getDict = () => {
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      tenantId: proxy.useUserStore().user.tenantId,
+      type: 0,
+    })
+    .then((res) => {
+      treeData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+getDict();
+
+const getDtl = (row) => {
+  modalType.value = "edit";
+  proxy.post("/shopInfo/detail", { id: row.id }).then((res) => {
+    formData.data = res;
+    dialogVisible.value = true;
+  });
+};
+
+getList();
+
+const selectCustomer = (row) => {
+  formData.data.customerId = row.id;
+  formData.data.customerIdLabel = row.name;
+  openSelectCustomer.value = false;
+  proxy.msgTip("选择成功");
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+  padding: 20px;
+}
+</style>

+ 44 - 41
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -324,7 +324,8 @@
               ref="salesOutBoundFormDom" v-loading="formLoading">
         <template #commodity>
           <div style="width: 100%">
-            <el-button @click="submitSalesOutBoundOne(true)" type="primary" size="default" plain v-debounce>申请特批</el-button>
+            <el-button @click="submitSalesOutBoundOne(true)" type="primary" size="default" plain v-debounce
+                       style="margin-bottom:16px">申请特批</el-button>
             <el-table :data="salesOutBoundFormData.data.outboundRecordList" style="width: 100%; ">
               <el-table-column label="商品图片" width="80">
                 <template #default="{ row }">
@@ -604,7 +605,7 @@ const selectConfig = computed(() => {
       data: contractType.value,
     },
     {
-      label: "审批状态",
+      label: "订单状态",
       prop: "status",
       data: status.value,
     },
@@ -613,11 +614,11 @@ const selectConfig = computed(() => {
     //   prop: "companyId",
     //   data: companyData.value,
     // },
-    {
-      label: "生产状态",
-      prop: "produceStatus",
-      data: produceStatusData.value,
-    },
+    // {
+    //   label: "生产状态",
+    //   prop: "produceStatus",
+    //   data: produceStatusData.value,
+    // },
     {
       label: "业务员",
       prop: "userId",
@@ -741,7 +742,7 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "审批状态",
+        label: "订单状态",
         slot: "statusSlot",
         width: 100,
       },
@@ -749,17 +750,17 @@ const config = computed(() => {
         return proxy.dictValueLabel(type, status.value);
       },
     },
-    {
-      attrs: {
-        label: "生产状态",
-        // prop: "produceStatus",
-        slot: "produceStatus",
-        width: 100,
-      },
-      // render(val) {
-      //   return proxy.dictValueLabel(val, produceStatusData.value);
-      // },
-    },
+    // {
+    //   attrs: {
+    //     label: "生产状态",
+    //     // prop: "produceStatus",
+    //     slot: "produceStatus",
+    //     width: 100,
+    //   },
+    //   // render(val) {
+    //   //   return proxy.dictValueLabel(val, produceStatusData.value);
+    //   // },
+    // },
     // {
     //   attrs: {
     //     label: "销售部门",
@@ -990,19 +991,18 @@ const config = computed(() => {
                 },
               }
             : {},
-          row.produceStatus == 1
-            ? {
-                attrs: {
-                  label: "终止生产",
-                  type: "danger",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  hanleTermination(row);
-                },
-              }
-            : {},
+          // row.produceStatus == 1
+          {
+            attrs: {
+              label: "终止生产",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              hanleTermination(row);
+            },
+          },
           route.query.pageType == "1"
             ? {
                 attrs: {
@@ -1017,7 +1017,7 @@ const config = computed(() => {
               }
             : {},
           // && row.outboundStatus == 0 && row.produceStatus == 2
-          row.status == 30 && 10 > row.produceStatus && row.produceStatus >= 2
+          row.status == 30
             ? {
                 attrs: {
                   label: "销售出库",
@@ -1068,7 +1068,7 @@ const config = computed(() => {
                 },
               }
             : {},
-          row.status == 30 && row.produceStatus != 10
+          row.status == 30
             ? {
                 attrs: {
                   label: "变更",
@@ -1098,9 +1098,8 @@ const config = computed(() => {
           // row.orderDistributeStatus == 1
           //   ? {}
           //   :
-          (row.status == 10 ||
-            (row.status == 30 && Number(row.sumClaimMoney) == 0)) &&
-          (row.produceStatus == 0 || row.produceStatus == null)
+          row.status == 10 ||
+          (row.status == 30 && Number(row.sumClaimMoney) == 0)
             ? {
                 attrs: {
                   label: "作废",
@@ -1180,8 +1179,7 @@ const config = computed(() => {
                 },
               }
             : {},
-
-          row.status == 30
+          row.status == 30 || row.status == 60 || row.status == 70
             ? {
                 attrs: {
                   label: "合同上传",
@@ -1748,7 +1746,7 @@ const formSearchConfig = computed(() => {
   return [
     {
       type: "select",
-      label: "审批状态",
+      label: "订单状态",
       prop: "status",
       itemWidth: 50,
       data: status.value,
@@ -2052,7 +2050,7 @@ const uploadFormConfig = computed(() => [
     listType: "text",
     accept: "",
     prop: "contractFileList",
-    label: "合同上传",
+    label: "",
   },
 ]);
 const uploadRules = ref({
@@ -2286,6 +2284,10 @@ const submitSalesOutBound = (flag) => {
 };
 
 const submitSalesOutBoundOne = (row) => {
+  let obj = {};
+  salesOutBoundFormData.data.outboundRecordList.map((x) => {
+    obj[x.contractProductId] = x.quantity;
+  });
   proxy.$router.replace({
     path: "/platform_manage/process/processApproval",
     query: {
@@ -2293,6 +2295,7 @@ const submitSalesOutBoundOne = (row) => {
       flowName: "销售出库特批申请",
       businessId: salesOutBoundFormData.data.contractId,
       random: proxy.random(),
+      obj: JSON.stringify(obj),
     },
   });
 };

+ 2 - 1
src/views/MES/productionTask/index.vue

@@ -83,6 +83,7 @@
               </template>
             </el-popover>
             <!-- <el-button type="primary" text @click="openRemark(item)" v-if="!item.remark">进度说明</el-button> -->
+            <el-button type="primary" text>{{item.remark?'锁定':'解锁'}}报工</el-button>
           </div>
         </template>
 
@@ -755,7 +756,7 @@ const config = ref([
   {
     attrs: {
       label: "操作",
-      width: "160",
+      width: "220",
       slot: "btn",
       align: "left",
       // fixed: "right",

+ 81 - 12
src/views/customer/addCustomer.vue

@@ -80,7 +80,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="旺旺号" width="150">
+            <el-table-column label="微信" width="150">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'customerUserList.' + $index + '.name'" class="margin-b-0 wid100" :rules="rules.name2" :inline-message="true">
@@ -89,7 +89,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="微信号" width="150">
+            <el-table-column label="旺旺" width="150">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'customerUserList.' + $index + '.name'" class="margin-b-0 wid100" :rules="rules.name2" :inline-message="true">
@@ -107,6 +107,80 @@
                 </div>
               </template>
             </el-table-column>
+            <el-table-column label="手机号" width="150">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'customerUserList.' + $index + '.name'" class="margin-b-0 wid100" :rules="rules.name2" :inline-message="true">
+                    <el-input v-model="row.name" placeholder="请输入" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+
+            <el-table-column label="WhatsApp" width="150">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'customerUserList.' + $index + '.name'" class="margin-b-0 wid100" :rules="rules.name2" :inline-message="true">
+                    <el-input v-model="row.name" placeholder="请输入" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+
+            <el-table-column label="QQ" width="150">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'customerUserList.' + $index + '.name'" class="margin-b-0 wid100" :rules="rules.name2" :inline-message="true">
+                    <el-input v-model="row.name" placeholder="请输入" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="Skype" width="150">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'customerUserList.' + $index + '.name'" class="margin-b-0 wid100" :rules="rules.name2" :inline-message="true">
+                    <el-input v-model="row.name" placeholder="请输入" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="LinkedIn" width="150">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'customerUserList.' + $index + '.name'" class="margin-b-0 wid100" :rules="rules.name2" :inline-message="true">
+                    <el-input v-model="row.name" placeholder="请输入" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="Facebook" width="150">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'customerUserList.' + $index + '.name'" class="margin-b-0 wid100" :rules="rules.name2" :inline-message="true">
+                    <el-input v-model="row.name" placeholder="请输入" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="Dirrect Line" width="150">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'customerUserList.' + $index + '.email'" class="margin-b-0 wid100" :rules="rules.email" :inline-message="true">
+                    <el-input v-model="row.email" placeholder="请输入" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="邮箱" width="150">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'customerUserList.' + $index + '.email'" class="margin-b-0 wid100" :rules="rules.email" :inline-message="true">
+                    <el-input v-model="row.email" placeholder="请输入" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
             <el-table-column align="center" label="操作" width="80" fixed="right">
               <template #default="{ row, $index }">
                 <!-- <el-button type="primary" link @click="clickInformationMore(row, $index)">更多</el-button> -->
@@ -221,6 +295,10 @@ const customerScale = computed(
 const customerState = computed(
   () => proxy.useUserStore().allDict["customer_state"]
 );
+const newoldCustomer = computed(
+  () => proxy.useUserStore().allDict["newold_customer"]
+);
+
 const submit = ref(null);
 const formData = reactive({
   data: {
@@ -431,16 +509,7 @@ const formConfig = computed(() => {
       label: "新老客户",
       prop: "wwaa",
       itemWidth: 50,
-      data: [
-        {
-          dictKey: 10,
-          dictValue: "新客户",
-        },
-        {
-          dictKey: 20,
-          dictValue: "老客户",
-        },
-      ],
+      data: newoldCustomer.value,
     },
     {
       type: "input",

+ 445 - 0
src/views/customer/contacts/index.vue

@@ -0,0 +1,445 @@
+<template>
+  <div class="pageIndexClass">
+    <div>
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :action-list="[
+              {
+                text: '添加',
+                action: () => openModal('add'),
+                disabled: false,
+              },
+        ]" @get-list="getList">
+
+        <template #name="{ item }">
+          <div>
+            <span class="el-click">{{ item.name }}</span>
+          </div>
+        </template>
+
+      </byTable>
+    </div>
+    <el-dialog :title="modalType == 'add' ? '添加客户联系人' : '编辑客户联系人'" v-model="dialogVisible" width="70%" destroy-on-close>
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
+        <template #rawMaterialIdSlot>
+          <div style="width:100%;display:flex">
+            <div style="width:calc(100% - 105px)">
+              <el-form-item label="客户" prop="customerId" class="margin-b-0">
+                <el-input disabled v-model="formData.data.customerIdLabel" placeholder="请选择"></el-input>
+              </el-form-item>
+            </div>
+            <el-button type="primary" style="width:88px;margin-left:15px" @click="openSelectCustomer = true" plain>选择</el-button>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="defualt" v-debounce>取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="defualt" v-debounce :loading="submitLoading">
+          确 定
+        </el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog v-model="openSelectCustomer" title="选择客户" width="80%" append-to-body>
+      <SelectCustomer @selectCustomer="selectCustomer" :isSelect="true"></SelectCustomer>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="openSelectCustomer = false">取消</el-button>
+        </span>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import SelectCustomer from "@/views/customer/file/index";
+
+const { proxy } = getCurrentInstance();
+const loading = ref(false);
+const submitLoading = ref(false);
+const openSelectCustomer = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+  },
+});
+const treeData = ref([]);
+const dialogVisible = ref(false);
+const modalType = ref("add");
+const selectConfig = computed(() => []);
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "公司名称",
+        prop: "code",
+      },
+    },
+    {
+      attrs: {
+        label: "客户编号",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "客户名称",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "联系人姓名",
+        prop: "ssa",
+      },
+    },
+    {
+      attrs: {
+        label: "性别",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "职位",
+        prop: "deptName",
+      },
+    },
+
+    {
+      attrs: {
+        label: "是否企业关键KP",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "微信",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "旺旺",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "联系电话",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "手机号",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "WhatsApp",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "QQ",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "Skype",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "LinkedIn",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "Facebook",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "Dirrect Line",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "邮箱",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtl(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              proxy
+                .msgConfirm()
+                .then((res) => {
+                  proxy
+                    .post("/shopInfo/delete", {
+                      id: row.id,
+                    })
+                    .then((res) => {
+                      proxy.msgTip("删除成功", 1);
+                      getList();
+                    });
+                })
+                .catch((err) => {});
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+const formData = reactive({
+  data: {},
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+});
+const formDom = ref(null);
+const formConfig = computed(() => {
+  return [
+    {
+      type: "slot",
+      slotName: "rawMaterialIdSlot",
+      label: "",
+      itemWidth: 50,
+      disabled: true,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "客户编号",
+      itemWidth: 50,
+      disabled: true,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "客户主体",
+      itemWidth: 50,
+      disabled: true,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "客户客体",
+      itemWidth: 50,
+      disabled: true,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "联系人姓名",
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "性别",
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "职位",
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "是否企业关键KP",
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "微信",
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "旺旺",
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "联系电话",
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "手机号",
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "WhatsApp",
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "QQ",
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "Skype",
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "LinkedIn",
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "Facebook",
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "Dirrect Line",
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "邮箱",
+      itemWidth: 25,
+    },
+  ];
+});
+const rules = ref({
+  deptId: [{ required: true, message: "请选择负责部门", trigger: "change" }],
+  name: [{ required: true, message: "请输入店铺名称", trigger: "blur" }],
+  code: [{ required: true, message: "请输入店铺编号", trigger: "blur" }],
+});
+
+const getDeptData = () => {
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      tenantId: proxy.useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      treeData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+getDeptData();
+
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/shopInfo/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+
+const openModal = () => {
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {
+    definition: "2",
+    fileList: [],
+  };
+};
+
+const submitForm = () => {
+  formDom.value.handleSubmit((valid) => {
+    submitLoading.value = true;
+    proxy.post("/shopInfo/" + modalType.value, formData.data).then(
+      (res) => {
+        proxy.msgTip("操作成功", 1);
+        dialogVisible.value = false;
+        submitLoading.value = false;
+        getList();
+      },
+      (err) => {
+        submitLoading.value = false;
+      }
+    );
+  });
+};
+
+const getDtl = (row) => {
+  modalType.value = "edit";
+  proxy.post("/shopInfo/detail", { id: row.id }).then((res) => {
+    formData.data = res;
+    dialogVisible.value = true;
+  });
+};
+
+getList();
+
+const selectCustomer = (row) => {
+  formData.data.customerId = row.id;
+  formData.data.customerIdLabel = row.name;
+  openSelectCustomer.value = false;
+  proxy.msgTip("选择成功");
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+  padding: 20px;
+}
+</style>

+ 94 - 70
src/views/customer/file/index.vue

@@ -92,7 +92,7 @@
       <div style="width:calc(100% - 250px);height:100%;overflow:auto">
         <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :statConfig="[]"
                  :selectConfig="selectConfig" highlight-current-row :action-list="[
-          {
+          isSelect?{}:{
             text: '添加客户',
             action: () => openModal(),
           },
@@ -355,6 +355,12 @@ import useUserStore from "@/store/modules/user";
 import selectCity from "@/components/selectCity/index.vue";
 import TitleInfo from "@/components/TitleInfo/index.vue";
 import AddCustomer from "@/views/customer/addCustomer.vue";
+const props = defineProps({
+  isSelect: {
+    type: Boolean,
+    default: false,
+  },
+});
 const AddCustomerDom = ref(null);
 const customerId = ref("");
 const { proxy } = getCurrentInstance();
@@ -581,77 +587,91 @@ const config = computed(() => {
         fixed: "right",
       },
       renderHTML(row) {
-        return [
-          {
-            attrs: {
-              label: "分配",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              formAllocation.data = {
-                id: row.id,
-                userId: row.userId,
-              };
-              openAllocation.value = true;
-            },
-          },
-          {
-            attrs: {
-              label: "跟进",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              clickFollowUp(row);
-            },
-          },
-          {
-            attrs: {
-              label: "修改",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              update(row);
-            },
-          },
-          {
-            attrs: {
-              label: "删除",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              ElMessageBox.confirm(
-                "此操作将永久删除该数据, 是否继续?",
-                "提示",
-                {
-                  confirmButtonText: "确定",
-                  cancelButtonText: "取消",
-                  type: "warning",
-                }
-              ).then(() => {
-                proxy
-                  .post("/customer/delete", {
+        return props.isSelect
+          ? [
+              {
+                attrs: {
+                  label: "选择",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  handleSelectCustomer(row);
+                },
+              },
+            ]
+          : [
+              {
+                attrs: {
+                  label: "分配",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  formAllocation.data = {
                     id: row.id,
-                  })
-                  .then(() => {
-                    ElMessage({
-                      message: "删除成功",
-                      type: "success",
-                    });
-                    getList();
-                    obtainStatisticalData();
+                    userId: row.userId,
+                  };
+                  openAllocation.value = true;
+                },
+              },
+              {
+                attrs: {
+                  label: "跟进",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickFollowUp(row);
+                },
+              },
+              {
+                attrs: {
+                  label: "修改",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  update(row);
+                },
+              },
+              {
+                attrs: {
+                  label: "删除",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  ElMessageBox.confirm(
+                    "此操作将永久删除该数据, 是否继续?",
+                    "提示",
+                    {
+                      confirmButtonText: "确定",
+                      cancelButtonText: "取消",
+                      type: "warning",
+                    }
+                  ).then(() => {
+                    proxy
+                      .post("/customer/delete", {
+                        id: row.id,
+                      })
+                      .then(() => {
+                        ElMessage({
+                          message: "删除成功",
+                          type: "success",
+                        });
+                        getList();
+                        obtainStatisticalData();
+                      });
                   });
-              });
-            },
-          },
-        ];
+                },
+              },
+            ];
       },
     },
   ];
@@ -1302,6 +1322,10 @@ const refreshList = () => {
   dialogVisible.value = false;
   getList();
 };
+
+const handleSelectCustomer = (row) => {
+  proxy.$emit("selectCustomer", row);
+};
 </script>
 
 <style lang="scss" scoped>