cz vor 1 Jahr
Ursprung
Commit
d3d90dae89

Datei-Diff unterdrückt, da er zu groß ist
+ 911 - 907
src/lang/cn.js


+ 9 - 0
src/lang/cnCZ.js

@@ -90,6 +90,15 @@ export function cnCZ() {
       pleaseAddPaymentDetails: "请添加付款明细",
 
     },
+    receipt: {
+      name: "交接单",
+      mergePurchase: "合并采购",
+      belongToCompany: "归属公司",
+      contractCode: "合同编码",
+      orderTime: "下单时间",
+      productName: "产品名称",
+      pendingProcessing: "待处理",
+    }
   };
 
   return cnCZ;

+ 5 - 0
src/router/jxskRouter.js

@@ -105,6 +105,11 @@ export function jxskRouter() {
       name: '采购付款',
       component: () => import('../views/procurementManagement/payment/index.vue')
     },
+    {
+      path: 'receipt',
+      name: '交接单',
+      component: () => import('../views/procurementManagement/receipt/index.vue')
+    },
 
   ];
   return jxskRouter;

+ 381 - 0
src/views/processApproval/components/SendPurchase.vue

@@ -0,0 +1,381 @@
+<template>
+  <div class="form" style="padding-bottom: 60px">
+    <van-form
+      @submit="onSubmit"
+      label-align="top"
+      style="margin-top: 20px"
+      ref="formDom"
+    >
+      <van-cell-group inset>
+        <van-field
+          v-model="formData.deptName"
+          is-link
+          readonly
+          :label="$t('procureList.procurementDepartment')"
+          :placeholder="$t('procureList.selectProcurementDepartment')"
+          :rules="[
+            {
+              required: true,
+              message: $t('procureList.procurementDepartmentCanNotBeEmpty'),
+            },
+          ]"
+          :readonly="true"
+          required
+        />
+        <van-field
+          v-model="formData.purchaseName"
+          type="text"
+          :name="$t('procureList.procurementPersonName')"
+          :label="$t('procureList.procurementPersonName')"
+          :placeholder="$t('procureList.pleaseFillInTheProcurementPersonName')"
+          :rules="[
+            {
+              required: true,
+              message: $t('procureList.procurementPersonNameCanNotBeEmpty'),
+            },
+          ]"
+          required
+          :readonly="true"
+        />
+        <van-field
+          v-model="formData.purchaseTime"
+          is-link
+          readonly
+          name="datePicker"
+          :label="$t('procureList.procurementTime')"
+          :placeholder="$t('procureList.clickToSelectTime')"
+          :rules="[
+            {
+              required: true,
+              message: $t('procureList.procurementTimeCanNotBeEmpty'),
+            },
+          ]"
+          required
+          :readonly="true"
+        />
+        <van-popup v-model:show="timePicker" position="bottom">
+          <van-date-picker
+            @confirm="timeOnConfirm"
+            @cancel="timePicker = false"
+          />
+        </van-popup>
+        <van-field
+          v-model="formData.supplyName"
+          is-link
+          readonly
+          :label="$t('procureList.supplier')"
+          :placeholder="$t('procureList.selectSupplier')"
+          @click="typeModal = true"
+          :rules="[
+            {
+              required: true,
+              message: $t('procureList.supplierCanNotBeEmpty'),
+            },
+          ]"
+          required
+        />
+        <van-popup v-model:show="typeModal" position="bottom">
+          <van-picker
+            :title="$t('common.title')"
+            :columns="supplyList"
+            @confirm="onConfirm"
+            @cancel="typeModal = false"
+          />
+        </van-popup>
+        <van-field
+          v-model="formData.purchaseContent"
+          type="textarea"
+          :name="$t('procureList.procurementDescription')"
+          :label="$t('procureList.procurementDescription')"
+          :placeholder="$t('procureList.pleaseFillInTheProcurementDescription')"
+          :rules="[
+            {
+              required: true,
+              message: $t('procureList.procurementDescriptionCanNotBeEmpty'),
+            },
+          ]"
+          required
+          rows="3"
+        />
+      </van-cell-group>
+
+      <!-- 明细列表 -->
+      <div v-for="(item, index) in formData.purchaseDetailList" :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.purchaseDetailList[index].productName"
+            is-link
+            readonly
+            :label="$t('procureList.procurementProduct')"
+            :placeholder="$t('procureList.selectProcurementProduct')"
+            :readonly="true"
+            :rules="[
+              {
+                required: true,
+                message: $t('procureList.procurementProductCanNotBeEmpty'),
+              },
+            ]"
+            required
+          />
+          <van-field
+            v-model="formData.purchaseDetailList[index].count2"
+            :label="$t('procureList.quantity')"
+            :placeholder="$t('procureList.pleaseEnterTheQuantity')"
+            :rules="[
+              {
+                required: true,
+                message: $t('procureList.quantityCanNotBeEmpty'),
+              },
+            ]"
+            required
+            type="number"
+            :readonly="true"
+          />
+
+          <van-field
+            v-model="formData.purchaseDetailList[index].count"
+            :name="$t('procureList.thisPurchase')"
+            :label="$t('procureList.thisPurchase')"
+            :placeholder="$t('procureList.pleaseEnterThisPurchase')"
+            @change="changePrice(index)"
+            :rules="[
+              {
+                required: true,
+                message: $t('procureList.thisPurchaseCanNotBeEmpty'),
+              },
+            ]"
+            required
+            type="number"
+          />
+          <van-field
+            v-model="formData.purchaseDetailList[index].price"
+            :name="$t('procureList.unitPrice')"
+            :label="$t('procureList.unitPrice')"
+            @change="changePrice(index)"
+            :placeholder="$t('procureList.pleaseEnterTheUnitPrice')"
+            :rules="[
+              {
+                required: true,
+                message: $t('procureList.unitPriceCanNotBeEmpty'),
+              },
+            ]"
+            required
+            type="number"
+          />
+          <van-field
+            v-model="formData.purchaseDetailList[index].amount"
+            :name="$t('procureList.totalPrice')"
+            :label="$t('procureList.totalPrice')"
+            :placeholder="$t('procureList.accordingToThisPurchaseAndUnitPrice')"
+            :readonly="true"
+            type="number"
+          />
+        </van-cell-group>
+      </div>
+      <van-field
+        style="margin-top: 16px"
+        v-model="formData.amount"
+        :name="$t('procureList.totalPrice')"
+        :label="$t('procureList.totalPrice')"
+        :placeholder="$t('procureList.theTotalAmountOfAllDetails')"
+        :readonly="true"
+        type="number"
+      />
+      <van-popup v-model:show="typeModalOne" round position="bottom">
+        <van-picker
+          :columns="columnsOne"
+          @cancel="typeModalOne = false"
+          @confirm="(data) => onConfirmOne(data)"
+        />
+      </van-popup>
+      <!-- <div style="margin: 16px" v-if="!route.query.id">
+        <van-button round block type="primary" native-type="submit">
+          {{ $t("common.submit") }}
+        </van-button>
+      </div> -->
+    </van-form>
+  </div>
+</template>
+
+<script setup>
+import { ref, getCurrentInstance, onMounted } from "vue";
+import { showSuccessToast, showFailToast } from "vant";
+import { useRoute } from "vue-router";
+import { setUserInfo, setToken, getUserInfo, formatDate } from "@/utils/auth";
+const proxy = getCurrentInstance().proxy;
+const route = useRoute();
+const typeModal = ref(false);
+const typeModalOne = ref(false);
+let selectIndex = ref(null);
+const timePicker = ref(false);
+const userInfo = getUserInfo();
+const formData = ref({
+  deptName: userInfo.dept.deptName,
+  purchaseName: userInfo.nickName,
+  purchaseTime: formatDate(new Date(), "yyyy-MM-dd"),
+  supplyId: "",
+  purchaseContent: "",
+  amount: "",
+  purchaseDetailList: [],
+});
+const handleAddRow = () => {
+  formData.value.subscribeDetailList.push({
+    bussinessId: "",
+    bussinessName: "",
+    name: "",
+    quantity: "",
+    content: "",
+    count: "",
+  });
+};
+
+const supplyList = ref([]);
+
+const timeOnConfirm = ({ selectedValues }) => {
+  formData.value.subcribeTime = selectedValues.join("-");
+  timePicker.value = false;
+};
+
+const getDict = () => {
+  proxy
+    .post("/supplierPrice/page", { pageNum: 1, pageSize: 9999 })
+    .then((res) => {
+      supplyList.value = res.data.rows.map((item) => {
+        return {
+          ...item,
+          text: item.supplierName,
+          value: item.supplierInfoId,
+        };
+      });
+      console.log(supplyList, 12312312312312);
+    });
+
+  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 changePrice = (index) => {
+  formData.value.purchaseDetailList[index].amount = (
+    formData.value.purchaseDetailList[index].count *
+    formData.value.purchaseDetailList[index].price
+  ).toFixed(2);
+  formData.value.amount = formData.value.purchaseDetailList.reduce(
+    (total, item) => {
+      return total + Number(item.amount);
+    },
+    0
+  );
+};
+
+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.supplyId = selectedOptions[0].value;
+  formData.value.supplyName = selectedOptions[0].text;
+  typeModal.value = false;
+};
+
+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 handleSelect = (index) => {
+  if (submitType.value === "edit") return;
+  selectIndex.value = index;
+  typeModalOne.value = true;
+};
+
+const handleDel = (index) => {
+  formData.value.subscribeDetailList.splice(index, 1);
+};
+
+const onClickLeft = () => history.back();
+const formDom = ref(null);
+const handleSubmit = () => {
+  // return formData.value;
+};
+const getDtl = (query) => {
+  proxy
+    .post("/subscribeDetail/detail", { ids: JSON.parse(query.ids) })
+    .then((res) => {
+      formData.value.purchaseDetailList = res.data.map((item) => {
+        return {
+          bussinessId: item.bussinessId,
+          productName: item.productName,
+          count2: item.count,
+          subscribeDetailId: item.id,
+          count: null,
+          content: null,
+          price: null,
+          amount: null,
+        };
+      });
+    });
+};
+defineExpose({
+  handleSubmit,
+});
+
+onMounted(() => {
+  getDtl(route.query);
+  getDict();
+});
+</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;
+  }
+}
+</style>

+ 3 - 0
src/views/processApproval/components/SendPurchasePayment.vue

@@ -403,6 +403,9 @@ const changeSupply = (val) => {
 const changeType = (val) => {
   if (val == "1") {
     formConfig[3].type = "picker";
+    proxy.get(`purchase/getAdvanceCode?money=${1}`).then((res) => {
+      console.log(res, "aaa");
+    });
   } else {
     formConfig[3].type = "pickerOne";
   }

+ 6 - 0
src/views/processApproval/processDtl.vue

@@ -95,6 +95,7 @@ import { useRoute } from 'vue-router'
 import SendSubscribe from './components/SendSubscribe'
 import SendFunds from './components/SendFunds'
 import Contract from './components/Contract'
+import SendPurchase from './components/SendPurchase'
 import SendPurchasePayment from './components/SendPurchasePayment'
 
 import { showSuccessToast, showFailToast } from 'vant'
@@ -143,6 +144,11 @@ let componentObj = ref({
 		component: Contract,
 		backUrl: '/main/contract',
 	},
+		purchase_flow: {
+		title: '采购',
+		component: SendPurchase,
+		backUrl: '/main/procureList',
+	},
 		pay_flow: {
 		title: '采购付款',
 		component: SendPurchasePayment,

+ 118 - 114
src/views/procurementManagement/procureList/index.vue

@@ -1,135 +1,139 @@
 <template>
-	<van-nav-bar
-		:title="$t('procureList.name')"
-		left-text=""
-		left-arrow
-		@click-left="onClickLeft"
-		@click-right="onClickRight"
-	>
-		<template #right> {{$t('procureList.purchase')}} </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="onLoad"
-				style="margin-bottom: 60px"
-			>
-				<commonList
-					:data="listData"
-					@onClick="toDtl"
-					:config="listConfig"
-					:isCheckbox="true"
-					@onCheck="onCkeckbox"
-					optionalKey='subcribeId'
-				></commonList>
-			</van-list>
-		</div>
-	</van-pull-refresh>
+  <van-nav-bar
+    :title="$t('procureList.name')"
+    left-text=""
+    left-arrow
+    @click-left="onClickLeft"
+    @click-right="onClickRight"
+  >
+    <template #right> {{ $t("procureList.purchase") }} </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="onLoad"
+        style="margin-bottom: 60px"
+      >
+        <commonList
+          :data="listData"
+          @onClick="toDtl"
+          :config="listConfig"
+          :isCheckbox="true"
+          @onCheck="onCkeckbox"
+          optionalKey="subcribeId"
+        ></commonList>
+      </van-list>
+    </div>
+  </van-pull-refresh>
 </template>
 <script setup>
-import { ref, getCurrentInstance, onMounted } from 'vue'
-import commonList from '@/components/common-list.vue'
-import { useRoute } from 'vue-router'
-const loading = ref(false)
-const router = useRoute()
+import { ref, getCurrentInstance, onMounted } from "vue";
+import commonList from "@/components/common-list.vue";
+import { useRoute } from "vue-router";
+import { showSuccessToast, showFailToast } from "vant";
+
+const loading = ref(false);
+const router = useRoute();
 const req = ref({
-	pageNum: 1,
-	type: '1',
-	keyword: null,
-})
-const finished = ref(false)
-const proxy = getCurrentInstance().proxy
-const listData = ref([])
+  pageNum: 1,
+  type: "1",
+  keyword: null,
+});
+const finished = ref(false);
+const proxy = getCurrentInstance().proxy;
+const listData = ref([]);
 
 const listConfig = ref([
-	{
-		label: proxy.t('procureList.procurementNumber'),
-		prop: 'subscribeCode',
-	},
-	{
-		label: proxy.t('procureList.itemName'),
-		prop: 'productName',
-	},
-	{
-		label: proxy.t('procureList.procurementQuantity'),
-		prop: 'count',
-	},
-	{
-		label: proxy.t('procureList.purchased'),
-		prop: 'purchaseCount',
-	},
-])
+  {
+    label: proxy.t("procureList.procurementNumber"),
+    prop: "subscribeCode",
+  },
+  {
+    label: proxy.t("procureList.itemName"),
+    prop: "productName",
+  },
+  {
+    label: proxy.t("procureList.procurementQuantity"),
+    prop: "count",
+  },
+  {
+    label: proxy.t("procureList.purchased"),
+    prop: "purchaseCount",
+  },
+]);
 const onRefresh = () => {
-	req.value.pageNum = 1
-	finished.value = false
-	getList('refresh')
-}
+  req.value.pageNum = 1;
+  finished.value = false;
+  getList("refresh");
+};
 const onLoad = () => {
-	getList()
-}
-let ids = []
-
+  getList();
+};
+let ids = [];
 const onCkeckbox = (row) => {
-	ids = []
-	row.map((i) => {
-		ids.push(i.id)
-	})
-}
+  row.map((i) => {
+    ids.push(i.id);
+  });
+};
 
-const onClickLeft = () => proxy.$router.push('/main/working')
+const onClickLeft = () => proxy.$router.push("/main/working");
 
 const onClickRight = () => {
-	proxy.$router.push({
-		path: 'procureListAdd',
-		query: {
-			ids: JSON.stringify(ids),
-		},
-	})
-}
-proxy.uploadDdRightBtn(onClickRight,'采购')
+  if (ids && ids.length > 0) {
+    proxy.$router.push({
+      path: "/main/processDtl",
+      query: {
+        flowKey: "purchase_flow",
+        // ids: JSON.stringify(ids),
+      },
+    });
+  } else {
+    return showFailToast(proxy.t("procureList.pleaseCheckTheData"));
+  }
+};
+proxy.uploadDdRightBtn(onClickRight, "采购");
 const toDtl = (row) => {
-	proxy.$router.push({
-		path: 'procureListAdd',
-		query: {
-			ids: JSON.stringify([row.id]),
-			
-		},
-	})
-}
+  proxy.$router.push({
+    path: "procureListAdd",
+    query: {
+      ids: JSON.stringify([row.id]),
+    },
+  });
+};
 
 const getList = (type) => {
-	loading.value = true
-	proxy
-		.post('/subscribeDetail/page', req.value)
-		.then((res) => {
-			console.log(req.value)
-			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((err) => {
-			loading.value = false
-		})
-}
-getList()
+  loading.value = true;
+  proxy
+    .post("/subscribeDetail/page", req.value)
+    .then((res) => {
+      console.log(req.value);
+      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((err) => {
+      loading.value = false;
+    });
+};
+getList();
 </script>
 
 <style lang="scss" scoped>
 .list {
-	min-height: 70vh;
+  min-height: 70vh;
 }
 </style>

+ 148 - 0
src/views/procurementManagement/receipt/index.vue

@@ -0,0 +1,148 @@
+<template>
+  <van-nav-bar
+    :title="$t('receipt.name')"
+    left-text=""
+    left-arrow
+    @click-left="onClickLeft"
+    @click-right="onClickRight"
+  >
+    <template #right> {{ $t("receipt.mergePurchase") }} </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"
+          :isCheckbox="true"
+          @onCheck="handleSelectData"
+          optionalKey="contractId"
+        >
+        </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,
+  status: "15",
+});
+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("/contractProduct/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",
+    },
+  });
+};
+const listConfig = ref([
+  {
+    label: proxy.t("receipt.belongToCompany"),
+    prop: "corporationName",
+  },
+  {
+    label: proxy.t("receipt.contractCode"),
+    prop: "contractCode",
+  },
+  {
+    label: proxy.t("receipt.orderTime"),
+    prop: "contractTime",
+  },
+  {
+    label: proxy.t("receipt.productName"),
+    prop: "productName",
+  },
+  {
+    label: proxy.t("receipt.pendingProcessing"),
+    prop: "expendQuantity",
+  },
+]);
+const handleSelectData = (data) => {
+  console.log(data, "sss");
+};
+</script>
+
+<style lang="scss" scoped>
+.list {
+  min-height: 70vh;
+}
+</style>

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.