Forráskód Böngészése

Merge branch 'master' of http://36.137.93.232:3000/hf/byte-sailing-new

cz 2 éve
szülő
commit
491b72ad7c

+ 1 - 0
package.json

@@ -26,6 +26,7 @@
     "@antv/x6-plugin-transform": "^2.1.6",
     "@vue-flow/additional-components": "^1.3.3",
     "@vue-flow/core": "^1.18.2",
+    "@vueup/vue-quill": "^1.0.0-alpha.40",
     "@vueuse/core": "9.5.0",
     "axios": "0.27.2",
     "echarts": "5.4.0",

+ 89 - 0
src/components/Editor/index.vue

@@ -0,0 +1,89 @@
+<template>
+  <div>
+    <QuillEditor ref="myQuillEditor" theme="snow" v-model:content="content" :options="data.editorOption" contentType="html" @update:content="setValue()" />
+    <!-- 使用自定义图片上传 -->
+    <input type="file" hidden accept=".jpg,.png" ref="fileBtn" @change="handleUpload" />
+  </div>
+</template>
+
+<script setup>
+import { QuillEditor } from "@vueup/vue-quill";
+import "@vueup/vue-quill/dist/vue-quill.snow.css";
+import { reactive, onMounted, ref, toRaw, watch } from "vue";
+// import { backsite } from '@/api'
+
+const props = defineProps(["value"]);
+const emit = defineEmits(["updateValue"]);
+const content = ref("");
+const myQuillEditor = ref();
+// watch(() => props.value, (val) => {
+//   console.log(toRaw(myQuillEditor.value))
+//   toRaw(myQuillEditor.value).setHTML(val)
+// }, { deep: true })
+const fileBtn = ref();
+const data = reactive({
+  content: "",
+  editorOption: {
+    modules: {
+      toolbar: [
+        ["bold", "italic", "underline", "strike"],
+        [{ size: ["small", false, "large", "huge"] }],
+        [{ font: [] }],
+        [{ align: [] }],
+        [{ list: "ordered" }, { list: "bullet" }],
+        [{ indent: "-1" }, { indent: "+1" }],
+        [{ header: 1 }, { header: 2 }],
+        ["image"],
+        [{ direction: "rtl" }],
+        [{ color: [] }, { background: [] }],
+      ],
+    },
+    placeholder: "请输入内容...",
+  },
+});
+const imgHandler = (state) => {
+  if (state) {
+    fileBtn.value.click();
+  }
+};
+const setValue = () => {
+  const text = toRaw(myQuillEditor.value).getHTML();
+  emit("updateValue", text);
+};
+const handleUpload = (e) => {
+  const files = Array.prototype.slice.call(e.target.files);
+  // console.log(files, "files")
+  if (!files) {
+    return;
+  }
+  const formdata = new FormData();
+  formdata.append("file", files[0]);
+  backsite.uploadFile(formdata)
+    .then(res => {
+      if (res.data.url) {
+        const quill = toRaw(myQuillEditor.value).getQuill()
+        const length = quill.getSelection().index
+        // 插入图片,res为服务器返回的图片链接地址
+        quill.insertEmbed(length, 'image', res.data.url)
+        // 调整光标到最后
+        quill.setSelection(length + 1)
+      }
+    })
+};
+onMounted(() => {
+  const quill = toRaw(myQuillEditor.value).getQuill();
+  if (myQuillEditor.value) {
+    quill.getModule("toolbar").addHandler("image", imgHandler);
+  }
+  toRaw(myQuillEditor.value).setHTML(props.value);
+});
+</script>
+<style scoped lang="scss">
+:deep(.ql-editor) {
+  min-height: 180px;
+}
+:deep(.ql-formats) {
+  height: 21px;
+  line-height: 21px;
+}
+</style>

+ 390 - 0
src/components/process/PriceSheet.vue

@@ -0,0 +1,390 @@
+<template>
+  <div style="width: 100%; padding: 0px 15px">
+    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+      <template #deadline>
+        <div>
+          <el-date-picker v-model="formData.data.deadline" type="date" placeholder="请选择付款期限" value-format="YYYY-MM-DD" />
+        </div>
+      </template>
+      <template #receiptsNum>
+        <div>
+          <el-input-number v-model="formData.data.receiptsNum" placeholder="请输入单据数量" :min="0" :precision="0" :controls="false" />
+        </div>
+      </template>
+      <template #fileList>
+        <div style="width: 100%">
+          <el-upload
+            v-model:fileList="fileList"
+            action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+            multiple
+            :data="uploadData"
+            :before-upload="uploadFile"
+            :on-preview="onPreviewFile">
+            <el-button>选择</el-button>
+          </el-upload>
+        </div>
+      </template>
+      <template #payDetailList>
+        <div style="width: 100%">
+          <el-button type="primary" @click="clickAdd()">添加行</el-button>
+          <el-table :data="formData.data.payDetailList" style="width: 100%; margin-top: 16px">
+            <el-table-column label="采购合同" width="220">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'payDetailList.' + $index + '.purchaseId'" :rules="rules.purchaseId" :inline-message="true">
+                    <el-select v-model="row.purchaseId" placeholder="请选择采购合同" style="width: 100%" @change="changePurchaseId(row)">
+                      <el-option v-for="item in contractList" :key="item.value" :label="item.label" :value="item.value" />
+                    </el-select>
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="amount" label="合同金额" width="140" />
+            <el-table-column prop="sumPayMoney" label="已收发票金额" width="140" />
+            <el-table-column label="款项说明">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'payDetailList.' + $index + '.remark'" :rules="rules.remark" :inline-message="true">
+                    <el-input v-model="row.remark" placeholder="请输入款项说明" style="width: 100%" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="付款金额" width="180">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'payDetailList.' + $index + '.money'" :rules="rules.money" :inline-message="true">
+                    <el-input-number
+                      v-model="row.money"
+                      placeholder="请输入金额"
+                      style="width: 100%"
+                      :precision="2"
+                      :controls="false"
+                      :min="0"
+                      :disabled="row.id"
+                      @change="changeMoney()" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="操作" width="80">
+              <template #default="{ row, $index }">
+                <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+          <br />
+        </div>
+      </template>
+    </byForm>
+  </div>
+</template>
+
+<script setup>
+import byForm from "@/components/byForm/index";
+import { ElMessage } from "element-plus";
+import useUserStore from "@/store/modules/user";
+
+const { proxy } = getCurrentInstance();
+const supplierList = ref([]);
+const invoiceType = ref([]);
+const fundsPaymentMethod = ref([]);
+const accountList = ref([]);
+const contractList = ref([]);
+let formData = reactive({
+  data: {
+    supplyId: "",
+    amount: "",
+    invoiceType: "",
+    remark: "",
+    deadline: "",
+    receiptsNum: undefined,
+    payType: "",
+    currency: "",
+    accountManagementId: "",
+    userName: "",
+    payDetailList: [],
+    fileList: [],
+  },
+});
+const submit = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const formConfig = computed(() => {
+  return [
+    {
+      label: "基础信息",
+    },
+    {
+      type: "select",
+      label: "供应商",
+      prop: "supplyId",
+      data: supplierList.value,
+      fn: (val) => {
+        changeSupply(val);
+      },
+    },
+    {
+      type: "slot",
+      prop: "deadline",
+      slotName: "deadline",
+      label: "付款期限",
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      label: "发票类型",
+      prop: "invoiceType",
+      data: invoiceType.value,
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "remark",
+      label: "付款说明",
+      itemType: "textarea",
+    },
+    {
+      type: "slot",
+      prop: "receiptsNum",
+      slotName: "receiptsNum",
+      label: "单据数量",
+    },
+    {
+      type: "slot",
+      prop: "fileList",
+      slotName: "fileList",
+      label: "上传附件",
+    },
+    {
+      type: "slot",
+      prop: "payDetailList",
+      slotName: "payDetailList",
+      label: "付款明细",
+    },
+    {
+      type: "input",
+      prop: "amount",
+      label: "付款总额",
+      required: true,
+      itemType: "text",
+      disabled: true,
+    },
+    {
+      label: "收款信息",
+    },
+    {
+      type: "select",
+      label: "付款方式",
+      prop: "payType",
+      data: fundsPaymentMethod.value,
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      label: "付款账户",
+      prop: "accountManagementId",
+      data: accountList.value,
+      itemWidth: 50,
+      fn: (val) => {
+        changeAccount(val);
+      },
+    },
+    {
+      type: "input",
+      prop: "bankName",
+      label: "户名",
+      required: true,
+      itemType: "text",
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "accountOpening",
+      label: "银行账号",
+      required: true,
+      itemType: "text",
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "openingBank",
+      label: "开户银行",
+      required: true,
+      itemType: "text",
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "interbankNumber",
+      label: "联行号",
+      required: true,
+      itemType: "text",
+      itemWidth: 50,
+    },
+  ];
+});
+const rules = ref({
+  supplyId: [{ required: true, message: "请选择供应商", trigger: "change" }],
+  invoiceType: [{ required: true, message: "请选择发票类型", trigger: "change" }],
+  payType: [{ required: true, message: "请选择付款方式", trigger: "change" }],
+  accountManagementId: [{ required: true, message: "请选择付款账户", trigger: "change" }],
+  purchaseId: [{ required: true, message: "请选择采购合同", trigger: "change" }],
+  money: [{ required: true, message: "请输入付款金额", trigger: "blur" }],
+});
+const fileList = ref([]);
+const uploadData = ref({});
+const getDict = () => {
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "invoice_type",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        invoiceType.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "funds_payment_method",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        fundsPaymentMethod.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy.post("/supplierInfo/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      supplierList.value = res.rows.map((item) => {
+        return {
+          label: item.name,
+          value: item.id,
+        };
+      });
+    }
+  });
+  proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    accountList.value = res.rows.map((item) => {
+      return {
+        bankName: item.name,
+        accountOpening: item.accountOpening,
+        openingBank: item.openingBank,
+        interbankNumber: item.interbankNumber,
+        label: item.alias,
+        value: item.id,
+      };
+    });
+  });
+};
+getDict();
+const uploadFile = async (file) => {
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  uploadData.value = res.uploadBody;
+  file.id = res.id;
+  file.fileName = res.fileName;
+  file.fileUrl = res.fileUrl;
+  return true;
+};
+const onPreviewFile = (file) => {
+  window.open(file.raw.fileUrl, "_blank");
+};
+const changeSupply = (val) => {
+  if (val) {
+    proxy.get("/purchase/getListBySupplyId", { supplyId: val }).then((res) => {
+      if (res.data && res.data.length > 0) {
+        contractList.value = res.data.map((item) => {
+          return {
+            value: item.id,
+            label: item.code,
+            amount: item.amount,
+            sumPayMoney: item.sumPayMoney,
+          };
+        });
+      } else {
+        contractList.value = [];
+      }
+    });
+  } else {
+    contractList.value = [];
+  }
+};
+const clickAdd = () => {
+  if (formData.data.payDetailList && formData.data.payDetailList.length > 0) {
+    formData.data.payDetailList.push({ purchaseId: "", money: undefined, remark: "" });
+  } else {
+    formData.data.payDetailList = [{ purchaseId: "", money: undefined, remark: "" }];
+  }
+};
+const handleRemove = (index) => {
+  formData.data.payDetailList.splice(index, 1);
+};
+const changeAccount = (val) => {
+  if (val) {
+    let data = accountList.value.filter((item) => item.value === val);
+    if (data && data.length > 0) {
+      formData.data.bankName = data[0].bankName;
+      formData.data.accountOpening = data[0].accountOpening;
+      formData.data.openingBank = data[0].openingBank;
+      formData.data.interbankNumber = data[0].interbankNumber;
+    }
+  }
+};
+const changePurchaseId = (row) => {
+  let data = contractList.value.filter((item) => item.value === row.purchaseId);
+  if (data && data.length > 0) {
+    row.amount = data[0].amount;
+    row.sumPayMoney = data[0].sumPayMoney;
+  } else {
+    row.amount = "";
+    row.sumPayMoney = "";
+  }
+};
+const changeMoney = () => {
+  let money = 0;
+  for (let i = 0; i < formData.data.payDetailList.length; i++) {
+    if (formData.data.payDetailList[i].money) {
+      money = parseFloat(Number(money) + Number(formData.data.payDetailList[i].money)).toFixed(2);
+    }
+  }
+  formData.data.amount = money;
+};
+const handleSubmit = async () => {
+  let status = await submit.value.handleSubmit(() => {});
+  if (status) {
+    // ElMessage("请添加至少一条付款明细");
+    return false;
+  }
+  return status;
+};
+// 向父组件暴露
+defineExpose({
+  submitData: formData.data,
+  handleSubmit,
+});
+</script>
+
+<style lang="scss" scoped>
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+</style>

+ 26 - 0
src/utils/date.js

@@ -0,0 +1,26 @@
+// 获取日期范围内所有日期
+export function getMonthBetween(starDay, endDay) {
+  var arr = [];
+  var dates = [];
+  // 设置两个日期UTC时间
+  var db = new Date(starDay);
+  var de = new Date(endDay);
+  // 获取两个日期GTM时间
+  var s = db.getTime() - 24 * 60 * 60 * 1000;
+  var d = de.getTime() - 24 * 60 * 60 * 1000;
+  // 获取到两个日期之间的每一天的毫秒数
+  for (var i = s; i <= d; ) {
+    i = i + 24 * 60 * 60 * 1000;
+    arr.push(parseInt(i));
+  }
+  // 获取每一天的时间  YY-MM-DD
+  for (var j in arr) {
+    var time = new Date(arr[j]);
+    var year = time.getFullYear(time);
+    var mouth = time.getMonth() + 1 >= 10 ? time.getMonth() + 1 : "0" + (time.getMonth() + 1);
+    var day = time.getDate() >= 10 ? time.getDate() : "0" + time.getDate();
+    var YYMMDD = year + "-" + mouth + "-" + day;
+    dates.push(YYMMDD);
+  }
+  return dates;
+}

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

@@ -26,7 +26,7 @@
     <el-dialog :title="modalType == 'add' ? '新增' : '编辑'" v-model="dialogVisible" width="800" v-loading="loadingOperation">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #address>
-          <el-row :gutter="10" style="width: 100%; margin-left: -15px">
+          <el-row :gutter="10" style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="countryId">
                 <el-select v-model="formData.data.countryId" placeholder="国家" @change="(val) => getCityData(val, '20', true)">
@@ -57,7 +57,6 @@
             </el-col>
           </el-row>
         </template>
-
         <template #person>
           <div>
             <el-button type="primary" @click="clickAddPerson"> 添加 </el-button>
@@ -152,7 +151,6 @@ const config = computed(() => {
         prop: "name",
       },
     },
-
     {
       attrs: {
         label: "所在城市",

+ 291 - 32
src/views/oa/work/schedule/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="outer-layer">
     <div class="schedule-left">
-      <div class="title commons-title" style="margin-bottom: 0">我的日程</div>
+      <div class="commons-title" style="margin-bottom: 0">我的日程</div>
       <div style="margin-top: 16px">
         <el-input v-model="sourceList.pagination.keyword" placeholder="请输入关键词" class="input-with-select" clearable>
           <template #append>
@@ -26,8 +26,24 @@
         </el-menu>
       </div>
       <div style="margin-top: 16px; font-size: 20px; font-weight: 700">
-        <span>{{ day }}</span>
-        <span style="margin-left: 16px">{{ calculationWeek(day, "yyyy年MM月DD日") }}</span>
+        <span>{{ moment(today).format("yyyy年MM月DD日") }}</span>
+        <span style="margin-left: 16px">{{ calculationWeek(moment(today).format("yyyy年MM月DD日"), "yyyy年MM月DD日") }}</span>
+      </div>
+      <div v-for="(item, index) in selectData" :key="index" style="display: flex; margin-top: 16px">
+        <div style="width: 30px">
+          <div :style="'width: 14px; height: 14px; border-radius: 50px; margin-top: 4px; background-color: ' + item.color"></div>
+        </div>
+        <div style="width: calc(100% -0px)">
+          <div>
+            <span>{{ moment(item.startDate.substr(5, 16), "MM-DD HH:mm:ss").format("MM月DD日 HH:mm") }}</span>
+            <span> - </span>
+            <span>{{ moment(item.endDate.substr(5, 16), "MM-DD HH:mm:ss").format("MM月DD日 HH:mm") }}</span>
+          </div>
+          <div style="margin: 16px 0">
+            <div>{{ item.title }}</div>
+          </div>
+          <div style="margin: 16px 0" v-html="getStyle(item.remark)" v-if="item.remark"></div>
+        </div>
       </div>
     </div>
     <div class="schedule-right">
@@ -52,24 +68,50 @@
         </el-row>
       </div>
       <div class="schedule-bottom">
-        <el-calendar v-model="date" ref="calendar">
+        <el-calendar v-model="today" ref="calendar">
           <template #date-cell="{ data }">
             <div>
               <div :class="'title ' + (data.isSelected ? 'is-selected' : '')" :style="data.isSelected ? '  background-color: #eeeeee;' : ''">
                 <span :class="data.isSelected ? 'select-title' : ''">{{ data.day.substr(8, 10) }}</span>
-                <span style="position: absolute; right: 4px; top: 4px; font-size: 14px; color: black">4条</span>
-              </div>
-              <div :class="data.isSelected ? 'is-selected' : ''" style="text-align: center; height: 18px; line-height: 18px">
-                {{ data.day.substr(8, 10) }}
-              </div>
-              <div :class="data.isSelected ? 'is-selected' : ''" style="text-align: center; height: 18px; line-height: 18px">
-                {{ data.day.substr(8, 10) }}
+                <span style="position: absolute; right: 4px; top: 4px; font-size: 14px; color: black" v-if="judgeDay(data.day)">
+                  {{ dateList[data.day].length }}条
+                </span>
               </div>
-              <div :class="data.isSelected ? 'is-selected' : ''" style="text-align: center; height: 18px; line-height: 18px">
-                {{ data.day.substr(8, 10) }}
-              </div>
-              <div :class="data.isSelected ? 'is-selected' : ''" style="text-align: center; height: 18px; line-height: 18px">
-                {{ data.day.substr(8, 10) }}
+              <div v-if="judgeDay(data.day)">
+                <div v-for="(item, index) in dateList[data.day]" :key="index">
+                  <el-popover placement="right" :width="400" trigger="hover">
+                    <template #reference>
+                      <div class="line-class" :style="getColor(item)">
+                        <span style="font-size: 12px; margin-left: 8px; color: black">{{ item.title }}</span>
+                      </div>
+                    </template>
+                    <div>
+                      <el-form :model="item" label-width="80px" style="margin-top: 18px">
+                        <el-form-item label="主题:">
+                          <span>{{ item.title }}</span>
+                        </el-form-item>
+                        <el-form-item label="时间:">
+                          <div>
+                            <span v-if="item.startDate">{{ moment(item.startDate.substr(5, 16), "MM-DD HH:mm:ss").format("MM月DD日 HH:mm") }}</span>
+                            <span> - </span>
+                            <span v-if="item.endDate">{{ moment(item.endDate.substr(5, 16), "MM-DD HH:mm:ss").format("MM月DD日 HH:mm") }}</span>
+                          </div>
+                        </el-form-item>
+                        <el-form-item label="颜色:">
+                          <div :style="' width: 24px; height: 24px; border-radius: 50px; margin-top: 2px; background-color: ' + item.color">
+                            <el-icon style="color: #fff; font-size: 20px; margin: 2px 0 0 2px"><Check /></el-icon>
+                          </div>
+                        </el-form-item>
+                        <el-form-item label="提醒:">
+                          <span>{{ getLabel(item.noticeType, noticeType) }}</span>
+                        </el-form-item>
+                      </el-form>
+                      <div style="border-top: 1px solid #ccc; text-align: center; padding-top: 16px">
+                        <el-button type="primary" @click="clickDetail(item)" text>查看详情</el-button>
+                      </div>
+                    </div>
+                  </el-popover>
+                </div>
               </div>
             </div>
           </template>
@@ -163,6 +205,41 @@
         <el-button type="primary" @click="clickSubmit()" size="large">确 定</el-button>
       </template>
     </el-dialog>
+
+    <el-drawer v-model="drawer" :title="getDrawerTitle()" :direction="direction">
+      <div style="padding-top: 18px; border-top: 1px solid #ccc">
+        <el-form :model="item" label-width="80px" style="margin: 20px">
+          <el-form-item label="主题:">
+            <span>{{ scheduleDetails.title }}</span>
+          </el-form-item>
+          <el-form-item label="时间:">
+            <div>
+              <span v-if="scheduleDetails.startDate">{{ moment(scheduleDetails.startDate.substr(5, 16), "MM-DD HH:mm:ss").format("MM月DD日 HH:mm") }}</span>
+              <span> - </span>
+              <span v-if="scheduleDetails.endDate">{{ moment(scheduleDetails.endDate.substr(5, 16), "MM-DD HH:mm:ss").format("MM月DD日 HH:mm") }}</span>
+            </div>
+          </el-form-item>
+          <el-form-item label="颜色:">
+            <div :style="' width: 24px; height: 24px; border-radius: 50px; margin-top: 2px; background-color: ' + scheduleDetails.color">
+              <el-icon style="color: #fff; font-size: 20px; margin: 2px 0 0 2px"><Check /></el-icon>
+            </div>
+          </el-form-item>
+          <el-form-item label="参与人:">
+            <div style="display: flex; flex-wrap: wrap" v-if="scheduleDetails.participantList && scheduleDetails.participantList.length > 0">
+              <span v-for="(item, index) in scheduleDetails.participantList" :key="index" style="margin-right: 16px; margin-bottom: 8px">
+                {{ getLabel(item.participantId, userList) }}
+              </span>
+            </div>
+          </el-form-item>
+          <el-form-item label="提醒:">
+            <span>{{ getLabel(scheduleDetails.noticeType, noticeType) }}</span>
+          </el-form-item>
+          <el-form-item label="具体描述:">
+            <div v-html="getStyle(scheduleDetails.remark)" v-if="scheduleDetails.remark"></div>
+          </el-form-item>
+        </el-form>
+      </div>
+    </el-drawer>
   </div>
 </template>
 
@@ -173,6 +250,7 @@ import moment from "moment";
 import byForm from "@/components/byForm/index";
 import useUserStore from "@/store/modules/user";
 import { ElMessage } from "element-plus";
+import * as date from "@/utils/date.js";
 
 const { proxy } = getCurrentInstance();
 const sourceList = ref({
@@ -188,9 +266,11 @@ const sourceList = ref({
   },
 });
 const menuDefault = ref(2);
-const day = ref(moment().format("yyyy年MM月DD日"));
+// const day = ref(moment().format("yyyy年MM月DD日"));
 const month = ref(moment().format("yyyy年MM月"));
 const status = ref("0");
+const dateList = ref({});
+const selectData = ref([]);
 const tableStatus = ref([
   {
     label: "月",
@@ -201,16 +281,17 @@ const tableStatus = ref([
     value: "1",
   },
 ]);
-const date = ref(moment().format("yyyy-MM-DD"));
+const today = ref(moment().format("yyyy-MM-DD"));
 const calendar = ref();
 watch(
-  () => date.value,
+  () => today.value,
   (newValue) => {
     if (month.value !== moment(newValue).format("yyyy年MM月")) {
       month.value = moment(newValue).format("yyyy年MM月");
       console.log("date-change");
       getList();
     }
+    getSelectDayList();
   }
 );
 const selectDate = (val) => {
@@ -234,11 +315,130 @@ const getList = async () => {
   sourceList.value.pagination.startDate = moment(month.value, "yyyy年MM月").format("yyyy-MM-DD");
   sourceList.value.pagination.endDate = moment(moment(month.value, "yyyy年MM月").add(+1, "month").add(-1, "days").calendar()).format("yyyy-MM-DD");
   console.log("getList", sourceList.value.pagination);
+  dateList.value = {};
   proxy.post("/scheduleInfo/page", sourceList.value.pagination).then((res) => {
-    console.log(res);
-    // sourceList.value.data = res.rows;
+    let list = date.getMonthBetween(sourceList.value.pagination.startDate, sourceList.value.pagination.endDate);
+    if (list && list.length > 0) {
+      list.map((item) => {
+        dateList.value[item] = [];
+      });
+    }
+    let dataArr = [];
+    if (res.rows && res.rows.length > 0) {
+      for (let i = 0; i < res.rows.length; i++) {
+        let rowDate = date.getMonthBetween(res.rows[i].startDate.substr(0, 10), res.rows[i].endDate.substr(0, 10));
+        dataArr.push({
+          list: [],
+        });
+        for (let j = 0; j < rowDate.length; j++) {
+          dataArr[i].list.push({
+            ...res.rows[i],
+            date: rowDate[j],
+          });
+        }
+      }
+      var alreadyExisted = [];
+      for (var i = 0; i < dataArr.length; i++) {
+        if (dataArr[i].list.length > 0) {
+          var status = true;
+          for (var j = 0; j < 9; j++) {
+            var status2 = true;
+            for (var k = 0; k < dataArr[i].list.length; k++) {
+              if (alreadyExisted.indexOf(dataArr[i].list[k].date + "-" + j) !== -1) {
+                status2 = false;
+                break;
+              }
+            }
+            if (status2) {
+              for (var l = 0; l < dataArr[i].list.length; l++) {
+                alreadyExisted.push(dataArr[i].list[l].date + "-" + j);
+                for (var n = 0; n < j + 1; n++) {
+                  if (n !== j) {
+                    if (!dateList.value[dataArr[i].list[l].date]) {
+                      dateList.value[dataArr[i].list[l].date] = [];
+                    }
+                    if (!dateList.value[dataArr[i].list[l].date][n]) {
+                      dateList.value[dataArr[i].list[l].date].push({});
+                    }
+                  } else {
+                    if (!dateList.value[dataArr[i].list[l].date]) {
+                      dateList.value[dataArr[i].list[l].date] = [];
+                    }
+                    dateList.value[dataArr[i].list[l].date][j] = dataArr[i].list[l];
+                  }
+                }
+              }
+              status = false;
+              break;
+            }
+          }
+          if (status) {
+            for (var m = 0; m < dataArr[i].list.length; m++) {
+              if (!dateList.value[dataArr[i].list[m].date]) {
+                dateList.value[dataArr[i].list[m].date] = [];
+              }
+              if (!dateList.value[dataArr[i].list[m].date][0]) {
+                dateList.value[dataArr[i].list[m].date][0] = {};
+              }
+              if (!dateList.value[dataArr[i].list[m].date][1]) {
+                dateList.value[dataArr[i].list[m].date][1] = {};
+              }
+              if (!dateList.value[dataArr[i].list[m].date][2]) {
+                dateList.value[dataArr[i].list[m].date][2] = {};
+              }
+              if (!dateList.value[dataArr[i].list[m].date][3]) {
+                dateList.value[dataArr[i].list[m].date][3] = {};
+              }
+              if (!dateList.value[dataArr[i].list[m].date][4]) {
+                dateList.value[dataArr[i].list[m].date][4] = {};
+              }
+              if (!dateList.value[dataArr[i].list[m].date][5]) {
+                dateList.value[dataArr[i].list[m].date][5] = {};
+              }
+              if (!dateList.value[dataArr[i].list[m].date][6]) {
+                dateList.value[dataArr[i].list[m].date][6] = {};
+              }
+              if (!dateList.value[dataArr[i].list[m].date][7]) {
+                dateList.value[dataArr[i].list[m].date][7] = {};
+              }
+              if (!dateList.value[dataArr[i].list[m].date][8]) {
+                dateList.value[dataArr[i].list[m].date][8] = {};
+              }
+              dateList.value[dataArr[i].list[m].date].push(dataArr[i].list[m]);
+            }
+          }
+        }
+      }
+    }
   });
 };
+const getStyle = (text) => {
+  if (text) {
+    return text.replace(/\n|\r\n/g, "<br>");
+  } else {
+    return "";
+  }
+};
+const getSelectDayList = () => {
+  let queryParam = JSON.parse(JSON.stringify(sourceList.value.pagination));
+  queryParam.startDate = moment(today.value).format("yyyy-MM-DD");
+  queryParam.endDate = moment(today.value).format("yyyy-MM-DD");
+  if (menuDefault.value === 1) {
+    queryParam.createUser = useUserStore().user.userId;
+    queryParam.participantId = "";
+  } else if (menuDefault.value === 2) {
+    queryParam.createUser = useUserStore().user.userId;
+    queryParam.participantId = useUserStore().user.userId;
+  } else if (menuDefault.value === 3) {
+    queryParam.createUser = "";
+    queryParam.participantId = useUserStore().user.userId;
+  }
+  console.log("getSelectDayList", queryParam);
+  proxy.post("/scheduleInfo/page", queryParam).then((res) => {
+    selectData.value = res.rows;
+  });
+};
+getSelectDayList();
 const clickToday = () => {
   console.log("clickToday", sourceList.value.pagination);
 };
@@ -336,15 +536,13 @@ const predefineColors = ref([
   "#ffd700",
   "#90ee90",
   "#00ced1",
+  "#00e0ff",
   "#1e90ff",
   "#c71585",
-  "#ff4500ad",
-  "#ff7800",
-  "#fad400",
-  "#90f09080",
-  "#00babd",
-  "#1f93ffba",
-  "#c7158577",
+  "#8c00ff",
+  "#ff00f2",
+  "#00ff32",
+  "#b9ff00",
 ]);
 const formConfig = computed(() => {
   return [
@@ -419,6 +617,9 @@ const newSchedule = () => {
 };
 const clickSubmit = () => {
   schedule.value.handleSubmit(() => {
+    if (formData.data.startDate > formData.data.endDate) {
+      return ElMessage("结束时间不能小于开始时间");
+    }
     loadingDialog.value = true;
     let data = JSON.parse(JSON.stringify(formData.data));
     if (data.participantList && data.participantList.length > 0) {
@@ -436,6 +637,7 @@ const clickSubmit = () => {
         });
         openSchedule.value = false;
         getList();
+        getSelectDayList();
       },
       (err) => {
         console.log(err);
@@ -444,6 +646,44 @@ const clickSubmit = () => {
     );
   });
 };
+const judgeDay = (day) => {
+  return dateList.value[day] && dateList.value[day].length > 0;
+};
+const getColor = (item) => {
+  let text = "background-color: " + item.color + "6b;";
+  if (item.startDate && item.date === item.startDate.substr(0, 10)) {
+    text += " border-left: 5px solid " + item.color;
+  }
+  return text;
+};
+const getLabel = (val, list) => {
+  let text = "";
+  if (list && list.length > 0) {
+    let data = list.filter((item) => item.value == val);
+    if (data && data.length > 0) {
+      text = data[0].label;
+    }
+  }
+  return text;
+};
+const scheduleDetails = ref({});
+const drawer = ref(false);
+const direction = ref("rtl");
+const getDrawerTitle = () => {
+  let title = "";
+  if (scheduleDetails.value.date) {
+    title += moment(scheduleDetails.value.date).format("MM月DD日");
+    title = title + " " + proxy.calculationWeek(moment(scheduleDetails.value.date).format("MM月DD日"), "MM月DD日");
+  }
+  return title;
+};
+const clickDetail = (item) => {
+  proxy.post("/scheduleInfo/detail", { id: item.id }).then((res) => {
+    scheduleDetails.value = res;
+    scheduleDetails.value.date = item.date;
+    drawer.value = true;
+  });
+};
 </script>
 
 <style lang="scss" scoped>
@@ -475,6 +715,16 @@ const clickSubmit = () => {
       &::-webkit-scrollbar {
         width: 0px;
       }
+
+      .line-class {
+        height: 18px;
+        line-height: 18px;
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+        -o-text-overflow: ellipsis;
+        margin: 1px 0;
+      }
     }
   }
 }
@@ -492,22 +742,23 @@ const clickSubmit = () => {
 }
 ::v-deep(.el-calendar-table .el-calendar-day) {
   padding: 0;
-  min-height: calc((100vh - 100px - 40px - 92px - 50px - 40px) / 6);
+  height: calc((100vh - 100px - 40px - 92px - 50px - 40px) / 6);
+  overflow-y: hidden;
 }
 .is-selected {
   color: #1989fa;
 }
 .title {
   text-align: center;
-  height: 30px;
-  line-height: 22px;
+  height: 24px;
+  line-height: 18px;
   position: relative;
   padding: 4px;
   .select-title {
     border-radius: 50px;
     background-color: #1989fa;
     color: #eee;
-    padding: 4px;
+    padding: 2px;
   }
 }
 ::v-deep(.radio-color .el-radio) {
@@ -523,4 +774,12 @@ const clickSubmit = () => {
     border-radius: 50px;
   }
 }
+::v-deep(.el-drawer__title) {
+  font-size: 24px;
+  font-weight: 700;
+  color: black;
+}
+::v-deep(.el-drawer__body) {
+  padding: 0 !important;
+}
 </style>

+ 11 - 0
src/views/process/processApproval/index.vue

@@ -34,6 +34,11 @@
           v-else-if="flowForm.flowKey == 'pay_flow'"
           :queryData="queryData.data"
         ></PurchasePayment>
+        <PriceSheet
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'sale_quotation_flow'"
+          :queryData="queryData.data"
+        ></PriceSheet>
       </div>
       <div class="bottom">
         <div class="commons-title title">处理意见</div>
@@ -118,6 +123,8 @@ import { ElMessage, ElMessageBox } from "element-plus";
 import PurchaseRefund from "@/components/process/PurchaseRefund";
 // 付款
 import PurchasePayment from "@/components/process/PurchasePayment";
+// 报价单
+import PriceSheet from "@/components/process/PriceSheet";
 
 const router = useRouter();
 const route = useRoute();
@@ -231,6 +238,10 @@ const skipPage = () => {
     router.replace({
       path: "/purchaseManage/purchasePayment/payment",
     });
+  } else if (flowForm.flowKey == "PriceSheet") {
+    router.replace({
+      path: "/salesMange/saleContract/priceSheet",
+    });
   }
 };
 let queryData = reactive({

+ 380 - 0
src/views/publicModule/contractTemplate/index.vue

@@ -0,0 +1,380 @@
+<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="[
+          {
+            text: '添加模板',
+            action: () => openModal(),
+          },
+        ]"
+        @get-list="getList">
+      </byTable>
+    </div>
+
+    <el-dialog :title="modalType == 'add' ? '新增' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="800" v-loading="loadingOperation">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+        <template #allAddress>
+          <el-row :gutter="10" style="width: 100%">
+            <el-col :span="8">
+              <el-form-item prop="countryId">
+                <el-select v-model="formData.data.countryId" placeholder="国家" @change="(val) => getCityData(val, '20', true)">
+                  <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item prop="provinceId">
+                <el-select v-model="formData.data.provinceId" placeholder="省/洲" @change="(val) => getCityData(val, '30', true)">
+                  <el-option v-for="item in provinceData" :label="item.name" :value="item.id"> </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item prop="cityId">
+                <el-select v-model="formData.data.cityId" placeholder="城市">
+                  <el-option v-for="item in cityData" :label="item.name" :value="item.id"> </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="24">
+              <el-form-item prop="address">
+                <el-input v-model="formData.data.address" type="textarea"> </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </template>
+        <template #allAddressEnglish>
+          <el-row :gutter="10" style="width: 100%">
+            <el-col :span="8">
+              <el-form-item prop="countryEnStr">
+                <el-input v-model="formData.data.countryEnStr" placeholder="请输入国家 (英文)" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item prop="provinceEnStr">
+                <el-input v-model="formData.data.provinceEnStr" placeholder="请输入省/洲 (英文)" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item prop="cityEnStr">
+                <el-input v-model="formData.data.cityEnStr" placeholder="请输入城市 (英文)" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="24">
+              <el-form-item prop="addressEn">
+                <el-input v-model="formData.data.addressEn" type="textarea"> </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </template>
+        <template #templateContent>
+          <div style="width: 100%">
+            <Editor :value="formData.data.templateContent" @updateValue="updateContent"/>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import { computed, ref } from "vue";
+import Editor from "@/components/Editor/index.vue";
+
+const { proxy } = getCurrentInstance();
+const loading = ref(false);
+const companyList = ref({});
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    corporationId: "",
+    keyword: "",
+  },
+});
+const selectConfig = computed(() => {
+  return [
+    {
+      label: "公司名称",
+      prop: "corporationId",
+      data: companyList.value,
+    },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "公司名称",
+        prop: "corporationName",
+      },
+    },
+    {
+      attrs: {
+        label: "模板名称",
+        prop: "templateName",
+      },
+    },
+    {
+      attrs: {
+        label: "联系人",
+        prop: "contactName",
+      },
+    },
+    {
+      attrs: {
+        label: "联系电话",
+        prop: "contactNumber",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              update(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+              }).then(() => {
+                proxy
+                  .post("/contractTemplate/delete", {
+                    id: row.id,
+                  })
+                  .then(() => {
+                    ElMessage({
+                      message: "删除成功",
+                      type: "success",
+                    });
+                    getList();
+                  });
+              });
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+const getDict = () => {
+  proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    companyList.value = res.rows.map((item) => {
+      return {
+        label: item.name,
+        value: item.id,
+      };
+    });
+  });
+};
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/contractTemplate/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 modalType = ref("add");
+const dialogVisible = ref(false);
+const loadingOperation = ref(false);
+const submit = ref(null);
+const formData = reactive({
+  data: {
+    countryId: "China",
+  },
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const formConfig = computed(() => {
+  return [
+    {
+      label: "基础信息",
+    },
+    {
+      type: "input",
+      prop: "templateName",
+      label: "模板名称",
+      itemType: "text",
+      placeholder: "请输入模板名称",
+    },
+    {
+      type: "select",
+      label: "公司名称",
+      prop: "corporationId",
+      data: companyList.value,
+    },
+    {
+      label: "联系信息",
+    },
+    {
+      type: "input",
+      prop: "contactName",
+      label: "业务联系人",
+      itemType: "text",
+      placeholder: "请输入联系人",
+      itemWidth: 30,
+    },
+    {
+      type: "input",
+      prop: "contactNumber",
+      label: "  ",
+      itemType: "text",
+      placeholder: "请输入联系电话",
+      itemWidth: 70,
+    },
+    {
+      type: "input",
+      prop: "corporationNumber",
+      label: "公司电话",
+      itemType: "text",
+      placeholder: "请输入公司电话",
+    },
+    {
+      type: "slot",
+      slotName: "allAddress",
+      label: "公司地址",
+    },
+    {
+      type: "slot",
+      slotName: "allAddressEnglish",
+      label: "公司地址 (英文)",
+    },
+    {
+      type: "slot",
+      slotName: "templateContent",
+      label: "合同模板",
+    },
+  ];
+});
+let rules = ref({
+  templateName: [{ required: true, message: "请输入模板名称", trigger: "blur" }],
+  corporationId: [{ required: true, message: "请选择公司", trigger: "change" }],
+  countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
+  provinceId: [{ required: true, message: "请选择省/州", trigger: "change" }],
+  countryEnStr: [{ required: true, message: "请输入国家 (英文)", trigger: "blur" }],
+  provinceEnStr: [{ required: true, message: "请输入省/洲 (英文)", trigger: "blur" }],
+  //   cityId: [{ required: true, message: "请选择城市", trigger: "change" }],
+});
+const countryData = ref([]);
+const provinceData = ref([]);
+const cityData = ref([]);
+const getCityData = (id, type, isChange) => {
+  proxy.post("/areaInfo/list", { parentId: id }).then((res) => {
+    if (type === "20") {
+      provinceData.value = res;
+      if (isChange) {
+        formData.data.provinceId = "";
+        formData.data.cityId = "";
+      }
+    } else if (type === "30") {
+      cityData.value = res;
+      if (isChange) {
+        formData.data.cityId = "";
+      }
+    } else {
+      countryData.value = res;
+    }
+  });
+};
+getCityData("0");
+const openModal = () => {
+  modalType.value = "add";
+  formData.data = {
+    templateContent: "",
+    countryId: "China",
+  };
+  getCityData(formData.data.countryId, "20");
+  loadingOperation.value = false;
+  dialogVisible.value = true;
+};
+const submitForm = () => {
+  submit.value.handleSubmit(() => {
+    loadingOperation.value = true;
+    proxy.post("/contractTemplate/" + modalType.value, formData.data).then(
+      () => {
+        ElMessage({
+          message: modalType.value == "add" ? "添加成功" : "编辑成功",
+          type: "success",
+        });
+        dialogVisible.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+        loadingOperation.value = false;
+      }
+    );
+  });
+};
+const update = (row) => {
+  modalType.value = "edit";
+  loadingOperation.value = true;
+  proxy.post("/contractTemplate/detail", { id: row.id }).then((res) => {
+    formData.data = res;
+    getCityData(formData.data.countryId, "20");
+    getCityData(formData.data.provinceId, "30");
+    loadingOperation.value = false;
+    dialogVisible.value = true;
+  });
+};
+const updateContent = (val) => {
+  formData.data.templateContent = val
+}
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+</style>

+ 225 - 0
src/views/salesMange/saleContract/priceSheet/index.vue

@@ -0,0 +1,225 @@
+<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="[
+          {
+            text: '新建报价单',
+            action: () => newPriceSheet(),
+          },
+        ]"
+        @get-list="getList">
+        <template #amount="{ item }">
+          <div>
+            <span>{{ moneyFormat(item.amount, 2) }}</span>
+          </div>
+        </template>
+      </byTable>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { computed, ref } from "vue";
+import byTable from "@/components/byTable/index";
+import useUserStore from "@/store/modules/user";
+
+const { proxy } = getCurrentInstance();
+const accountList = ref([]);
+const status = ref([
+  {
+    label: "草稿",
+    value: 0,
+  },
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "驳回",
+    value: 20,
+  },
+  {
+    label: "审批通过",
+    value: 30,
+  },
+  {
+    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: payStatus.value,
+    //   },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "报价单号",
+        prop: "code",
+        width: 200,
+      },
+    },
+    {
+      attrs: {
+        label: "归属公司",
+        slot: "sellCorporationId",
+      },
+    },
+    {
+      attrs: {
+        label: "报价人",
+        prop: "sellContactName",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "报价时间",
+        prop: "createTime",
+        width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "客户名称",
+        prop: "buyCorporationId",
+      },
+    },
+    {
+      attrs: {
+        label: "报价金额",
+        prop: "amount",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "预付比例",
+        prop: "advanceRatio",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "审批状态",
+        prop: "status",
+        width: 140,
+      },
+      render(type) {
+        let text = "";
+        if (status.value && status.value.length > 0) {
+          let data = status.value.filter((item) => item.value == type);
+          if (data && data.length > 0) {
+            text = data[0].label;
+          }
+        }
+        return text;
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "复制",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              clickPrint(row);
+            },
+          },
+          {
+            attrs: {
+              label: "查看",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              clickPrint(row);
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+const getDict = () => {
+  proxy.post("/saleQuotation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    accountList.value = res.rows.map((item) => {
+      return {
+        label: item.alias,
+        value: item.id,
+      };
+    });
+  });
+};
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/pay/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 newPriceSheet = () => {
+  proxy.$router.replace({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "sale_quotation_flow",
+      flowName: "报价审批流程",
+    },
+  });
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+</style>