|
@@ -0,0 +1,293 @@
|
|
|
+<template>
|
|
|
+ <div class="tenant">
|
|
|
+ <div class="content">
|
|
|
+ <byTable
|
|
|
+ :source="sourceList.data"
|
|
|
+ :pagination="sourceList.pagination"
|
|
|
+ :config="config"
|
|
|
+ :loading="loading"
|
|
|
+ :selectConfig="selectConfig"
|
|
|
+ highlight-current-row
|
|
|
+ :action-list="[]"
|
|
|
+ @get-list="getList"
|
|
|
+ >
|
|
|
+ <template #code="{ item }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <a
|
|
|
+ style="color: #409eff; cursor: pointer; word-break: break-all"
|
|
|
+ @click="openDetails(item)"
|
|
|
+ >{{ item.code }}</a
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </byTable>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import byTable from "@/components/byTable/index";
|
|
|
+import byForm from "@/components/byForm/index";
|
|
|
+
|
|
|
+const route = useRoute();
|
|
|
+const { proxy } = getCurrentInstance();
|
|
|
+const accountCurrency = ref([]);
|
|
|
+const tradeMethods = ref([]);
|
|
|
+const corporationList = ref([]);
|
|
|
+const customerList = ref([]);
|
|
|
+const userList = ref([]);
|
|
|
+const shippingMethod = ref([]);
|
|
|
+const customerTag = ref([]);
|
|
|
+const openDetailsDialog = ref(false);
|
|
|
+
|
|
|
+const status = ref([
|
|
|
+ {
|
|
|
+ label: "草稿",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "审批中",
|
|
|
+ value: 10,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "驳回",
|
|
|
+ value: 20,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "审批通过",
|
|
|
+ value: 30,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "变更中",
|
|
|
+ value: 60,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "已变更",
|
|
|
+ value: 70,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "作废",
|
|
|
+ value: 88,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "终止",
|
|
|
+ value: 99,
|
|
|
+ },
|
|
|
+]);
|
|
|
+const sourceList = ref({
|
|
|
+ data: [],
|
|
|
+ pagination: {
|
|
|
+ total: 0,
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ keyword: "",
|
|
|
+ status: "",
|
|
|
+ sellCorporationId: "",
|
|
|
+ },
|
|
|
+});
|
|
|
+const loading = ref(false);
|
|
|
+const selectConfig = computed(() => {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ label: "审批状态",
|
|
|
+ prop: "status",
|
|
|
+ data: status.value,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "归属公司",
|
|
|
+ prop: "sellCorporationId",
|
|
|
+ data: corporationList.value,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "业务员",
|
|
|
+ prop: "userId",
|
|
|
+ data: userList.value,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+});
|
|
|
+const config = computed(() => {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "订单号",
|
|
|
+ slot: "code",
|
|
|
+ width: 140,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "订单状态",
|
|
|
+ prop: "sellCorporationId",
|
|
|
+ "min-width": 220,
|
|
|
+ },
|
|
|
+ render(type) {
|
|
|
+ return proxy.dictValueLabel(type, corporationList.value);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "订单备注",
|
|
|
+ prop: "userName",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ // render(type) {
|
|
|
+ // return proxy.dictValueLabel(type, userList.value);
|
|
|
+ // },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "客户",
|
|
|
+ prop: "createTime",
|
|
|
+ width: 160,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "产品",
|
|
|
+ slot: "buyCorporationName",
|
|
|
+ "min-width": 140,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "条款",
|
|
|
+ slot: "tags",
|
|
|
+ width: 180,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "定金",
|
|
|
+ slot: "advanceRatio",
|
|
|
+ width: 100,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "定金到账时间",
|
|
|
+ slot: "amount",
|
|
|
+ width: 140,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "工厂",
|
|
|
+ prop: "rate",
|
|
|
+ width: 80,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ render(rate) {
|
|
|
+ return proxy.moneyFormat(rate, 4);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "下单时间",
|
|
|
+ prop: "amountCNY",
|
|
|
+ width: 160,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ render(amountCNY) {
|
|
|
+ return proxy.moneyFormat(amountCNY, 2);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "交期",
|
|
|
+ prop: "sumClaimMoney",
|
|
|
+ width: 160,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ render(sumClaimMoney) {
|
|
|
+ return proxy.moneyFormat(sumClaimMoney, 2);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "交接单",
|
|
|
+ slot: "scale",
|
|
|
+ width: 100,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "审批状态",
|
|
|
+ prop: "status",
|
|
|
+ width: 140,
|
|
|
+ },
|
|
|
+ render(type) {
|
|
|
+ return proxy.dictValueLabel(type, status.value);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "操作",
|
|
|
+ width: 160,
|
|
|
+ align: "center",
|
|
|
+ fixed: "right",
|
|
|
+ },
|
|
|
+ renderHTML(row) {
|
|
|
+ return [];
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ];
|
|
|
+});
|
|
|
+const getDict = () => {
|
|
|
+ proxy
|
|
|
+ .getDictOne([
|
|
|
+ "customer_tag",
|
|
|
+ "trade_mode",
|
|
|
+ "account_currency",
|
|
|
+ "shipping_method",
|
|
|
+ ])
|
|
|
+ .then((res) => {
|
|
|
+ customerTag.value = res["customer_tag"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ tradeMethods.value = res["trade_mode"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ accountCurrency.value = res["account_currency"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ shippingMethod.value = res["shipping_method"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ });
|
|
|
+};
|
|
|
+const getList = async (req) => {
|
|
|
+ sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
+ loading.value = true;
|
|
|
+ proxy.post("/contract/page", sourceList.value.pagination).then((res) => {
|
|
|
+ sourceList.value.data = res.rows;
|
|
|
+ sourceList.value.pagination.total = res.total;
|
|
|
+ setTimeout(() => {
|
|
|
+ loading.value = false;
|
|
|
+ }, 200);
|
|
|
+ });
|
|
|
+};
|
|
|
+getDict();
|
|
|
+
|
|
|
+getList();
|
|
|
+
|
|
|
+const formOption = reactive({
|
|
|
+ inline: true,
|
|
|
+ labelWidth: 100,
|
|
|
+ itemWidth: 100,
|
|
|
+ rules: [],
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.tenant {
|
|
|
+ padding: 20px;
|
|
|
+}
|
|
|
+</style>
|