Explorar el Código

部分新页面

cz hace 1 año
padre
commit
6cfeeefe5c

+ 34 - 0
src/router/index.js

@@ -462,6 +462,39 @@ const routes = [{
 				name: '报工明细',
 				component: () => import('../views/MES/reportDetail/index.vue')
 			},
+			{
+				path: 'jstOrder',
+				name: '聚水潭订单',
+				component: () => import('../views/salesContract/jstOrder/index.vue')
+			},
+			{
+				path: 'jstOrderDetails',
+				name: '聚水潭订单详情',
+				component: () => import('../views/salesContract/jstOrder/details.vue')
+			},
+			{
+				path: 'productionOrder',
+				name: '生产订单',
+				component: () => import('../views/MES/productionOrder/index.vue')
+			},
+			{
+				path: 'productionOrderDetails',
+				name: '生产订单详情',
+				component: () => import('../views/MES/productionOrder/details.vue')
+			},
+			{
+				path: 'productionTask',
+				name: '生产任务',
+				component: () => import('../views/MES/productionTask/index.vue')
+			},
+			{
+				path: 'productionTaskDetails',
+				name: '生产任务详情',
+				component: () => import('../views/MES/productionTask/details.vue')
+			},
+
+
+
 
 			// {
 			// 	path: 'reportWorkAdd',
@@ -576,6 +609,7 @@ const routes = [{
 				name: "开发中",
 				component: () => import("../views/home/coming.vue"),
 			},
+			// 
 
 		]
 	},

+ 174 - 0
src/views/MES/productionOrder/details.vue

@@ -0,0 +1,174 @@
+<template>
+  <div class="form">
+    <van-nav-bar :title="'生产订单详情'" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft">
+    </van-nav-bar>
+    <testForm v-model="formData.data" :formOption="formOption" :formConfig="formConfig" :rules="rules" @onSubmit="onSubmit" ref="formDom"></testForm>
+  </div>
+</template>
+
+<script setup>
+import { ref, reactive, getCurrentInstance, onMounted } from "vue";
+import { showSuccessToast, showFailToast } from "vant";
+import { useRoute } from "vue-router";
+import testForm from "@/components/testForm/index.vue";
+const proxy = getCurrentInstance().proxy;
+const route = useRoute();
+const formDom = ref(null);
+const formData = reactive({
+  data: {},
+});
+const rules = {
+  contractId: [
+    {
+      required: true,
+      message: proxy.t("claim.contractCanNotBeEmpty"),
+    },
+  ],
+  money: [
+    {
+      required: true,
+      message: proxy.t("claim.relatedAmountCanNotBeEmpty"),
+    },
+  ],
+};
+const formOption = reactive({
+  readonly: true, //用于控制整个表单是否只读
+  disabled: false,
+  labelAlign: "top",
+  scroll: true,
+  labelWidth: "62pk",
+  submitBtnText: proxy.t("common.submit"),
+  hiddenSubmitBtn: true,
+  btnConfig: {
+    isNeed: false,
+    listTitle: "产品生产进度",
+    prop: "produceOrderDetailList",
+    plain: true,
+    listConfig: [
+      {
+        type: "input",
+        itemType: "text",
+        label: "产品编码",
+        prop: "productCode",
+      },
+      {
+        type: "input",
+        itemType: "text",
+        label: "产品名称",
+        prop: "productName",
+      },
+      {
+        type: "input",
+        itemType: "text",
+        label: "产品数量",
+        prop: "quantity",
+      },
+      {
+        type: "input",
+        itemType: "text",
+        label: "完成数量",
+        prop: "finishQuantity",
+      },
+    ],
+    clickFn: () => {},
+  },
+});
+const statusData = ref([
+  {
+    label: "未开始",
+    value: "0",
+  },
+  {
+    label: "进行中",
+    value: "1",
+  },
+  {
+    label: "已完成",
+    value: "2",
+  },
+]);
+const contractProdTag = ref([]);
+const getDict = () => {
+  proxy.getDictOne(["contract_prod_tag"]).then((res) => {
+    contractProdTag.value = res["contract_prod_tag"].data.map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+    formData.data.produceStatusName = proxy.dictValueLabel(
+      formData.data.produceStatus,
+      statusData.value
+    );
+    if (formData.data.prodTag) {
+      formData.data.prodTagName = "";
+      formData.data.prodTags = formData.data.prodTag.split(",");
+      if (formData.data.prodTags && formData.data.prodTags.length > 0) {
+        formData.data.prodTags.map((x, index) => {
+          formData.data.prodTagName +=
+            " " + proxy.dictValueLabel(x, contractProdTag.value);
+        });
+      }
+    }
+  });
+};
+
+const formConfig = reactive([
+  {
+    type: "input",
+    label: "生产公司",
+    prop: "companyName",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "订单号",
+    prop: "code",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "下单时间",
+    prop: "createTime",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "交期",
+    prop: "deliveryPeriod",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "投产时间",
+    prop: "produceTime",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "生产状态",
+    prop: "produceStatusName",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "生产指示",
+    prop: "prodTagName",
+    itemType: "text",
+    readonly: true,
+  },
+]);
+const onClickLeft = () => history.back();
+onMounted(() => {
+  if (route.query && route.query.data) {
+    formData.data = JSON.parse(route.query.data);
+    getDict();
+  }
+});
+</script>
+<style lang="scss" scoped>
+</style>

+ 146 - 0
src/views/MES/productionOrder/index.vue

@@ -0,0 +1,146 @@
+<template>
+  <van-nav-bar :title="'生产订单'" left-text="" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
+    <!-- <template #right>
+      {{ $t("common.add") }}
+    </template> -->
+  </van-nav-bar>
+  <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="onRefresh" />
+  <van-pull-refresh v-model="loading" @refresh="onRefresh">
+    <div class="list">
+      <van-list v-model:loading="loading" :finished="finished" :finished-text="$t('common.noMore')" @load="getList" style="margin-bottom: 60px">
+        <commonList :data="listData" @onClick="toDtl" :config="listConfig"></commonList>
+      </van-list>
+    </div>
+  </van-pull-refresh>
+  <!-- <van-action-sheet v-model:show="actionType" :actions="actions" @select="onSelect" /> -->
+</template>
+<script setup>
+import { ref, getCurrentInstance } from "vue";
+import commonList from "@/components/common-list.vue";
+
+const proxy = getCurrentInstance().proxy;
+const onClickLeft = () => proxy.$router.push("/main/working");
+const onClickRight = () => {
+  proxy.$router.push({
+    path: "/main/processDtl",
+    query: {
+      flowKey: "contract_flow",
+    },
+  });
+};
+const actionType = ref(false);
+const actions = ref([
+  {
+    name: proxy.t("common.view"),
+    type: "1",
+  },
+  {
+    name: proxy.t("common.contractChange"),
+    type: "2",
+  },
+  {
+    name: proxy.t("common.cancel"),
+  },
+]);
+const req = ref({
+  pageNum: 1,
+  keyword: null,
+});
+const finished = ref(false);
+const onRefresh = () => {
+  req.value.pageNum = 1;
+  finished.value = false;
+  getList("refresh");
+};
+const loading = ref(false);
+const listData = ref([]);
+const getList = (type) => {
+  loading.value = true;
+  proxy
+    .post("/produceOrder/page", req.value)
+    .then((res) => {
+      // if (res.data.rows && res.data.rows.length > 0) {
+      //   res.data.rows = res.data.rows.map((item) => {
+      //     return {
+      //       ...item,
+      //       currencyAmount: item.currency + " " + item.amount,
+      //     };
+      //   });
+      // }
+      listData.value =
+        type === "refresh"
+          ? res.data.rows
+          : listData.value.concat(res.data.rows);
+      if (req.value.pageNum * 10 >= res.data.total) {
+        finished.value = true;
+      }
+      req.value.pageNum++;
+      loading.value = false;
+    })
+    .catch(() => {
+      loading.value = false;
+    });
+};
+let rowData = ref({});
+const onSelect = (item) => {
+  if (item.type === "1") {
+    proxy.$router.push({
+      path: "/main/processDtl",
+      query: {
+        flowKey: "contract_flow",
+        id: rowData.value.flowId,
+        processType: 20,
+      },
+    });
+  } else if (item.type === "2") {
+    proxy.$router.push({
+      path: "/main/processDtl",
+      query: {
+        flowKey: "contract_update_flow",
+        flowName: "销售合同变更",
+        contractId: rowData.value.id,
+      },
+    });
+  } else {
+    actionType.value = false;
+  }
+};
+const toDtl = (row) => {
+  // actionType.value = true;
+  // rowData.value = row;
+  proxy.$router.push({
+    path: "/main/productionOrderDetails",
+    query: {
+      data: JSON.stringify(row),
+    },
+  });
+};
+const listConfig = ref([
+  {
+    label: "生产公司",
+    prop: "companyName",
+  },
+  {
+    label: "订单号",
+    prop: "code",
+  },
+  {
+    label: "下单时间",
+    prop: "createTime",
+  },
+  {
+    label: "交期",
+    prop: "deliveryPeriod",
+  },
+  {
+    label: "投产时间",
+    prop: "produceTime",
+  },
+]);
+</script>
+
+<style lang="scss" scoped>
+.list {
+  min-height: 70vh;
+}
+</style>

+ 84 - 72
src/views/MES/productionReport/add.vue

@@ -2,82 +2,93 @@
   <div class="form" style="padding-bottom: 60px">
     <van-nav-bar :title="'生产报工'" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft">
     </van-nav-bar>
+    <van-tabs v-model:active="active">
+      <van-tab title="报工" :name="0" />
+      <van-tab title="产品信息" :name="1" />
+
+    </van-tabs>
     <van-form @submit="onSubmit" label-align="top" style="margin-top: 20px">
-      <TitleInfo :title="'产品信息'"></TitleInfo>
-      <van-cell-group inset>
-        <van-field v-model="formData.productCode" readonly label="编码" />
-        <van-field v-model="formData.productName" readonly label="名称" />
-        <van-field v-model="formData.productSize" readonly label="尺寸cm" />
-        <van-field readonly label="产品图 / 设计图">
-          <template #input>
-            <div style="display:flex;">
-              <div style="margin-right:20px">
-                <img v-if="formData.productUrl" :src="formData.productUrl" alt="" class="pic"
-                     @click="onPreviewFile(formData.productImgName,formData.productUrl)">
-              </div>
-              <div>
-                <img v-if="formData.productUrlOne" :src="formData.productUrlOne" alt="" class="pic"
-                     @click="onPreviewFile(formData.productImgNameOne,formData.productUrlOne)">
+
+      <div v-show="active==1">
+        <TitleInfo :title="'产品信息'"></TitleInfo>
+        <van-cell-group inset>
+          <van-field v-model="formData.productCode" readonly label="编码" />
+          <van-field v-model="formData.productName" readonly label="名称" />
+          <van-field v-model="formData.productSize" readonly label="尺寸cm" />
+          <van-field readonly label="产品图 / 设计图">
+            <template #input>
+              <div style="display:flex;">
+                <div style="margin-right:20px">
+                  <img v-if="formData.productUrl" :src="formData.productUrl" alt="" class="pic"
+                       @click="onPreviewFile(formData.productImgName,formData.productUrl)">
+                </div>
+                <div>
+                  <img v-if="formData.productUrlOne" :src="formData.productUrlOne" alt="" class="pic"
+                       @click="onPreviewFile(formData.productImgNameOne,formData.productUrlOne)">
+                </div>
               </div>
-            </div>
-          </template>
-        </van-field>
-        <van-field v-model="formData.quantity" readonly label="数量" />
-      </van-cell-group>
-      <div style="height:20px"></div>
-      <TitleInfo :title="'原材料信息'"></TitleInfo>
-      <van-cell-group inset>
-        <van-field v-model="formData.rawMaterialCode" readonly label="编码" />
-        <van-field v-model="formData.rawMaterialName" readonly label="名称" />
-        <van-field v-model="formData.materialSize" readonly label="尺寸cm" />
-      </van-cell-group>
-      <div style="height:20px"></div>
-      <TitleInfo :title="'包材信息'"></TitleInfo>
-      <div style="padding:10px 10px;background:#fff">
-        <table border class="table">
-          <thead>
-            <tr>
-              <th style="width:90px;">编码</th>
-              <th style="min-width:100px">名称</th>
-              <th style="width:50px">数量</th>
-            </tr>
-          </thead>
-          <tbody v-if="formData.contractProductBomList && formData.contractProductBomList.length>0">
-            <tr v-for="item in formData.contractProductBomList" :key="item.id">
-              <td>{{item.productCode}}</td>
-              <td>{{item.productName}}</td>
-              <td>{{item.quantity}}</td>
-            </tr>
-          </tbody>
-        </table>
+            </template>
+          </van-field>
+          <van-field v-model="formData.quantity" readonly label="数量" />
+        </van-cell-group>
+        <div style="height:20px"></div>
+        <TitleInfo :title="'原材料信息'"></TitleInfo>
+        <van-cell-group inset>
+          <van-field v-model="formData.rawMaterialCode" readonly label="编码" />
+          <van-field v-model="formData.rawMaterialName" readonly label="名称" />
+          <van-field v-model="formData.materialSize" readonly label="尺寸cm" />
+        </van-cell-group>
+        <div style="height:20px"></div>
+        <TitleInfo :title="'包材信息'"></TitleInfo>
+        <div style="padding:10px 10px;background:#fff">
+          <table border class="table">
+            <thead>
+              <tr>
+                <th style="width:90px;">编码</th>
+                <th style="min-width:100px">名称</th>
+                <th style="width:50px">数量</th>
+              </tr>
+            </thead>
+            <tbody v-if="formData.contractProductBomList && formData.contractProductBomList.length>0">
+              <tr v-for="item in formData.contractProductBomList" :key="item.id">
+                <td>{{item.productCode}}</td>
+                <td>{{item.productName}}</td>
+                <td>{{item.quantity}}</td>
+              </tr>
+            </tbody>
+          </table>
+        </div>
       </div>
-      <div style="height:20px"></div>
-      <TitleInfo :title="'报工'"></TitleInfo>
-      <van-cell-group inset>
-        <van-field v-model="formData.finishQuantity" readonly label="已报工数量" />
-        <van-field v-model="submitData.productionProcessesIdName" is-link label="工序" readonly :placeholder="'请选择工序'" @click="showPicker = true"
-                   :rules="[{ required: true, message: '请选择工序'}]" required />
-        <van-field v-model="submitData.quantity" label="数量" :type="'digit'" :rules="[{ required: true, message: '请输入数量'}]" required />
-        <van-field v-model="submitData.userSetName" is-link label="报工人" readonly :placeholder="'请选择报工人'" @click="showPickerOne = true"
-                   :rules="[{ required: true, message: '请选择报工人'}]" required />
-      </van-cell-group>
-      <van-popup v-model:show="showPicker" round position="bottom">
-        <van-picker :columns="columns" @cancel="showPicker = false" @confirm="onConfirm" />
-      </van-popup>
-      <van-popup v-model:show="showPickerOne" round position="bottom" :style="{ height: '60%' }">
-        <div style="padding: 10px; height: calc(100% - 40px)">
-          <div style="display: flex; justify-content: space-between">
-            <van-button plain type="primary" @click="showPickerOne = false" style="border: none">关闭</van-button>
-            <van-button plain type="primary" style="border: none" @click="showPickerOne = false">确定</van-button>
-          </div>
-          <div style="height: calc(100% - 30px); overflow: auto">
-            <van-checkbox-group v-model="submitData.userSet" @change="(val) => handleSelectPeople(val)">
-              <van-checkbox :name="item.value" v-for="(item, index) in userList" :key="item.value" style="margin-top: 5px">
-                {{ item.label }}</van-checkbox>
-            </van-checkbox-group>
+      <!-- <div style="height:20px"></div> -->
+
+      <div v-show="active==0">
+        <TitleInfo :title="'报工'"></TitleInfo>
+        <van-cell-group inset>
+          <van-field v-model="submitData.productionProcessesIdName" is-link label="工序" readonly :placeholder="'请选择工序'" @click="showPicker = true"
+                     :rules="[{ required: true, message: '请选择工序'}]" required />
+          <van-field v-model="formData.finishQuantity" readonly label="已报工数量" />
+          <van-field v-model="submitData.quantity" label="数量" :type="'digit'" :rules="[{ required: true, message: '请输入数量'}]" required />
+          <van-field v-model="submitData.userSetName" is-link label="报工人" readonly :placeholder="'请选择报工人'" @click="showPickerOne = true"
+                     :rules="[{ required: true, message: '请选择报工人'}]" required />
+        </van-cell-group>
+        <van-popup v-model:show="showPicker" round position="bottom">
+          <van-picker :columns="columns" @cancel="showPicker = false" @confirm="onConfirm" />
+        </van-popup>
+        <van-popup v-model:show="showPickerOne" round position="bottom" :style="{ height: '60%' }">
+          <div style="padding: 10px; height: calc(100% - 40px)">
+            <div style="display: flex; justify-content: space-between">
+              <van-button plain type="primary" @click="showPickerOne = false" style="border: none">关闭</van-button>
+              <van-button plain type="primary" style="border: none" @click="showPickerOne = false">确定</van-button>
+            </div>
+            <div style="height: calc(100% - 30px); overflow: auto">
+              <van-checkbox-group v-model="submitData.userSet" @change="(val) => handleSelectPeople(val)">
+                <van-checkbox :name="item.value" v-for="(item, index) in userList" :key="item.value" style="margin-top: 5px">
+                  {{ item.label }}</van-checkbox>
+              </van-checkbox-group>
+            </div>
           </div>
-        </div>
-      </van-popup>
+        </van-popup>
+      </div>
       <div style="margin: 16px">
         <van-button round block type="primary" native-type="submit">
           提交
@@ -97,6 +108,7 @@ import { showConfirmDialog } from "vant";
 
 const proxy = getCurrentInstance().proxy;
 const route = useRoute();
+const active = ref(0);
 const showPicker = ref(false);
 const showPickerOne = ref(false);
 const formData = ref({

+ 190 - 0
src/views/MES/productionTask/details.vue

@@ -0,0 +1,190 @@
+<template>
+  <div class="form">
+    <van-nav-bar :title="'生产任务详情'" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft">
+    </van-nav-bar>
+    <testForm v-model="formData.data" :formOption="formOption" :formConfig="formConfig" :rules="rules" @onSubmit="onSubmit" ref="formDom"></testForm>
+  </div>
+</template>
+
+<script setup>
+import { ref, reactive, getCurrentInstance, onMounted } from "vue";
+import { showSuccessToast, showFailToast } from "vant";
+import { useRoute } from "vue-router";
+import testForm from "@/components/testForm/index.vue";
+const proxy = getCurrentInstance().proxy;
+const route = useRoute();
+const formDom = ref(null);
+const formData = reactive({
+  data: {},
+});
+const rules = {
+  contractId: [
+    {
+      required: true,
+      message: proxy.t("claim.contractCanNotBeEmpty"),
+    },
+  ],
+  money: [
+    {
+      required: true,
+      message: proxy.t("claim.relatedAmountCanNotBeEmpty"),
+    },
+  ],
+};
+const formOption = reactive({
+  readonly: true, //用于控制整个表单是否只读
+  disabled: false,
+  labelAlign: "top",
+  scroll: true,
+  labelWidth: "62pk",
+  submitBtnText: proxy.t("common.submit"),
+  hiddenSubmitBtn: true,
+  btnConfig: {
+    isNeed: false,
+    listTitle: "工序",
+    prop: "productionTaskProgressList",
+    plain: true,
+    listConfig: [
+      {
+        type: "input",
+        itemType: "text",
+        label: "工序名称",
+        prop: "progressName",
+      },
+      {
+        type: "input",
+        itemType: "text",
+        label: "完成数量",
+        prop: "finishQuantity",
+      },
+    ],
+    clickFn: () => {},
+  },
+});
+const statusData = ref([
+  {
+    label: "未开始",
+    value: "0",
+  },
+  {
+    label: "进行中",
+    value: "1",
+  },
+  {
+    label: "已完成",
+    value: "2",
+  },
+]);
+const contractProdTag = ref([]);
+const getDict = () => {
+  proxy.getDictOne(["contract_prod_tag"]).then((res) => {
+    contractProdTag.value = res["contract_prod_tag"].data.map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+    formData.data.produceStatusName = proxy.dictValueLabel(
+      formData.data.produceStatus,
+      statusData.value
+    );
+    if (formData.data.prodTag) {
+      formData.data.prodTagName = "";
+      formData.data.prodTags = formData.data.prodTag.split(",");
+      if (formData.data.prodTags && formData.data.prodTags.length > 0) {
+        formData.data.prodTags.map((x, index) => {
+          formData.data.prodTagName +=
+            " " + proxy.dictValueLabel(x, contractProdTag.value);
+        });
+      }
+    }
+  });
+};
+
+const formConfig = reactive([
+  {
+    type: "input",
+    label: "生产公司",
+    prop: "companyName",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "订单号",
+    prop: "orderCode",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "产品编码",
+    prop: "productCode",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "产品名称",
+    prop: "productName",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "生产件数",
+    prop: "quantity",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "生产状态",
+    prop: "produceStatusName",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "下单时间",
+    prop: "orderCreateTime",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "交期",
+    prop: "deliveryPeriod",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "投产时间",
+    prop: "produceTime",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "完成时间",
+    prop: "finishTime",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "生产用时",
+    prop: "usageTime",
+    itemType: "text",
+    readonly: true,
+  },
+]);
+const onClickLeft = () => history.back();
+onMounted(() => {
+  if (route.query && route.query.data) {
+    formData.data = JSON.parse(route.query.data);
+    getDict();
+  }
+});
+</script>
+<style lang="scss" scoped>
+</style>

+ 146 - 0
src/views/MES/productionTask/index.vue

@@ -0,0 +1,146 @@
+<template>
+  <van-nav-bar :title="'生产任务'" left-text="" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
+    <!-- <template #right>
+      {{ $t("common.add") }}
+    </template> -->
+  </van-nav-bar>
+  <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="onRefresh" />
+  <van-pull-refresh v-model="loading" @refresh="onRefresh">
+    <div class="list">
+      <van-list v-model:loading="loading" :finished="finished" :finished-text="$t('common.noMore')" @load="getList" style="margin-bottom: 60px">
+        <commonList :data="listData" @onClick="toDtl" :config="listConfig"></commonList>
+      </van-list>
+    </div>
+  </van-pull-refresh>
+  <!-- <van-action-sheet v-model:show="actionType" :actions="actions" @select="onSelect" /> -->
+</template>
+<script setup>
+import { ref, getCurrentInstance } from "vue";
+import commonList from "@/components/common-list.vue";
+
+const proxy = getCurrentInstance().proxy;
+const onClickLeft = () => proxy.$router.push("/main/working");
+const onClickRight = () => {
+  proxy.$router.push({
+    path: "/main/processDtl",
+    query: {
+      flowKey: "contract_flow",
+    },
+  });
+};
+const actionType = ref(false);
+const actions = ref([
+  {
+    name: proxy.t("common.view"),
+    type: "1",
+  },
+  {
+    name: proxy.t("common.contractChange"),
+    type: "2",
+  },
+  {
+    name: proxy.t("common.cancel"),
+  },
+]);
+const req = ref({
+  pageNum: 1,
+  keyword: null,
+});
+const finished = ref(false);
+const onRefresh = () => {
+  req.value.pageNum = 1;
+  finished.value = false;
+  getList("refresh");
+};
+const loading = ref(false);
+const listData = ref([]);
+const getList = (type) => {
+  loading.value = true;
+  proxy
+    .post("/produceOrderDetail/page", req.value)
+    .then((res) => {
+      // if (res.data.rows && res.data.rows.length > 0) {
+      //   res.data.rows = res.data.rows.map((item) => {
+      //     return {
+      //       ...item,
+      //       currencyAmount: item.currency + " " + item.amount,
+      //     };
+      //   });
+      // }
+      listData.value =
+        type === "refresh"
+          ? res.data.rows
+          : listData.value.concat(res.data.rows);
+      if (req.value.pageNum * 10 >= res.data.total) {
+        finished.value = true;
+      }
+      req.value.pageNum++;
+      loading.value = false;
+    })
+    .catch(() => {
+      loading.value = false;
+    });
+};
+let rowData = ref({});
+const onSelect = (item) => {
+  if (item.type === "1") {
+    proxy.$router.push({
+      path: "/main/processDtl",
+      query: {
+        flowKey: "contract_flow",
+        id: rowData.value.flowId,
+        processType: 20,
+      },
+    });
+  } else if (item.type === "2") {
+    proxy.$router.push({
+      path: "/main/processDtl",
+      query: {
+        flowKey: "contract_update_flow",
+        flowName: "销售合同变更",
+        contractId: rowData.value.id,
+      },
+    });
+  } else {
+    actionType.value = false;
+  }
+};
+const toDtl = (row) => {
+  // actionType.value = true;
+  // rowData.value = row;
+  proxy.$router.push({
+    path: "/main/productionTaskDetails",
+    query: {
+      data: JSON.stringify(row),
+    },
+  });
+};
+const listConfig = ref([
+  {
+    label: "生产公司",
+    prop: "companyName",
+  },
+  {
+    label: "订单号",
+    prop: "orderCode",
+  },
+  {
+    label: "产品编码",
+    prop: "productCode",
+  },
+  {
+    label: "产品名称",
+    prop: "productName",
+  },
+  {
+    label: "生产件数",
+    prop: "quantity",
+  },
+]);
+</script>
+
+<style lang="scss" scoped>
+.list {
+  min-height: 70vh;
+}
+</style>

+ 2 - 2
src/views/customer/file/add.vue

@@ -158,8 +158,8 @@ const formConfig = reactive([
   },
   {
     type: "input",
-    label: proxy.t("customerFile.code"),
-    prop: "code",
+    label: "传真",
+    prop: "fax",
     itemType: "text",
   },
   {

+ 3 - 3
src/views/customer/file/detail.vue

@@ -82,8 +82,8 @@ const formConfig = reactive([
   },
   {
     type: "input",
-    label: proxy.t("customerFile.code"),
-    prop: "code",
+    label: "传真",
+    prop: "fax",
     itemType: "text",
   },
   {
@@ -153,7 +153,7 @@ const formOptionTwo = reactive({
   labelAlign: "top",
   scroll: true,
   labelWidth: "62pk",
-  hiddenSubmitBtn: false,
+  hiddenSubmitBtn: true,
   submitBtnText: proxy.t("customerFile.followUpRecord"),
   btnConfig: {
     isNeed: false,

+ 1 - 1
src/views/customer/file/index.vue

@@ -1,6 +1,6 @@
 <template>
   <van-nav-bar :title="$t('customerFile.name')" left-text="" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
-    <template #right>{{ $t("common.add") }}</template>
+    <!-- <template #right>{{ $t("common.add") }}</template> -->
   </van-nav-bar>
   <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="onRefresh" />
   <van-pull-refresh v-model="loading" @refresh="onRefresh">

+ 7 - 3
src/views/customer/highseas/index.vue

@@ -1,6 +1,6 @@
 <template>
   <van-nav-bar :title="$t('customerFile.highseasName')" left-text="" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
-    <template #right>{{ $t("common.add") }}</template>
+    <!-- <template #right>{{ $t("common.add") }}</template> -->
   </van-nav-bar>
   <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="onRefresh" />
   <van-pull-refresh v-model="loading" @refresh="onRefresh">
@@ -47,11 +47,15 @@ const getList = (type) => {
         res.data.rows = res.data.rows.map((item) => {
           return {
             ...item,
-            cityText: item.countryName + "," + item.provinceName + "," + item.cityName,
+            cityText:
+              item.countryName + "," + item.provinceName + "," + item.cityName,
           };
         });
       }
-      listData.value = type === "refresh" ? res.data.rows : listData.value.concat(res.data.rows);
+      listData.value =
+        type === "refresh"
+          ? res.data.rows
+          : listData.value.concat(res.data.rows);
       if (req.value.pageNum * 10 >= res.data.total) {
         finished.value = true;
       }

+ 7 - 3
src/views/customer/privatesea/index.vue

@@ -1,6 +1,6 @@
 <template>
   <van-nav-bar :title="$t('customerFile.privateseaName')" left-text="" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
-    <template #right>{{ $t("common.add") }}</template>
+    <!-- <template #right>{{ $t("common.add") }}</template> -->
   </van-nav-bar>
   <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="onRefresh" />
   <van-pull-refresh v-model="loading" @refresh="onRefresh">
@@ -46,11 +46,15 @@ const getList = (type) => {
         res.data.rows = res.data.rows.map((item) => {
           return {
             ...item,
-            cityText: item.countryName + "," + item.provinceName + "," + item.cityName,
+            cityText:
+              item.countryName + "," + item.provinceName + "," + item.cityName,
           };
         });
       }
-      listData.value = type === "refresh" ? res.data.rows : listData.value.concat(res.data.rows);
+      listData.value =
+        type === "refresh"
+          ? res.data.rows
+          : listData.value.concat(res.data.rows);
       if (req.value.pageNum * 10 >= res.data.total) {
         finished.value = true;
       }

+ 291 - 296
src/views/home/index.vue

@@ -1,309 +1,304 @@
 <template>
-	<div class="home">
-		<van-nav-bar :title="$t('userCenter.customerPortrait')" left-text="" >
-			
-		</van-nav-bar>
-		<div class="user-info-card">
-			<div class="img-box">
-				<img src="../../assets/images/people.png" alt="" />
-			</div>
-			<div class="text-box">
-				<div class="name">{{userInfo.nickName}}</div>
-				<div class="company">{{userInfo.dept ? userInfo.dept.deptName  : ''}}</div>
-			</div>
-		</div>
-		<div class="fun-box">
-			<div class="title">
-				常用功能
-			</div>
-			<div class="lists">
-				<div class="fun-item" @click="toRouter('message')">
-					<div class="icon-box">
-						<img src="../../assets/images/iconm_xiaoxtz.png" alt="">
-					</div>
-					<div class="text">{{$t('userCenter.messageCenter')}}</div>
-				</div>
-				<div class="fun-item" @click="toRouter('email')">
-					<div class="icon-box">
-						<img src="../../assets/images/iconm_dianzyx.png" alt="">
-					</div>
-					<div class="text">{{$t('userCenter.myMailbox')}}</div>
-				</div>
-				<div class="fun-item" @click="toRouter('working')">
-					<div class="icon-box">
-						<img src="../../assets/images/iconm_jichupeiz.png" alt="">
-					</div>
-					<div class="text">{{$t('userCenter.workbench')}}</div>
-				</div>
-				<div class="fun-item" @click="toRouter('processApproval?status=1')">
-					<div class="icon-box">
-						<img src="../../assets/images/iconm_lissp.png" alt="">
-					</div>
-					<div class="text">{{$t('userCenter.pendingApproval')}}</div>
-				</div>
-			</div>
-		</div>
-		
-		<ul class="set-list">
-			<li @click="switchLanguage()">
-				<div class="icon-box">
-					<i class="iconfont icon-iconm_qiehyy"></i>
-				</div>
-				<div class="text">{{$t('userCenter.switchLanguage')}}</div>
-				<div class="more">
-					<van-icon name="arrow" size="16" />
-				</div>
-			</li>
-			<li @click="toRouter('feedback')">
-				<div class="icon-box">
-					<i class="iconfont icon-iconm_yijianfk"></i>
-				</div>
-				<div class="text">{{$t('userCenter.myFeedback')}}</div>
-				<div class="more">
-					<van-icon name="arrow" size="16" />
-				</div>
-			</li>
-			<li @click="toRouter('coming')">
-				<div class="icon-box">
-					<i class="iconfont icon-icomx_message"></i>
-				</div>
-				<div class="text">{{$t('userCenter.contactUs')}}</div>
-				<div class="more">
-					<van-icon name="arrow" size="16" />
-				</div>
-			</li>
-			<li @click="toRouter('changePassword')">
-				<div class="icon-box">
-					<i class="iconfont icon-icomx_bianj"></i>
-				</div>
-				<div class="text">{{$t('userCenter.modifyPassword')}}</div>
-				<div class="more">
-					<van-icon name="arrow" size="16" />
-				</div>
-			</li>
-			
-			
-		</ul>
-		<van-button class="logout" v-if="!corpId" type="primary" @click="logout" block
-			>{{$t('userCenter.logOut')}}</van-button
-		>
-	</div>
+  <div class="home">
+    <van-nav-bar :title="$t('userCenter.customerPortrait')" left-text="">
+
+    </van-nav-bar>
+    <div class="user-info-card">
+      <div class="img-box">
+        <img src="../../assets/images/people.png" alt="" />
+      </div>
+      <div class="text-box">
+        <div class="name">{{userInfo.nickName}}</div>
+        <div class="company">{{userInfo.dept ? userInfo.dept.deptName  : ''}}</div>
+      </div>
+    </div>
+    <div class="fun-box">
+      <div class="title">
+        常用功能
+      </div>
+      <div class="lists">
+        <div class="fun-item" @click="toRouter('message')">
+          <div class="icon-box">
+            <img src="../../assets/images/iconm_xiaoxtz.png" alt="">
+          </div>
+          <div class="text">{{$t('userCenter.messageCenter')}}</div>
+        </div>
+        <div class="fun-item" @click="toRouter('email')">
+          <div class="icon-box">
+            <img src="../../assets/images/iconm_dianzyx.png" alt="">
+          </div>
+          <div class="text">{{$t('userCenter.myMailbox')}}</div>
+        </div>
+        <div class="fun-item" @click="toRouter('working')">
+          <div class="icon-box">
+            <img src="../../assets/images/iconm_jichupeiz.png" alt="">
+          </div>
+          <div class="text">{{$t('userCenter.workbench')}}</div>
+        </div>
+        <div class="fun-item" @click="toRouter('processApproval?status=1')">
+          <div class="icon-box">
+            <img src="../../assets/images/iconm_lissp.png" alt="">
+          </div>
+          <div class="text">{{$t('userCenter.pendingApproval')}}</div>
+        </div>
+      </div>
+    </div>
+
+    <ul class="set-list">
+      <li @click="switchLanguage()">
+        <div class="icon-box">
+          <i class="iconfont icon-iconm_qiehyy"></i>
+        </div>
+        <div class="text">{{$t('userCenter.switchLanguage')}}</div>
+        <div class="more">
+          <van-icon name="arrow" size="16" />
+        </div>
+      </li>
+      <li @click="toRouter('feedback')">
+        <div class="icon-box">
+          <i class="iconfont icon-iconm_yijianfk"></i>
+        </div>
+        <div class="text">{{$t('userCenter.myFeedback')}}</div>
+        <div class="more">
+          <van-icon name="arrow" size="16" />
+        </div>
+      </li>
+      <li @click="toRouter('coming')">
+        <div class="icon-box">
+          <i class="iconfont icon-icomx_message"></i>
+        </div>
+        <div class="text">{{$t('userCenter.contactUs')}}</div>
+        <div class="more">
+          <van-icon name="arrow" size="16" />
+        </div>
+      </li>
+      <li @click="toRouter('changePassword')">
+        <div class="icon-box">
+          <i class="iconfont icon-icomx_bianj"></i>
+        </div>
+        <div class="text">{{$t('userCenter.modifyPassword')}}</div>
+        <div class="more">
+          <van-icon name="arrow" size="16" />
+        </div>
+      </li>
+
+    </ul>
+    <van-button class="logout" v-if="!corpId" type="primary" @click="logout" block>{{$t('userCenter.logOut')}}</van-button>
+  </div>
 </template>
 <script setup>
-import { ref, getCurrentInstance, onMounted } from 'vue'
-import { showSuccessToast, showFailToast,showConfirmDialog } from 'vant'
-import { useRoute } from 'vue-router'
-import { getUserInfo } from '@/utils/auth'
-const onClickLeft = () => history.back()
-const proxy = getCurrentInstance().proxy
-const userInfo = ref(getUserInfo())
-const corpId = window.localStorage.getItem('corpId')
-console.log(userInfo)
+import { ref, getCurrentInstance, onMounted } from "vue";
+import { showSuccessToast, showFailToast, showConfirmDialog } from "vant";
+import { useRoute } from "vue-router";
+import { getUserInfo } from "@/utils/auth";
+const onClickLeft = () => history.back();
+const proxy = getCurrentInstance().proxy;
+const userInfo = ref(getUserInfo());
+const corpId = window.localStorage.getItem("corpId");
+console.log(userInfo);
 const toMessageList = () => {
-	proxy.$router.push('/main/messageList')
-}
+  proxy.$router.push("/main/messageList");
+};
 const toRouter = (url) => {
-    proxy.$router.push('/main/' + url)
-}
+  proxy.$router.push("/main/" + url);
+};
 const switchLanguage = () => {
-	console.log(proxy.$i18n.locale)
-	proxy.$i18n.locale = proxy.$i18n.locale == 'zh-cn' ? 'en-us' : 'zh-cn'
-	window.localStorage.setItem('lang', proxy.$i18n.locale)
-}
+  console.log(proxy.$i18n.locale);
+  proxy.$i18n.locale = proxy.$i18n.locale == "zh-cn" ? "en-us" : "zh-cn";
+  window.localStorage.setItem("lang", proxy.$i18n.locale);
+};
 const logout = () => {
-	showConfirmDialog({
-		title: proxy.t('common.prompt'),
-		message: proxy.t('userCenter.areYouSureYouWantToExitThisLogin'),
-	}).then(() => {
-		proxy.get('logout').then((res) => {
-            if (res.code == 200) {
-                showSuccessToast(proxy.t('userCenter.logOutSuccess'),)
-				//localStorage.clear()
-                //清除路由历史记录
-                proxy.$router.replace('/?id=$CORPID$')
-            } else {
-                showFailToast(proxy.t('userCenter.logOutFailed'),)
-            }
-        })
-	})
-	
-}
+  showConfirmDialog({
+    title: proxy.t("common.prompt"),
+    message: proxy.t("userCenter.areYouSureYouWantToExitThisLogin"),
+  }).then(() => {
+    proxy.get("logout").then((res) => {
+      if (res.code == 200) {
+        showSuccessToast(proxy.t("userCenter.logOutSuccess"));
+        //localStorage.clear()
+        //清除路由历史记录
+        proxy.$router.replace("/?id=$CORPID$");
+        window.localStorage.setItem("rememberMe", false);
+      } else {
+        showFailToast(proxy.t("userCenter.logOutFailed"));
+      }
+    });
+  });
+};
 </script>
 <style lang="scss">
 .home {
-	min-height: calc(100%);
-	.fun-box{
-		padding: 20px 12px;
-		background: #fff;
-		margin: 12px;
-		border-radius: 12px;
-		.title{
-			margin-bottom: 20px;
-			font-size: 16px;
-			font-weight: bold;
-		}
-		.lists{
-			display: flex;
-			flex-wrap: wrap;
-			justify-content: space-between;
-		}
-		.fun-item {
-			width: 25%;
-			text-align: center;
-			.icon-box{
-				img{
-					width: 32px;
-				}
-			}
-			.text{
-				line-height: 30px;
-				font-size: 14px;
-				color: #333;
-			}
-		}
-	}
-	.user-info-card{
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		padding: 35px 12px;
-		height: 80px;
-		background: linear-gradient(180deg, #46A6FF 0%, #0084FF 100%);
-		margin: 12px;
-		border-radius: 12px;
-		.img-box {
-			width: 60px;
-			height: 60px;
-			background-color: #f1f1f1;
-			border-radius: 50%;
-			text-align: center;
-			img {
-				width: 40px;
-				margin-top: 10px;
-			}
-			overflow: hidden;
-		}
-		.text-box {
-			flex: 1;
-			margin: 0 12px;
-			color: #fff;
-			.name {
-				font-size: 20px;
-				font-weight: bold;
-				margin: 5px 0;
-			}
-			.company {
-				font-size: 14px;
-				
-			}
-		}
-		.more {
-			line-height: 60px;
-			i {
-				color: #999;
-			}
-		}
-	}
-	.van-nav-bar {
-		background: rgba(0, 0, 0, 0);
-	}
-	.logout {
-		border-radius: 22px;
-		background: #fff;
-		border: 1px solid #fff;
-		color: #0084FF;
-		width: calc(100% - 24px);
-		margin: 0 12px;
-		
-	}
-	.set-list {
-		margin: 12px;
-		background: #fff;
-		border-radius: 10px;
-		padding: 20px 12px;
-		color: #333;
-		li {
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			height: 40px;
-			
-			.icon-box {
-				width: 40px;
-				height: 40px;
-				text-align: center;
-				line-height: 40px;
-				i {
-					font-size: 20px;
-					color:#333;
-				}
-			}
-			.text {
-				flex: 1;
-				margin-right:12px;
-				font-size: 16px;
-				color: #333;
-			}
-			.more {
-				i {
-					color: #999;
-				}
-			}
-		}
-	}
-	.header {
-		background: linear-gradient(180deg, #3370ff 0%, #f1f1f1 100%);
-		height: 250px;
-		.user-info {
-			display: flex;
-			justify-content: space-between;
-			padding: 0 12px;
-			height: 60px;
-			margin-top: 10px;
-			.user-text {
-				color: #fff;
-				.name {
-					font-size: 20px;
-					font-weight: bold;
-					margin: 5px 0;
-					width: calc(100vw - 140px);
-				}
-			}
-			.user-icon {
-				width: 60px;
-				height: 60px;
-				background-color: #f1f1f1;
-				border-radius: 50%;
-				text-align: center;
+  min-height: calc(100%);
+  .fun-box {
+    padding: 20px 12px;
+    background: #fff;
+    margin: 12px;
+    border-radius: 12px;
+    .title {
+      margin-bottom: 20px;
+      font-size: 16px;
+      font-weight: bold;
+    }
+    .lists {
+      display: flex;
+      flex-wrap: wrap;
+      justify-content: space-between;
+    }
+    .fun-item {
+      width: 25%;
+      text-align: center;
+      .icon-box {
+        img {
+          width: 32px;
+        }
+      }
+      .text {
+        line-height: 30px;
+        font-size: 14px;
+        color: #333;
+      }
+    }
+  }
+  .user-info-card {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 35px 12px;
+    height: 80px;
+    background: linear-gradient(180deg, #46a6ff 0%, #0084ff 100%);
+    margin: 12px;
+    border-radius: 12px;
+    .img-box {
+      width: 60px;
+      height: 60px;
+      background-color: #f1f1f1;
+      border-radius: 50%;
+      text-align: center;
+      img {
+        width: 40px;
+        margin-top: 10px;
+      }
+      overflow: hidden;
+    }
+    .text-box {
+      flex: 1;
+      margin: 0 12px;
+      color: #fff;
+      .name {
+        font-size: 20px;
+        font-weight: bold;
+        margin: 5px 0;
+      }
+      .company {
+        font-size: 14px;
+      }
+    }
+    .more {
+      line-height: 60px;
+      i {
+        color: #999;
+      }
+    }
+  }
+  .van-nav-bar {
+    background: rgba(0, 0, 0, 0);
+  }
+  .logout {
+    border-radius: 22px;
+    background: #fff;
+    border: 1px solid #fff;
+    color: #0084ff;
+    width: calc(100% - 24px);
+    margin: 0 12px;
+  }
+  .set-list {
+    margin: 12px;
+    background: #fff;
+    border-radius: 10px;
+    padding: 20px 12px;
+    color: #333;
+    li {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      height: 40px;
+
+      .icon-box {
+        width: 40px;
+        height: 40px;
+        text-align: center;
+        line-height: 40px;
+        i {
+          font-size: 20px;
+          color: #333;
+        }
+      }
+      .text {
+        flex: 1;
+        margin-right: 12px;
+        font-size: 16px;
+        color: #333;
+      }
+      .more {
+        i {
+          color: #999;
+        }
+      }
+    }
+  }
+  .header {
+    background: linear-gradient(180deg, #3370ff 0%, #f1f1f1 100%);
+    height: 250px;
+    .user-info {
+      display: flex;
+      justify-content: space-between;
+      padding: 0 12px;
+      height: 60px;
+      margin-top: 10px;
+      .user-text {
+        color: #fff;
+        .name {
+          font-size: 20px;
+          font-weight: bold;
+          margin: 5px 0;
+          width: calc(100vw - 140px);
+        }
+      }
+      .user-icon {
+        width: 60px;
+        height: 60px;
+        background-color: #f1f1f1;
+        border-radius: 50%;
+        text-align: center;
 
-				img {
-					width: 40px;
-					margin-top: 10px;
-				}
-				overflow: hidden;
-			}
-			.more {
-				line-height: 60px;
-				i {
-					color: #fff;
-				}
-			}
-		}
-		.title {
-			display: flex;
-			justify-content: space-between;
-			height: 46px;
-			line-height: 46px;
-			padding: 0 12px;
-			color: #fff;
-			font-size: 16px;
-			font-weight: bold;
-			.back,
-			.more {
-				width: 40px;
-				height: 100%;
-			}
-		}
-	}
+        img {
+          width: 40px;
+          margin-top: 10px;
+        }
+        overflow: hidden;
+      }
+      .more {
+        line-height: 60px;
+        i {
+          color: #fff;
+        }
+      }
+    }
+    .title {
+      display: flex;
+      justify-content: space-between;
+      height: 46px;
+      line-height: 46px;
+      padding: 0 12px;
+      color: #fff;
+      font-size: 16px;
+      font-weight: bold;
+      .back,
+      .more {
+        width: 40px;
+        height: 100%;
+      }
+    }
+  }
 }
 </style>

+ 8 - 9
src/views/login.vue

@@ -120,7 +120,6 @@ const langType = ref("zh-cn");
 const loginForm = ref({
   username: "",
   password: "",
-  rememberMe: false,
   tenantId: "000000",
   code: "",
   uuid: "",
@@ -128,11 +127,6 @@ const loginForm = ref({
 const rememberMe = ref(false);
 const clause = ref(false);
 
-const radioChange = () => {
-  console.log(loginForm.rememberMe);
-  // loginForm.value.rememberMe = loginForm.value.rememberMe ? false : false;
-};
-
 const onSubmit = () => {
   proxy
     .post("login", loginForm.value, "post", {
@@ -181,20 +175,25 @@ onMounted(() => {
   let rememberMeCopy = window.localStorage.getItem("rememberMe");
   let lang = window.localStorage.getItem("lang");
   if (!lang) {
-    langModal.value = true;
+    // langModal.value = true;
+    changeLang();
   }
-  if (rememberMeCopy == "true") {
+  if (rememberMeCopy) {
     loginForm.value.username = username;
     loginForm.value.password = password;
     rememberMe.value = true;
     loginForm.value.tenantId = tenantId;
+  } else {
+    loginForm.value.username = "";
+    loginForm.value.password = "";
+    rememberMe.value = false;
   }
 });
 const loginData = ref({});
 let code = ref("");
 const ddLoginInit = () => {
   if (getToken()) {
-    //proxy.$router.push('/main')
+    proxy.$router.push("/main");
   }
   dd.ready(function () {
     dd.ui.webViewBounce.disable();

+ 110 - 128
src/views/message/historyMessage.vue

@@ -1,136 +1,118 @@
 <template>
-    <van-nav-bar
-      :title="$t('historyMessage.name')"
-      left-text=""
-      left-arrow
-      @click-left="onClickLeft"
-      @click-right="onClickRight"
-    >
-      
-    </van-nav-bar>
-    <van-search
-      v-model="req.keyword"
-      :placeholder="$t('common.pleaseEnterKeywords')"
-      @search="onRefresh"
-    />
-    <van-pull-refresh v-model="loading" @refresh="onRefresh">
-      <div class="list">
-        <van-list
-          v-model:loading="loading"
-          :finished="finished"
-          :finished-text="$t('common.noMore')"
-          @load="getList"
-          style="margin-bottom: 60px"
-        >
-          <commonList :data="listData" @onClick="toDtl" :config="listConfig">
-            <template #typeName="{ row }">
-              <div>消息通知</div>
-            </template>
-          </commonList>
-        </van-list>
-      </div>
-    </van-pull-refresh>
-  </template>
+  <van-nav-bar :title="$t('historyMessage.name')" left-text="" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
+
+  </van-nav-bar>
+  <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="onRefresh" />
+  <van-pull-refresh v-model="loading" @refresh="onRefresh">
+    <div class="list">
+      <van-list v-model:loading="loading" :finished="finished" :finished-text="$t('common.noMore')" @load="getList" style="margin-bottom: 60px">
+        <commonList :data="listData" @onClick="toDtl" :config="listConfig">
+          <template #typeName="{ row }">
+            <div>消息通知</div>
+          </template>
+        </commonList>
+      </van-list>
+    </div>
+  </van-pull-refresh>
+</template>
   <script setup>
-  import { ref, getCurrentInstance } from "vue";
-  import commonList from "@/components/common-list.vue";
-  
-  const proxy = getCurrentInstance().proxy;
-  const onClickLeft = () => proxy.$router.push("/main/working");
-  const req = ref({
-    pageNum: 1,
-    keyword: null,
+import { ref, getCurrentInstance } from "vue";
+import commonList from "@/components/common-list.vue";
+
+const proxy = getCurrentInstance().proxy;
+const onClickLeft = () => history.back();
+const req = ref({
+  pageNum: 1,
+  keyword: null,
+});
+const finished = ref(false);
+const onRefresh = () => {
+  req.value.pageNum = 1;
+  finished.value = false;
+  getList("refresh");
+};
+const loading = ref(false);
+const listData = ref([]);
+const statusData = ref([
+  {
+    label: "草稿",
+    value: 0,
+  },
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "驳回",
+    value: 20,
+  },
+  {
+    label: "审批通过",
+    value: 30,
+  },
+  {
+    label: "终止",
+    value: 99,
+  },
+]);
+const payStatusData = ref([]);
+const getDict = () => {
+  proxy.getDictOne(["pay_status"]).then((res) => {
+    payStatusData.value = res["pay_status"].data.map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
   });
-  const finished = ref(false);
-  const onRefresh = () => {
-    req.value.pageNum = 1;
-    finished.value = false;
-    getList("refresh");
-  };
-  const loading = ref(false);
-  const listData = ref([]);
-  const statusData = ref([
-    {
-      label: "草稿",
-      value: 0,
-    },
-    {
-      label: "审批中",
-      value: 10,
-    },
-    {
-      label: "驳回",
-      value: 20,
-    },
-    {
-      label: "审批通过",
-      value: 30,
-    },
-    {
-      label: "终止",
-      value: 99,
-    },
-  ]);
-  const payStatusData = ref([]);
-  const getDict = () => {
-    proxy.getDictOne(["pay_status"]).then((res) => {
-      payStatusData.value = res["pay_status"].data.map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-    });
-  };
-  getDict();
-  const getList = (type) => {
-    loading.value = true;
-    proxy
-      .post("/pushInfo/page", req.value)
-      .then((res) => {
-        listData.value =
-          type === "refresh"
-            ? res.data.rows
-            : listData.value.concat(res.data.rows);
-        if (req.value.pageNum * 10 >= res.data.total) {
-          finished.value = true;
-        }
-        req.value.pageNum++;
-        loading.value = false;
-      })
-      .catch(() => {
-        loading.value = false;
-      });
-  };
-  const toDtl = (row) => {};
-  const onClickRight = () => {
-    proxy.$router.push({
-      path: "/main/processDtl",
-      query: {
-        flowKey: "pay_flow",
-      },
+};
+getDict();
+const getList = (type) => {
+  loading.value = true;
+  proxy
+    .post("/pushInfo/page", req.value)
+    .then((res) => {
+      listData.value =
+        type === "refresh"
+          ? res.data.rows
+          : listData.value.concat(res.data.rows);
+      if (req.value.pageNum * 10 >= res.data.total) {
+        finished.value = true;
+      }
+      req.value.pageNum++;
+      loading.value = false;
+    })
+    .catch(() => {
+      loading.value = false;
     });
-  };
-  const listConfig = ref([
-    {
-      type: "slot",
-      label: proxy.t("historyMessage.messageType"),
-      slotName: "typeName",
-    },
-    {
-      label: proxy.t("historyMessage.sendTime"),
-      prop: "createTime",
+};
+const toDtl = (row) => {};
+const onClickRight = () => {
+  proxy.$router.push({
+    path: "/main/processDtl",
+    query: {
+      flowKey: "pay_flow",
     },
-    {
-      label: proxy.t("historyMessage.messageContent"),
-      prop: "title",
-    },
-    
-   
-  ]);
-  </script>
+  });
+};
+const listConfig = ref([
+  {
+    type: "slot",
+    label: proxy.t("historyMessage.messageType"),
+    slotName: "typeName",
+  },
+  {
+    label: proxy.t("historyMessage.sendTime"),
+    prop: "createTime",
+  },
+  {
+    label: proxy.t("historyMessage.messageContent"),
+    prop: "title",
+  },
+]);
+</script>
   
   <style lang="scss" scoped>
-  .list {
-    min-height: 70vh;
-  }
-  </style>
+.list {
+  min-height: 70vh;
+}
+</style>
   

+ 2 - 2
src/views/message/index.vue

@@ -4,7 +4,7 @@
 
     </van-nav-bar>
     <ul>
-      <li @click="toRouter('announcement')">
+      <!-- <li @click="toRouter('announcement')">
         <div class="icon-box">
           <i class="iconfont icon-iconm_xitxx"></i>
         </div>
@@ -19,7 +19,7 @@
           </div>
           <van-icon name="arrow" size='16' />
         </div>
-      </li>
+      </li> -->
       <li @click="toRouter('historyMessage')">
         <div class="icon-box" style="background:#A06CFB">
           <i class="iconfont icon-iconm_yewtx"></i>

+ 78 - 42
src/views/processApproval/components/EhsdPurchase.vue

@@ -5,7 +5,7 @@
       <van-tab title="付款信息" />
       <van-tab :title="'采购明细'" />
       <van-tab :title="proxy.t('contract.otherCharges')" />
-      <van-tab :title="'到货要求'" />
+      <!-- <van-tab :title="'到货要求'" /> -->
       <div class="common-process-card" v-show="active == 0">
 
         <div style="margin-bottom:20px" v-if="route.query && route.query.businessId">
@@ -13,25 +13,49 @@
           </testForm>
         </div>
 
-        <div class="common-title">
+        <!-- <div class="common-title">
           {{ proxy.t("contract.transactionInformation") }}
-        </div>
+        </div> -->
 
         <testForm v-model="formData.data" :formOption="formOption" :formConfig="formConfig" :rules="rules" ref="formDom1">
         </testForm>
       </div>
       <div class="common-process-card" v-show="active == 1">
-        <div class="common-title">付款信息</div>
+        <!-- <div class="common-title">付款信息</div> -->
+        <van-field style="border-bottom:1px solid #0084ff;width:45%">
+          <template #input>
+            <div class="_title">
+              <div class="line"></div>
+              <div> 付款信息</div>
+            </div>
+          </template>
+        </van-field>
         <testForm v-model="formData.data" :formOption="formOption" :formConfig="formConfigOne" :rules="rules" ref="formDom2">
         </testForm>
       </div>
       <div class="common-process-card" v-show="active == 2">
-        <div class="common-title">商品信息</div>
+        <!-- <div class="common-title">商品信息</div> -->
+        <van-field style="border-bottom:1px solid #0084ff;width:45%">
+          <template #input>
+            <div class="_title">
+              <div class="line"></div>
+              <div> 采购明细</div>
+            </div>
+          </template>
+        </van-field>
         <testForm v-model="formData.data" :formOption="formGoodsOption" :formConfig="formEmptyConfig" :rules="rules" ref="formDom3">
         </testForm>
       </div>
       <div class="common-process-card" v-show="active == 3">
-        <div class="common-title">其他收费</div>
+        <!-- <div class="common-title">其他收费</div> -->
+        <van-field style="border-bottom:1px solid #0084ff;width:45%">
+          <template #input>
+            <div class="_title">
+              <div class="line"></div>
+              <div> 其他收费</div>
+            </div>
+          </template>
+        </van-field>
         <testForm v-model="formData.data" :formOption="formProjectOption" :formConfig="formEmptyConfig" :rules="rules" ref="formDom4">
         </testForm>
         <testForm v-model="formData.data" :formOption="formOption" :formConfig="formAmountProjectConfig" :rules="rules" ref="formDom5">
@@ -42,11 +66,11 @@
           </template>
         </testForm>
       </div>
-      <div class="common-process-card" v-show="active == 4">
+      <!-- <div class="common-process-card" v-show="active == 4">
         <div class="common-title">到货要求</div>
         <testForm v-model="formData.data" :formOption="formShipmentOption" :formConfig="formEmptyConfig" :rules="rulesTwo" ref="formDom6">
         </testForm>
-      </div>
+      </div> -->
     </van-tabs>
     <van-popup closeable v-model:show="showRemark" position="bottom" :style="{ height: '40%' }">
       <div style="padding: 10px; padding-bottom: 70px" class="remark-class">
@@ -112,7 +136,7 @@ const formOption = reactive({
 const formConfigCode = reactive([
   {
     type: "title",
-    title: "合同号",
+    title: "基本信息",
   },
   {
     type: "input",
@@ -314,7 +338,7 @@ const formGoodsOption = reactive({
     listConfig: [
       {
         type: "picker",
-        label: "品名称",
+        label: "品名称",
         prop: "productId",
         itemType: "onePicker",
         showPicker: false,
@@ -328,13 +352,19 @@ const formGoodsOption = reactive({
       },
       {
         type: "input",
-        label: "尺寸 cm*cm*cm",
+        label: "商品编码",
+        prop: "productCode",
+        itemType: "text",
+      },
+      {
+        type: "input",
+        label: "尺寸 (cm)",
         prop: "productModel",
         itemType: "text",
       },
       {
         type: "input",
-        label: "数量",
+        label: "采购数量",
         prop: "quantity",
         itemType: "number",
         changeFn: () => {},
@@ -353,6 +383,13 @@ const formGoodsOption = reactive({
         itemType: "number",
         changeFn: () => {},
       },
+      {
+        type: "input",
+        label: "备注",
+        prop: "remark",
+        itemType: "texteare",
+        // changeFn: () => {},
+      },
     ],
     clickFn: () => {},
     deleteFn: (index) => {},
@@ -568,21 +605,17 @@ const rulesTwo = {
 const getProduct = () => {
   return new Promise((resolve, reject) => {
     proxy
-      .post("productInfo/getConditionProductList", {
+      .post("productInfo/page", {
         pageNum: 1,
         pageSize: 9999,
-        definition: "1",
+        definition: "",
       })
       .then((res) => {
         if (res.data.rows && res.data.rows.length > 0) {
           const data = res.data.rows.map((x) => {
-            if (x.ehsdJson) {
-              let jsonObj = JSON.parse(x.ehsdJson);
-              x.nameEnglish = jsonObj.nameEnglish;
-            }
             return {
               ...x,
-              label: x.nameEnglish,
+              label: x.name,
               value: x.id,
             };
           });
@@ -668,12 +701,9 @@ const getDict = () => {
     });
   });
 
-  // 产品
-  Promise.all([getProduct(), getProductOne(), getMaterial()]).then((res) => {
-    formGoodsOption.btnConfig.listConfig[0].data = res[0].concat(
-      res[1],
-      res[2]
-    );
+  // 商品
+  Promise.all([getProduct()]).then((res) => {
+    formGoodsOption.btnConfig.listConfig[0].data = res[0].concat();
   });
 
   // 付款方式
@@ -823,14 +853,7 @@ const handleSubmit = async () => {
               active.value = 2;
               return false;
             } else {
-              return formDom6.value.validateForm().then((status3) => {
-                if (status3) {
-                  active.value = 3;
-                  return false;
-                } else {
-                  return true;
-                }
-              });
+              return true;
             }
           });
         }
@@ -846,19 +869,20 @@ onMounted(() => {
   if (route.query && route.query.businessId) {
     let businessId = route.query.businessId;
     proxy.post("/ehsdPurchase/detail", { id: businessId }).then((res) => {
-      res.data.purchaseProductList = res.data.ehsdPurchaseProductList || [];
-      let arr = [];
-      for (let i = 0; i < res.data.purchaseProductList.length; i++) {
-        const ele = res.data.purchaseProductList[i];
-        arr = arr.concat(ele.purchaseProductMountingsList);
-      }
-      res.data.purchaseProductList = arr;
+      res.data.purchaseProductList.map((x) => {
+        if (x.productLength && x.productWidth && x.productHeight) {
+          x.productModel =
+            x.productLength + "*" + x.productWidth + "*" + x.productHeight;
+        }
+      });
       res.data.countryId = res.data.sellCountryId;
       res.data.provinceId = res.data.sellProvinceId;
       res.data.cityId = res.data.sellCityId;
       res.data.buyCity =
         res.data.buyCountryName +
+        " " +
         res.data.buyProvinceName +
+        " " +
         res.data.buyCityName;
       proxy
         .post("/supplierInfo/page", { keyword: res.data.sellCorporationName })
@@ -880,7 +904,7 @@ onMounted(() => {
         res.data.sellProvinceName +
         " " +
         res.data.sellCityName;
-      if (["10", "20"].includes(route.query.processType)) {
+      if (["10", "20", "30"].includes(route.query.processType)) {
         formOption.readonly = true;
         formGoodsOption.readonly = true;
         formGoodsOption.btnConfig.isNeed = false;
@@ -898,7 +922,6 @@ onMounted(() => {
 watch(
   refProps.queryData,
   () => {
-    console.log(refProps.queryData, "aa");
     return;
     if (
       refProps.queryData.value &&
@@ -1003,4 +1026,17 @@ const showRemark = ref(false);
     object-fit: contain;
   }
 }
+._title {
+  display: flex;
+  align-items: center;
+  font-size: 14px;
+  font-weight: 700;
+  margin-left: -10px;
+  .line {
+    width: 4px;
+    background-color: #0084ff;
+    height: 15px;
+    margin-right: 8px;
+  }
+}
 </style>

+ 229 - 342
src/views/processApproval/components/SendSubscribe.vue

@@ -1,365 +1,252 @@
 <template>
-	<div class="form">
-		<van-tabs v-model:active="active">
-			<van-tab title="申购信息">
-				<div class="common-process-card">
-					<div class="common-title">申购信息</div>
-					<van-form 
-						@submit="onSubmit" 
-						label-align="top" 
-						style="margin-top: 20px" 
-						:readonly="route.query.processType == 10 || route.query.processType == 20">
-						<van-cell-group inset>
-							<van-field
-								v-model="formData.deptName"
-								is-link
-								readonly
-								:label="$t('purchased.procurementDepartment')"
-								:placeholder="$t('purchased.selectProcurementDepartment')"
-								:rules="[{ required: true, message: $t('purchased.procurementDepartmentCanNotBeEmpty') }]"
-								@click="route.query.processType == 10 || route.query.processType == 20 ? typeModal = false : typeModal = true"
-								:required="route.query.processType == 10 || route.query.processType == 20 ? false : true"
-							/>
-							<van-popup v-model:show="typeModal" round position="bottom">
-								<van-picker
-									:columns="columns"
-									@cancel="typeModal = false"
-									@confirm="onConfirm"
-								/>
-							</van-popup>
-							<van-field
-								v-model="formData.subcribeName"
-								type="text"
-								:name="$t('purchased.procurementPersonName')"
-								:label="$t('purchased.procurementPersonName')"
-								:placeholder="$t('purchased.pleaseFillInTheProcurementPersonName')"
-								:rules="[{ required: true, message: $t('purchased.procurementPersonNameCanNotBeEmpty') }]"
-								:required="route.query.processType == 10 || route.query.processType == 20 ? false : true"
-							/>
-							<van-field
-								v-model="formData.subcribeTime"
-								is-link
-								readonly
-								name="datePicker"
-								:label="$t('purchased.procurementTime')"
-								:placeholder="$t('purchased.clickToSelectTime')"
-								:rules="[{ required: true, message: $t('purchased.procurementTimeCanNotBeEmpty') }]"
-								@click="route.query.processType == 10 || route.query.processType == 20 ? timePicker = false : timePicker = true"
-								:required="route.query.processType == 10 || route.query.processType == 20 ? false : true"
-							/>
-							<van-popup v-model:show="timePicker" position="bottom">
-								<van-date-picker
-									@confirm="timeOnConfirm"
-									@cancel="timePicker = false"
-								/>
-							</van-popup>
-							<van-field
-								v-model="formData.subcribeContent"
-								type="textarea"
-								:name="$t('purchased.procurementDescription')"
-								:label="$t('purchased.procurementDescription')"
-								:placeholder="$t('purchased.pleaseFillInTheProcurementDescription')"
-								rows="3"
-							/>
-						</van-cell-group>
-
-						
-					</van-form>
-				</div>
-			</van-tab>
-			<van-tab title="明细">
-				<div class="common-process-card">
-					<div class="common-title">明细</div>
-					<!-- 明细列表 -->
-					<div  v-if="route.query.processType != 10 && route.query.processType != 20">
-						<div
-							v-for="(item, index) in formData.subscribeDetailList"
-							:key="index"
-						>
-							<div class="commons-delete">
-								<div class="title">{{$t('common.details')}}{{ index + 1 }}</div>
-								<div
-									class="delete"
-									@click.native="handleDel(index)"
-									v-if="!route.query.id"
-								>
-									<van-icon name="cross" />
-								</div>
-							</div>
-							<van-cell-group inset>
-								<van-field
-									v-model="formData.subscribeDetailList[index].bussinessName"
-									is-link
-									readonly
-									:label="$t('purchased.procurementProduct')"
-									:placeholder="$t('purchased.selectProcurementProduct')"
-									:readonly="submitType === 'edit'"
-									@click="handleSelect(index)"
-									:rules="[
-										{ required: true, message: $t('purchased.procurementProductCanNotBeEmpty') },
-									]"
-									:required="route.query.processType == 10 || route.query.processType == 20 ? false : true"
-								/>
-								<van-field
-									v-model="formData.subscribeDetailList[index].count"
-									:label="$t('subscribe.quantity')"
-									:placeholder="$t('subscribe.pleaseEnterTheQuantity')"
-									:rules="[{ required: true, message: $t('subscribe.quantityCanNotBeEmpty') }]"
-									:required="route.query.processType == 10 || route.query.processType == 20 ? false : true"
-									type="number"
-									:readonly="submitType === 'edit'"
-								/>
-
-								<van-field
-									v-model="formData.subscribeDetailList[index].content"
-									:label="$t('subscribe.cause')"
-									:placeholder="$t('subscribe.pleaseEnterTheCause')"
-									:rules="[
-										{ required: true, message: $t('subscribe.causeCanNotBeEmpty') },
-									]"
-									:readonly="submitType === 'edit'"
-									rows="3"
-									type="textarea"
-									:required="route.query.processType == 10 || route.query.processType == 20 ? false : true"
-								/>
-							</van-cell-group>
-						</div>
-						<van-popup v-model:show="typeModalOne" round position="bottom">
-							<van-picker
-								:columns="columnsOne"
-								@cancel="typeModalOne = false"
-								@confirm="(data) => onConfirmOne(data)"
-							/>
-						</van-popup>
-						<div class="commons-add-btn"  v-if="!route.query.id">
-							<van-button
-							icon="plus"
-							type="default"
-							size="small"
-							style="margin-top: 10px"
-							block
-							@click="handleAddRow"
-							>{{$t('common.addDetails')}}</van-button
-							>
-						</div>
-					</div>
-					<!-- <div style="margin: 16px" v-if="!route.query.id">
-						<van-button round block type="primary" native-type="submit">
-							{{$t('common.submit')}}
-						</van-button>
-					</div> -->
-					<div class="common-mobile-table" v-else>
-						<table>
-							<thead>
-								<tr>
-									<th>申购产品</th>
-									<th>数量</th>
-									<th>事由</th>
-								</tr>
-							</thead>
-							<tbody>
-								<tr v-for="(i,index) in formData.subscribeDetailList" :key="index">
-									<td>{{ i.name || i.bussinessName }}</td>
-									<td>{{ i.count }}</td>
-									<td>{{ i.remark || i.content }}</td>
-								</tr>
-							</tbody>
-						</table>
-					</div>
-				</div>
-			</van-tab>
-		</van-tabs>
-		
-	</div>
+  <div class="form">
+    <van-tabs v-model:active="active">
+      <van-tab :title="'申购信息'" :name="0" />
+      <van-tab title="申购明细" :name="1" />
+      <div class="common-process-card" v-show="active == 0">
+        <testForm v-model="formData.data" :formOption="formOption" :formConfig="formConfig" :rules="rules" ref="formDom1">
+        </testForm>
+      </div>
+      <div class="common-process-card" v-show="active == 1">
+        <testForm v-model="formData.data" :formOption="formGoodsOption" :formConfig="formEmptyConfig" :rules="rules" ref="formDom2">
+        </testForm>
+      </div>
+    </van-tabs>
+  </div>
 </template>
 
 <script setup>
-import { ref, getCurrentInstance, onMounted,defineProps,defineExpose,watch } from 'vue'
-import { showSuccessToast, showFailToast } from 'vant'
-import { useRoute } from 'vue-router'
+import {
+  ref,
+  getCurrentInstance,
+  onMounted,
+  defineProps,
+  defineExpose,
+  watch,
+  reactive,
+  toRefs,
+} from "vue";
+import { useRoute } from "vue-router";
+import testForm from "@/components/testForm/index.vue";
+import { getUserInfo } from "@/utils/auth";
+import { showFailToast } from "vant";
+
 // 接收父组件的传值
 const props = defineProps({
-  queryData: String,
+  queryData: Object,
 });
-
-const proxy = getCurrentInstance().proxy
-const route = useRoute()
-const typeModal = ref(false)
-const typeModalOne = ref(false)
-let selectIndex = ref(null)
-const timePicker = ref(false)
-const formData = ref({
-	productionTaskId: '',
-	code: '',
-	productName: '',
-	quantity: '',
-	personLiableName: '',
-	dueDate: '',
-	subscribeDetailList: [],
-})
-
-const active = ref(0)
+const refProps = toRefs(props);
+const proxy = getCurrentInstance().proxy;
+const route = useRoute();
+const active = ref(0);
 const tabsChange = () => {
-	active.value ++
-}
+  active.value++;
+};
+const innerMethod = ref([]);
+const outsideMethod = ref([]);
 
-const handleAddRow = () => {
-	console.log(formData.value)
-	if(!formData.value.subscribeDetailList) formData.value.subscribeDetailList = []
-	formData.value.subscribeDetailList.push({
-		bussinessId: '',
-		bussinessName: '',
-		name: '',
-		quantity: '',
-        content:"",
-        count:"",
-	})
-}
-watch(
-  props.queryData,
-  () => {
-    if (props.queryData && ["10", "20", "30"].includes(route.query.processType)) {
-      for (const key in props.queryData) {
-        formData.data[key] = props.queryData[key];
-      }
-    }
+const formData = reactive({
+  data: {},
+});
+const formDom1 = ref(null);
+const formDom2 = ref(null);
+
+const formOption = reactive({
+  readonly: false,
+  disabled: false,
+  labelAlign: "top",
+  scroll: true,
+  labelWidth: "62pk",
+  hiddenSubmitBtn: true,
+});
+const formConfig = reactive([
+  // {
+  //   type: "title",
+  //   title: "申购信息",
+  // },
+  {
+    type: "input",
+    label: "申购部门",
+    prop: "deptName",
+    itemType: "text",
+    readonly: true,
   },
   {
-    deep: true,
-  }
-);
-const timeOnConfirm = ({ selectedValues }) => {
-	formData.value.subcribeTime = selectedValues.join('-')
-	timePicker.value = false
-}
-
-const getDict = () => {
-	proxy
-		.get('/tenantDept/list', { pageNum: 1, pageSize: 9999 })
-		.then((res) => {
-			columns.value = res.data.map((item) => {
-				return {
-					...item,
-					text: item.deptName,
-					value: item.deptId,
-				}
-			})
-		})
-	setInterval(() => {
-		//停止循环
-		if (proxy.queryData) {
-			formData.value = proxy.queryData
-			clearInterval()
-		}
-	}, 1000)
-	proxy
-		.post('/productInfo/page', { pageNum: 1, pageSize: 9999 })
-		.then((res) => {
-			columnsOne.value = res.data.rows.map((item) => {
-				return {
-					...item,
-					text: item.name,
-					value: item.id,
-				}
-			})
-		})
-}
-
-const getDetails = (id) => {
-	proxy.post('/subscribe/detail', { id:id }).then((res) => {
-		res.data.subscribeDetailList.map((item) => {
-			columnsOne.value.map((itemOne) => {
-				if(itemOne.value === item.bussinessId) {
-					item.bussinessName = itemOne.name
-				}
-			})
-			
-		})
-		formData.value = res.data
-
-		
-		console.log(formData.value)
-	})
-}
-
-const columns = ref([])
-const columnsOne = ref([])
-const submitType = ref('add')
-
-const onConfirm = ({ selectedOptions }) => {
-	formData.value.deptName = selectedOptions[0].text
-	formData.value.productionTaskId = selectedOptions[0].value
-	formData.value.productName = selectedOptions[0].productName
-	formData.value.quantity = selectedOptions[0].quantity
-	formData.value.personLiableName = selectedOptions[0].personLiableName
-	formData.value.dueDate = selectedOptions[0].dueDate
-	typeModal.value = false
-}
+    type: "input",
+    label: "申购人名称",
+    prop: "subcribeName",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "picker",
+    label: "申购时间",
+    prop: "subcribeTime",
+    itemType: "datePicker",
+    showPicker: false,
+    split: "-",
+    columnsType: ["year", "month", "day"],
+  },
+  {
+    type: "input",
+    label: "申购说明",
+    prop: "subcribeContent",
+    itemType: "textarea",
+    readonly: true,
+  },
+]);
 
-const onConfirmOne = ({ selectedOptions }) => {
-	formData.value.subscribeDetailList[selectIndex.value].bussinessId =
-		selectedOptions[0].value
-	formData.value.subscribeDetailList[selectIndex.value].bussinessName =
-		selectedOptions[0].text
-	typeModalOne.value = false
-}
+const formGoodsOption = reactive({
+  readonly: true,
+  disabled: false,
+  labelAlign: "top",
+  scroll: false,
+  labelWidth: "62pk",
+  hiddenSubmitBtn: true,
+  btnConfig: {
+    isNeed: false,
+    prop: "subscribeDetailList",
+    plain: true,
+    listTitle: "物料信息",
+    listConfig: [
+      {
+        type: "picker",
+        label: "商品名称",
+        prop: "productId",
+        itemType: "onePicker",
+        showPicker: false,
+        readonly: false,
+        fieldNames: {
+          text: "name",
+          value: "id",
+        },
+        data: [],
+      },
+      {
+        type: "input",
+        label: "商品编码",
+        prop: "productCode",
+        itemType: "text",
+      },
+      {
+        type: "input",
+        label: "尺寸 (cm)",
+        prop: "productModel",
+        itemType: "text",
+      },
+      {
+        type: "input",
+        label: "申购数量",
+        prop: "count",
+        itemType: "number",
+        changeFn: () => {
+          calculatedAmount();
+        },
+      },
+      {
+        type: "input",
+        label: "备注",
+        prop: "remark",
+        itemType: "textarea",
+      },
+    ],
+    clickFn: () => {},
+    deleteFn: (index) => {},
+  },
+});
 
-const handleSelect = (index) => {
-	if(submitType.value === 'edit') return
-	selectIndex.value = index
-	typeModalOne.value = true
-}
+const rules = {
+  contractType: [
+    { required: true, message: proxy.t("contract.contractTypeMsg") },
+  ],
+  contractTemplateId: [
+    { required: true, message: proxy.t("contract.contractTemplateIdMsg") },
+  ],
+  sellCorporationId: [
+    { required: true, message: proxy.t("contract.sellCorporationIdMsg") },
+  ],
+  buyCorporationId: [
+    { required: true, message: proxy.t("contract.buyCorporationIdMsg") },
+  ],
+  sellCity: [{ required: true, message: proxy.t("contract.cityMsg") }],
+  countryCity: [{ required: true, message: proxy.t("contract.cityMsg") }],
+  sellAddress: [{ required: true, message: proxy.t("contract.addressMsg") }],
+  buyAddress: [{ required: true, message: proxy.t("contract.addressMsg") }],
+  sellContactName: [
+    { required: true, message: proxy.t("contract.contactNameMsg") },
+  ],
+  sellContactNumber: [
+    { required: true, message: proxy.t("contract.contactNumberMsg") },
+  ],
+  // buyPostalCode: [{ required: true, message: proxy.t("contract.postalCodeMsg") }],
+  buyContactName: [
+    { required: true, message: proxy.t("contract.contactNameMsg") },
+  ],
+  buyContactNumber: [
+    { required: true, message: proxy.t("contract.contactNumberMsg") },
+  ],
+  productId: [{ required: true, message: proxy.t("contract.productIdMsg") }],
+  productName: [
+    { required: true, message: proxy.t("contract.productNameMsg") },
+  ],
+  productModel: [
+    { required: true, message: proxy.t("contract.productModelMsg") },
+  ],
+  quantity: [{ required: true, message: proxy.t("contract.quantityMsg") }],
+  price: [{ required: true, message: proxy.t("contract.priceMsg") }],
+  payName: [{ required: true, message: proxy.t("contract.chargeItemMsg") }],
+  amount: [{ required: true, message: proxy.t("contract.amountMsg") }],
+};
 
-const handleDel = (index) => {
-	formData.value.subscribeDetailList.splice(index, 1)
-}
+const getDict = () => {
+  proxy
+    .post("/productInfo/page", {
+      pageNum: 1,
+      pageSize: 9999,
+      definition: "2",
+    })
+    .then((res) => {
+      formGoodsOption.btnConfig.listConfig[0].data = res.data.rows;
+    });
+};
+getDict();
 
-const onClickLeft = () => history.back()
 const handleSubmit = async () => {
-  return formData.value;
+  if (status) {
+    return formData.data;
+  }
 };
-const onSubmit = () => {
-	if (!formData.value.subscribeDetailList.length > 0)
-		return showFailToast(proxy.t('common.pleaseAddDetails'))
-	proxy.post('/flowProcess/initiate', {
-		flowKey: 'subscribe_flow',
-		data:formData.value,
-		remark:null,
-	}).then(
-		(res) => {
-			setTimeout(() => {
-				showSuccessToast(proxy.t('common.procurementSuccess'))
-				proxy.$router.push('/main/subscribe')
-			}, 500)
-		},
-		(err) => {
-			return showFailToast(err.message)
-		}
-	)
-}
+let status = ref(true);
+onMounted(() => {
+  if (route.query && route.query.businessId) {
+    formOption.readonly = true;
+    formOption.hiddenSubmitBtn = true;
+
+    let businessId = route.query.businessId;
+    proxy.post("/subscribe/detail", { id: businessId }).then((res) => {
+      formData.data = res.data;
+    });
+  }
+});
+
 defineExpose({
   handleSubmit,
-  tabsChange
+  tabsChange,
 });
-onMounted(() => {
-    
-	getDict()
-})
+onMounted(() => {});
 </script>
 <style lang="scss" scoped>
-.row {
-	display: flex;
-	padding: 5px 15px;
-	justify-content: space-between;
-	align-items: center;
-	color: #999999;
-	.title {
-		flex: 1;
-	}
-	.delete {
-		width: 20px;
-		cursor: pointer;
-		text-align: center;
-	}
+._title {
+  display: flex;
+  align-items: center;
+  font-size: 14px;
+  font-weight: 700;
+  margin-left: -10px;
+  .line {
+    width: 4px;
+    background-color: #0084ff;
+    height: 15px;
+    margin-right: 8px;
+  }
 }
-</style>
+</style>

+ 18 - 64
src/views/processApproval/processDtl.vue

@@ -1,35 +1,20 @@
 <template>
   <div class="process">
-    <van-nav-bar
-      :title="route.query.processType == 20 ? '流程详情' : '流程审批'"
-      left-text=""
-      left-arrow
-      @click-left="onClickLeft"
-    >
+    <van-nav-bar :title="route.query.processType == 20 ? '流程详情' : '流程审批'" left-text="" left-arrow @click-left="onClickLeft">
     </van-nav-bar>
     <div>
-      <component
-        ref="makeDom"
-        :queryData="queryData.data"
-        :is="
+      <component ref="makeDom" :queryData="queryData.data" :is="
           componentObj[route.query.flowKey]
             ? componentObj[route.query.flowKey].component
             : SendSubscribe
-        "
-      ></component>
+        "></component>
     </div>
     <div class="btn-warp" :class="footerMoreType ? 'open-more' : ''">
       <!-- <div class="more-btn" @click="footerMoreType = !footerMoreType">
 				更多 <van-icon name="arrow-up" v-if="!footerMoreType" /> <van-icon name="arrow-down" v-else />
 			</div> -->
       <div class="foot-btn-warp" v-if="route.query.processType != 20">
-        <div
-          class="for-btn"
-          v-for="(i, index) in approvalRecordData.buttonInfoList"
-          :key="i.type"
-          v-show="index == 0"
-          @click="handleSubmit(i.type)"
-        >
+        <div class="for-btn" v-for="(i, index) in approvalRecordData.buttonInfoList" :key="i.type" v-show="index == 0" @click="handleSubmit(i.type)">
           <div>
             <i class="iconfont" :class="iconObj[i.type]"></i>
           </div>
@@ -41,38 +26,21 @@
           </div>
           审批意见
         </div>
-        <div
-          class="for-btn"
-          @click="footerMoreBtnType = !footerMoreBtnType"
-          v-if="approvalRecordData.buttonInfoList.length > 1"
-        >
+        <div class="for-btn" @click="footerMoreBtnType = !footerMoreBtnType" v-if="approvalRecordData.buttonInfoList.length > 1">
           <div>
             <i class="iconfont icon-iconx__caidan1"></i>
           </div>
           更多
         </div>
-        <div
-          class="agree-btn"
-          @click="nextFn"
-          v-if="componentObj[route.query.flowKey].tabsNum"
-        >
+        <div class="agree-btn" @click="nextFn" v-if="componentObj[route.query.flowKey].tabsNum">
           下一步
         </div>
         <div class="next-btn" @click="handleSubmit(1)">同意</div>
       </div>
     </div>
-    <van-action-sheet
-      v-model:show="footerMoreBtnType"
-      title="更多操作"
-      class="more-modal"
-    >
-      <div
-        class="for-btn-more"
-        v-for="(i, index) in approvalRecordData.buttonInfoList"
-        :key="i.type"
-        v-show="index != 0"
-        @click="handleSubmit(i.type)"
-      >
+    <van-action-sheet v-model:show="footerMoreBtnType" title="更多操作" class="more-modal">
+      <div class="for-btn-more" v-for="(i, index) in approvalRecordData.buttonInfoList" :key="i.type" v-show="index != 0"
+           @click="handleSubmit(i.type)">
         <span style="margin-right: 20px">
           <i class="iconfont" :class="iconObj[i.type]"></i>
         </span>
@@ -80,27 +48,20 @@
       </div>
       <div style="height: 50px"></div>
     </van-action-sheet>
-    <van-action-sheet
-      v-model:show="footerMoreType"
-      title="审批记录"
-      class="more-modal"
-    >
+    <van-action-sheet v-model:show="footerMoreType" title="审批记录" class="more-modal">
       <div class="card">
         <van-steps direction="vertical" :active="stepsNum" class="common-steps">
           <van-step v-for="(i, index) in recordList" :key="i.nodeId">
             <div class="label">
               <span class="name">{{ i.processedUser }}</span>
               <span class="tip">{{ i.nodeName }}</span>
-              <span
-                class="state"
-                :class="
+              <span class="state" :class="
                   index == stepsNum
                     ? 'cl-yl'
                     : index < stepsNum
                     ? 'cl-blue'
                     : ''
-                "
-              >
+                ">
                 {{ i.nodeName }}
               </span>
             </div>
@@ -111,16 +72,8 @@
       </div>
       <div v-if="route.query.processType != 20">
         <div style="padding: 0 12px">
-          <van-field
-            v-model="flowForm.remark"
-            rows="3"
-            autosize
-            type="textarea"
-            maxlength="400"
-            placeholder="请输入审批意见"
-            show-word-limit
-            style="backround: #f1f1f1"
-          />
+          <van-field v-model="flowForm.remark" rows="3" autosize type="textarea" maxlength="400" placeholder="请输入审批意见" show-word-limit
+                     style="backround: #f1f1f1" />
         </div>
         <div style="height: 10px"></div>
         <!-- <div class="load-btn-box">
@@ -228,9 +181,10 @@ let componentObj = ref({
     tabsNum: 5,
   },
   purchase_flow: {
-    title: "采购",
-    component: SendPurchase,
-    backUrl: "/main/procureList",
+    title: "采购合同",
+    component: EhsdPurchase,
+    backUrl: "/main/working",
+    tabsNum: 4,
   },
   pay_flow: {
     title: "采购付款",

+ 86 - 57
src/views/purchase-payment/invoice/add.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="form">
-    <van-nav-bar :title="$t('invoice.' + route.query.type)" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft"> </van-nav-bar>
+    <van-nav-bar :title="'发票详情'" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft"> </van-nav-bar>
     <testForm v-model="formData.data" :formOption="formOption" :formConfig="formConfig" :rules="rules" @onSubmit="onSubmit" ref="formDom"> </testForm>
   </div>
 </template>
@@ -16,35 +16,45 @@ const proxy = getCurrentInstance().proxy;
 const onClickLeft = () => history.back();
 const route = useRoute();
 const getDict = () => {
-  proxy.post("/supplierInfo/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formConfig[0].data = res.data.rows.map((item) => {
-        return {
-          label: item.name,
-          value: item.id,
-        };
-      });
-    }
-  });
+  proxy
+    .post("/supplierInfo/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfig[0].data = res.data.rows.map((item) => {
+          return {
+            label: item.name,
+            value: item.id,
+          };
+        });
+      }
+    });
   let query = {
     pageNum: 1,
     pageSize: 999,
     tenantId: getUserInfo().tenantId,
   };
-  proxy.post("/dictTenantData/page", { ...query, dictCode: "invoice_type" }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formConfig[1].data = res.data.rows.map((item) => {
-        return {
-          label: item.dictValue,
-          value: item.dictKey,
-        };
-      });
-    }
-  });
-  proxy.get("/tenantUser/list", { pageNum: 1, pageSize: 10000, tenantId: getUserInfo().tenantId }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-    }
-  });
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "invoice_type" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfig[1].data = res.data.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: getUserInfo().tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+      }
+    });
 };
 getDict();
 const formData = reactive({
@@ -58,17 +68,17 @@ const formData = reactive({
 });
 const formDom = ref(null);
 const formOption = reactive({
-  readonly: false, //用于控制整个表单是否只读
+  readonly: true, //用于控制整个表单是否只读
   disabled: false,
   labelAlign: "top",
   scroll: true,
   labelWidth: "62pk",
-  hiddenSubmitBtn: false,
+  hiddenSubmitBtn: true,
   btnConfig: {
     isNeed: false,
     prop: "invoiceDetailsList",
     plain: true,
-    listTitle: proxy.t("invoice.purchaseContract"),
+    listTitle: "发票信息",
     listConfig: [
       {
         type: "input",
@@ -112,22 +122,26 @@ const formConfig = reactive([
     readonly: route.query.id,
     changeFn: (val, data) => {
       proxy.formChange(val, data, formData);
-      proxy.get("/purchase/getNoInvoiceListBySupplyId", { supplyId: val.selectedValues[0] }).then((res) => {
-        if (res.data && res.data.length > 0) {
-          formData.data.invoiceDetailsList = res.data.map((item) => {
-            return {
-              purchaseId: item.id,
-              code: item.code,
-              amount: item.amount,
-              sumInvoiceMoney: item.sumInvoiceMoney,
-              money: null,
-              remark: "",
-            };
-          });
-        } else {
-          formData.data.invoiceDetailsList = [];
-        }
-      });
+      proxy
+        .get("/purchase/getNoInvoiceListBySupplyId", {
+          supplyId: val.selectedValues[0],
+        })
+        .then((res) => {
+          if (res.data && res.data.length > 0) {
+            formData.data.invoiceDetailsList = res.data.map((item) => {
+              return {
+                purchaseId: item.id,
+                code: item.code,
+                amount: item.amount,
+                sumInvoiceMoney: item.sumInvoiceMoney,
+                money: null,
+                remark: "",
+              };
+            });
+          } else {
+            formData.data.invoiceDetailsList = [];
+          }
+        });
       data.showPicker = false;
     },
   },
@@ -154,21 +168,34 @@ const rules = {
   supplyId: [{ required: true, message: proxy.t("invoice.supplyNameMsg") }],
   type: [{ required: true, message: proxy.t("invoice.typeMsg") }],
   money: [{ required: true, message: proxy.t("invoice.invoiceAmountMsg") }],
-  relatedAmount: [{ required: true, message: proxy.t("invoice.relatedAmountMsg") }],
+  relatedAmount: [
+    { required: true, message: proxy.t("invoice.relatedAmountMsg") },
+  ],
 };
 const onSubmit = () => {
-  if (!(formData.data.invoiceDetailsList && formData.data.invoiceDetailsList.length > 0)) {
+  if (
+    !(
+      formData.data.invoiceDetailsList &&
+      formData.data.invoiceDetailsList.length > 0
+    )
+  ) {
     return showFailToast(proxy.t("invoice.supplierNoContract"));
   }
   let money = 0;
   for (let i = 0; i < formData.data.invoiceDetailsList.length; i++) {
-    money = parseFloat(Number(money) + Number(formData.data.invoiceDetailsList[i].money)).toFixed(2);
+    money = parseFloat(
+      Number(money) + Number(formData.data.invoiceDetailsList[i].money)
+    ).toFixed(2);
   }
   if (Number(money) != Number(formData.data.money)) {
     return showFailToast(proxy.t("invoice.unequalAmounts"));
   }
   proxy.post("/invoice/" + route.query.type, formData.data).then(() => {
-    showSuccessToast(route.query.type === "add" ? proxy.t("common.addSuccess") : proxy.t("common.modifySuccess"));
+    showSuccessToast(
+      route.query.type === "add"
+        ? proxy.t("common.addSuccess")
+        : proxy.t("common.modifySuccess")
+    );
     setTimeout(() => {
       onClickLeft();
     }, 500);
@@ -178,15 +205,17 @@ onMounted(() => {
   if (route.query.id) {
     proxy.post("/invoice/detail", { id: route.query.id }).then((res) => {
       res.data.type = res.data.type + "";
-      res.data.invoiceDetailsList = res.data.invoiceDetailsVoList.map((item) => {
-        return {
-          code: item.purchaseCode,
-          purchaseId: item.purchaseId,
-          amount: item.purchaseAmount,
-          sumInvoiceMoney: item.sumMoney,
-          money: item.money,
-        };
-      });
+      res.data.invoiceDetailsList = res.data.invoiceDetailsVoList.map(
+        (item) => {
+          return {
+            code: item.purchaseCode,
+            purchaseId: item.purchaseId,
+            amount: item.purchaseAmount,
+            sumInvoiceMoney: item.sumMoney,
+            money: item.money,
+          };
+        }
+      );
       formData.data = res.data;
     });
   }

+ 22 - 12
src/views/purchase-payment/invoice/index.vue

@@ -1,6 +1,6 @@
 <template>
   <van-nav-bar :title="$t('invoice.name')" left-text="" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
-    <template #right>{{ $t("common.add") }}</template>
+    <!-- <template #right>{{ $t("common.add") }}</template> -->
   </van-nav-bar>
   <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="onRefresh" />
   <van-pull-refresh v-model="loading" @refresh="onRefresh">
@@ -33,16 +33,23 @@ const req = ref({
 const finished = ref(false);
 const invoiceType = ref([]);
 const getDict = () => {
-  return proxy.post("/dictTenantData/page", { pageNum: 1, pageSize: 999, tenantId: getUserInfo().tenantId, dictCode: "invoice_type" }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      invoiceType.value = res.data.rows.map((item) => {
-        return {
-          label: item.dictValue,
-          value: item.dictKey,
-        };
-      });
-    }
-  });
+  return proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      tenantId: getUserInfo().tenantId,
+      dictCode: "invoice_type",
+    })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        invoiceType.value = res.data.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
 };
 getDict();
 const onRefresh = () => {
@@ -69,7 +76,10 @@ const getList = (type) => {
           };
         });
       }
-      listData.value = type === "refresh" ? res.data.rows : listData.value.concat(res.data.rows);
+      listData.value =
+        type === "refresh"
+          ? res.data.rows
+          : listData.value.concat(res.data.rows);
       if (req.value.pageNum * 10 >= res.data.total) {
         finished.value = true;
       }

+ 17 - 33
src/views/purchase-sales/inventory-management/inventoryQuery/index.vue

@@ -1,39 +1,16 @@
 <template>
-  <van-nav-bar
-    :title="$t('inventoryQuery.name')"
-    left-text=""
-    left-arrow
-    @click-left="onClickLeft"
-  >
+  <van-nav-bar :title="$t('inventoryQuery.name')" left-text="" left-arrow @click-left="onClickLeft">
   </van-nav-bar>
-  <van-search
-    v-model="req.keyword"
-    :placeholder="$t('common.pleaseEnterKeywords')"
-    @search="onRefresh"
-  />
+  <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="onRefresh" />
   <van-tabs v-model:active="active" @change="handleChangeTab">
     <van-tab :title="$t('inventoryQuery.all')" name="all"></van-tab>
-    <van-tab
-      v-for="(item, index) in warehouseData"
-      :title="item.name"
-      :name="item.id"
-    >
+    <van-tab v-for="(item, index) in warehouseData" :title="item.name" :name="item.id">
     </van-tab>
   </van-tabs>
   <van-pull-refresh v-model="loading" @refresh="onRefresh">
     <div class="list">
-      <van-list
-        v-model:loading="loading"
-        :finished="finished"
-        :finished-text="$t('common.noMore')"
-        @load="onLoad"
-        style="margin-bottom: 60px"
-      >
-        <commonList
-          :data="listData"
-          @onClick="toDtl"
-          :config="listConfig"
-        ></commonList>
+      <van-list v-model:loading="loading" :finished="finished" :finished-text="$t('common.noMore')" @load="onLoad" style="margin-bottom: 60px">
+        <commonList :data="listData" @onClick="toDtl" :config="listConfig"></commonList>
       </van-list>
     </div>
   </van-pull-refresh>
@@ -42,12 +19,15 @@
 import { ref, getCurrentInstance, onMounted } from "vue";
 import commonList from "@/components/common-list.vue";
 import { useRoute } from "vue-router";
+import { getUserInfo, getToken } from "@/utils/auth";
+
 const loading = ref(false);
 const router = useRoute();
 const req = ref({
   pageNum: 1,
   id: "",
   keyword: null,
+  companyId: getUserInfo().companyId,
 });
 const finished = ref(false);
 const proxy = getCurrentInstance().proxy;
@@ -57,15 +37,19 @@ const warehouseData = ref([]);
 const active = ref("all");
 const listConfig = ref([
   {
-    label: proxy.t('inventoryQuery.itemClassification'),
+    label: "所属分类",
     prop: "productClassifyName",
   },
   {
-    label: proxy.t('inventoryQuery.itemName'),
+    label: "物品编码",
+    prop: "productCustomCode",
+  },
+  {
+    label: proxy.t("inventoryQuery.itemName"),
     prop: "productName",
   },
   {
-    label: proxy.t('inventoryQuery.inventoryQuantity'),
+    label: proxy.t("inventoryQuery.inventoryQuantity"),
     prop: "quantity",
   },
 ]);
@@ -85,6 +69,7 @@ const onClickRight = () => {
 };
 
 const toDtl = (row) => {
+  return;
   proxy.$router.push({
     path: "outInList",
     query: {
@@ -111,7 +96,6 @@ const getList = (type) => {
       }
       req.value.pageNum++;
       loading.value = false;
-      console.log(listData.value, "wssa");
     })
     .catch((err) => {
       loading.value = false;
@@ -125,7 +109,7 @@ const getWarehouseData = () => {
 };
 
 const handleChangeTab = () => {
-  req.value.id = active.value === "all" ? "" : active.value;
+  req.value.id = active.value == "all" ? "" : active.value;
   req.value.pageNum = 1;
   listData.value = [];
   getList();

+ 102 - 29
src/views/purchase-sales/inventory-management/outInList/index.vue

@@ -1,16 +1,7 @@
 <template>
-  <van-nav-bar
-    :title="$t('inventoryQuery.inOutWarehouseFlow')"
-    left-text=""
-    left-arrow
-    @click-left="onClickLeft"
-  >
+  <van-nav-bar :title="$t('inventoryQuery.inOutWarehouseFlow')" left-text="" left-arrow @click-left="onClickLeft">
   </van-nav-bar>
-  <van-search
-    v-model="req.keyword"
-    :placeholder="$t('common.pleaseEnterKeywords')"
-    @search="onRefresh"
-  />
+  <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="onRefresh" />
   <van-tabs v-model:active="active" @change="handleChangeTab">
     <van-tab :title="$t('inventoryQuery.all')" name="all"></van-tab>
     <van-tab :title="$t('inventoryQuery.warehousing')" name="1"></van-tab>
@@ -25,31 +16,37 @@
   </van-tabs>
   <van-pull-refresh v-model="loading" @refresh="onRefresh">
     <div class="list">
-      <van-list
-        v-model:loading="loading"
-        :finished="finished"
-        :finished-text="$t('common.noMore')"
-        @load="onLoad"
-        style="margin-bottom: 60px"
-      >
+      <van-list v-model:loading="loading" :finished="finished" :finished-text="$t('common.noMore')" @load="onLoad" style="margin-bottom: 60px">
         <div style="margin-top: 10px">
           <div v-for="(item, index) in listData" :key="item.id" class="item">
             <div class="row">
               <div class="left">{{ $t("inventoryQuery.operationType") }}</div>
               <div class="center">
-                {{ item.type }}
+                {{ item.opType==1?'入库':'出库' }}
               </div>
               <div class="right">
                 {{ item.createTime }}
               </div>
             </div>
             <div class="row">
+              <div class="left">出入库类型</div>
+              <div class="center">
+                {{ dictValueLabel(item.type,typeList) }}
+              </div>
+            </div>
+            <div class="row">
               <div class="left">{{ $t("inventoryQuery.warehouseName") }}</div>
               <div class="center">
                 {{ item.warehouseName }}
               </div>
             </div>
             <div class="row">
+              <div class="left">物品编码</div>
+              <div class="center">
+                {{ item.productCustomCode }}
+              </div>
+            </div>
+            <div class="row">
               <div class="left">{{ $t("inventoryQuery.itemName") }}</div>
               <div class="center">
                 {{ item.productName }}
@@ -84,6 +81,88 @@ const req = ref({
   warehouseId: "",
   productId: "",
 });
+const typeList = ref([
+  {
+    label: "生产打样",
+    value: "0",
+  },
+  {
+    label: "生产超领",
+    value: "1",
+  },
+  {
+    label: "销售出库",
+    value: "2",
+  },
+  {
+    label: "借用出库",
+    value: "3",
+  },
+  {
+    label: "补单超领",
+    value: "4",
+  },
+  {
+    label: "丢件超领",
+    value: "5",
+  },
+  {
+    label: "采购退货",
+    value: "6",
+  },
+  // {
+  //   label: "调拨出库",
+  //   value: "7",
+  // },
+  {
+    label: "盘亏出库",
+    value: "8",
+  },
+  {
+    label: "生产出库",
+    value: "9",
+  },
+  {
+    label: "借用归还",
+    value: "100",
+  },
+  {
+    label: "退料入库",
+    value: "101",
+  },
+  {
+    label: "废料入库",
+    value: "102",
+  },
+  {
+    label: "丢件寻回",
+    value: "103",
+  },
+  {
+    label: "采购入库",
+    value: "104",
+  },
+  // {
+  //   label: "调拨入库",
+  //   value: "105",
+  // },
+  {
+    label: "盘盈入库",
+    value: "106",
+  },
+  {
+    label: "完工入库",
+    value: "107",
+  },
+  {
+    label: "超领归还",
+    value: "108",
+  },
+  {
+    label: "错领归还",
+    value: "109",
+  },
+]);
 const finished = ref(false);
 const proxy = getCurrentInstance().proxy;
 const listData = ref([]);
@@ -93,8 +172,9 @@ const active = ref("all");
 const listConfig = ref([
   {
     label: proxy.t("inventoryQuery.itemType"),
-    prop: "type",
+    prop: "opTypeName",
   },
+
   {
     label: proxy.t("inventoryQuery.itemName"),
     prop: "productName",
@@ -139,12 +219,6 @@ const getList = (type) => {
   proxy
     .post("/stockJournalDetails/page", req.value)
     .then((res) => {
-      res.data.rows.map((item) => {
-        item.type =
-          item.opType === 1
-            ? proxy.t("inventoryQuery.warehousing")
-            : proxy.t("inventoryQuery.outbound");
-      });
       listData.value =
         type === "refresh"
           ? res.data.rows
@@ -154,7 +228,6 @@ const getList = (type) => {
       }
       req.value.pageNum++;
       loading.value = false;
-      console.log(listData.value, "wssa");
     })
     .catch((err) => {
       loading.value = false;
@@ -168,7 +241,7 @@ const getWarehouseData = () => {
 };
 
 const handleChangeTab = () => {
-  req.value.opType = active.value === "all" ? "" : active.value;
+  req.value.opType = active.value == "all" ? "" : active.value;
   req.value.pageNum = 1;
   listData.value = [];
   getList();
@@ -197,7 +270,7 @@ onMounted(() => {
     display: flex;
     margin-bottom: 6px;
     .left {
-      width: 70px;
+      min-width: 80px;
     }
     .center {
       flex: 1;

+ 1 - 1
src/views/salesContract/contract/index.vue

@@ -12,7 +12,7 @@
       </van-list>
     </div>
   </van-pull-refresh>
-  <van-action-sheet v-model:show="actionType" :actions="actions" @select="onSelect" />
+  <!-- <van-action-sheet v-model:show="actionType" :actions="actions" @select="onSelect" /> -->
 </template>
 <script setup>
 import { ref, getCurrentInstance } from "vue";

+ 174 - 0
src/views/salesContract/jstOrder/details.vue

@@ -0,0 +1,174 @@
+<template>
+  <div class="form">
+    <van-nav-bar :title="'聚水潭订单详情'" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft">
+    </van-nav-bar>
+    <testForm v-model="formData.data" :formOption="formOption" :formConfig="formConfig" :rules="rules" @onSubmit="onSubmit" ref="formDom"></testForm>
+  </div>
+</template>
+
+<script setup>
+import { ref, reactive, getCurrentInstance, onMounted } from "vue";
+import { showSuccessToast, showFailToast } from "vant";
+import { useRoute } from "vue-router";
+import testForm from "@/components/testForm/index.vue";
+const proxy = getCurrentInstance().proxy;
+const route = useRoute();
+const formDom = ref(null);
+const formData = reactive({
+  data: {},
+});
+const rules = {
+  contractId: [
+    {
+      required: true,
+      message: proxy.t("claim.contractCanNotBeEmpty"),
+    },
+  ],
+  money: [
+    {
+      required: true,
+      message: proxy.t("claim.relatedAmountCanNotBeEmpty"),
+    },
+  ],
+};
+const formOption = reactive({
+  readonly: true, //用于控制整个表单是否只读
+  disabled: false,
+  labelAlign: "top",
+  scroll: true,
+  labelWidth: "62pk",
+  submitBtnText: proxy.t("common.submit"),
+  hiddenSubmitBtn: true,
+  btnConfig: {
+    isNeed: false,
+    listTitle: "订单明细",
+    prop: "items",
+    plain: true,
+    listConfig: [
+      {
+        type: "input",
+        itemType: "text",
+        label: "商品编码",
+        prop: "shopSkuId",
+      },
+      {
+        type: "input",
+        itemType: "text",
+        label: "商品名称",
+        prop: "name",
+      },
+      {
+        type: "input",
+        itemType: "text",
+        label: "单价",
+        prop: "price",
+      },
+      {
+        type: "input",
+        itemType: "text",
+        label: "数量",
+        prop: "qty",
+      },
+    ],
+    clickFn: () => {},
+  },
+});
+const statusData = ref([]);
+const getDict = () => {
+  proxy.getDictOne(["jst_status"]).then((res) => {
+    statusData.value = res["jst_status"].data.map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+    formData.data.statusName = proxy.dictValueLabel(
+      formData.data.status,
+      statusData.value
+    );
+  });
+};
+getDict();
+const formConfig = reactive([
+  {
+    type: "input",
+    label: "内部订单号",
+    prop: "oid",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "分销商",
+    prop: "drpFrom",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "订单日期",
+    prop: "created",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "订单状态",
+    prop: "statusName",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "订单来源",
+    prop: "shopSite",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "店铺",
+    prop: "shopName",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "商品",
+    prop: "skus",
+    itemType: "text",
+    readonly: true,
+  },
+
+  {
+    type: "input",
+    label: "应付金额",
+    prop: "payAmount",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "已付金额",
+    prop: "paidAmount",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "付款时间",
+    prop: "payDate",
+    itemType: "text",
+    readonly: true,
+  },
+]);
+const onClickLeft = () => history.back();
+onMounted(() => {
+  if (route.query) {
+    formData.data = { ...route.query };
+    proxy.post("/jstOrderInfo/detail", { id: formData.data.id }).then((res) => {
+      formData.data.items = res.data.items;
+    });
+  }
+});
+</script>
+<style lang="scss" scoped>
+</style>

+ 142 - 0
src/views/salesContract/jstOrder/index.vue

@@ -0,0 +1,142 @@
+<template>
+  <van-nav-bar :title="'聚水潭订单'" left-text="" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
+    <!-- <template #right>
+      {{ $t("common.add") }}
+    </template> -->
+  </van-nav-bar>
+  <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="onRefresh" />
+  <van-pull-refresh v-model="loading" @refresh="onRefresh">
+    <div class="list">
+      <van-list v-model:loading="loading" :finished="finished" :finished-text="$t('common.noMore')" @load="getList" style="margin-bottom: 60px">
+        <commonList :data="listData" @onClick="toDtl" :config="listConfig"></commonList>
+      </van-list>
+    </div>
+  </van-pull-refresh>
+  <!-- <van-action-sheet v-model:show="actionType" :actions="actions" @select="onSelect" /> -->
+</template>
+<script setup>
+import { ref, getCurrentInstance } from "vue";
+import commonList from "@/components/common-list.vue";
+
+const proxy = getCurrentInstance().proxy;
+const onClickLeft = () => proxy.$router.push("/main/working");
+const onClickRight = () => {
+  proxy.$router.push({
+    path: "/main/processDtl",
+    query: {
+      flowKey: "contract_flow",
+    },
+  });
+};
+const actionType = ref(false);
+const actions = ref([
+  {
+    name: proxy.t("common.view"),
+    type: "1",
+  },
+  {
+    name: proxy.t("common.contractChange"),
+    type: "2",
+  },
+  {
+    name: proxy.t("common.cancel"),
+  },
+]);
+const req = ref({
+  pageNum: 1,
+  keyword: null,
+});
+const finished = ref(false);
+const onRefresh = () => {
+  req.value.pageNum = 1;
+  finished.value = false;
+  getList("refresh");
+};
+const loading = ref(false);
+const listData = ref([]);
+const getList = (type) => {
+  loading.value = true;
+  proxy
+    .post("/jstOrderInfo/page", req.value)
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        res.data.rows = res.data.rows.map((item) => {
+          return {
+            ...item,
+            currencyAmount: item.currency + " " + item.amount,
+          };
+        });
+      }
+      listData.value =
+        type === "refresh"
+          ? res.data.rows
+          : listData.value.concat(res.data.rows);
+      if (req.value.pageNum * 10 >= res.data.total) {
+        finished.value = true;
+      }
+      req.value.pageNum++;
+      loading.value = false;
+    })
+    .catch(() => {
+      loading.value = false;
+    });
+};
+let rowData = ref({});
+const onSelect = (item) => {
+  if (item.type === "1") {
+    proxy.$router.push({
+      path: "/main/processDtl",
+      query: {
+        flowKey: "contract_flow",
+        id: rowData.value.flowId,
+        processType: 20,
+      },
+    });
+  } else if (item.type === "2") {
+    proxy.$router.push({
+      path: "/main/processDtl",
+      query: {
+        flowKey: "contract_update_flow",
+        flowName: "销售合同变更",
+        contractId: rowData.value.id,
+      },
+    });
+  } else {
+    actionType.value = false;
+  }
+};
+const toDtl = (row) => {
+  // actionType.value = true;
+  // rowData.value = row;
+  proxy.$router.push({
+    path: "/main/jstOrderDetails",
+    query: {
+      ...row,
+    },
+  });
+};
+const listConfig = ref([
+  {
+    label: "内部订单号",
+    prop: "oid",
+  },
+  {
+    label: "分销商",
+    prop: "drpFrom",
+  },
+  {
+    label: "订单日期",
+    prop: "created",
+  },
+  {
+    label: "应付金额",
+    prop: "payAmount",
+  },
+]);
+</script>
+
+<style lang="scss" scoped>
+.list {
+  min-height: 70vh;
+}
+</style>