cz 1 жил өмнө
parent
commit
6e4410422a

+ 0 - 206
src/components/FileUpload/index.vue

@@ -1,206 +0,0 @@
-<template>
-  <div class="upload-file">
-    <el-upload
-      multiple
-      :action="uploadFileUrl"
-      :before-upload="handleBeforeUpload"
-      :file-list="fileList"
-      :limit="limit"
-      :on-error="handleUploadError"
-      :on-exceed="handleExceed"
-      :on-success="handleUploadSuccess"
-      :show-file-list="false"
-      :headers="headers"
-      class="upload-file-uploader"
-      ref="fileUpload"
-    >
-      <!-- 上传按钮 -->
-      <el-button type="primary">选取文件</el-button>
-    </el-upload>
-    <!-- 上传提示 -->
-    <div class="el-upload__tip" v-if="showTip">
-      请上传
-      <template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
-      <template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
-      的文件
-    </div>
-    <!-- 文件列表 -->
-    <transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
-      <li :key="file.uid" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
-        <el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank">
-          <span class="el-icon-document"> {{ getFileName(file.name) }} </span>
-        </el-link>
-        <div class="ele-upload-list__item-content-action">
-          <el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link>
-        </div>
-      </li>
-    </transition-group>
-  </div>
-</template>
-
-<script setup>
-import { getToken } from "@/utils/auth";
-
-const props = defineProps({
-  modelValue: [String, Object, Array],
-  // 数量限制
-  limit: {
-    type: Number,
-    default: 5,
-  },
-  // 大小限制(MB)
-  fileSize: {
-    type: Number,
-    default: 5,
-  },
-  // 文件类型, 例如['png', 'jpg', 'jpeg']
-  fileType: {
-    type: Array,
-    default: () => ["doc", "xls", "ppt", "txt", "pdf"],
-  },
-  // 是否显示提示
-  isShowTip: {
-    type: Boolean,
-    default: true
-  }
-});
-
-const { proxy } = getCurrentInstance();
-const emit = defineEmits();
-const number = ref(0);
-const uploadList = ref([]);
-const baseUrl = import.meta.env.VITE_APP_BASE_API;
-const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + "/common/upload"); // 上传文件服务器地址
-const headers = ref({ Authorization: "Bearer " + getToken() });
-const fileList = ref([]);
-const showTip = computed(
-  () => props.isShowTip && (props.fileType || props.fileSize)
-);
-
-watch(() => props.modelValue, val => {
-  if (val) {
-    let temp = 1;
-    // 首先将值转为数组
-    const list = Array.isArray(val) ? val : props.modelValue.split(',');
-    // 然后将数组转为对象数组
-    fileList.value = list.map(item => {
-      if (typeof item === "string") {
-        item = { name: item, url: item };
-      }
-      item.uid = item.uid || new Date().getTime() + temp++;
-      return item;
-    });
-  } else {
-    fileList.value = [];
-    return [];
-  }
-},{ deep: true, immediate: true });
-
-// 上传前校检格式和大小
-function handleBeforeUpload(file) {
-  // 校检文件类型
-  if (props.fileType.length) {
-    const fileName = file.name.split('.');
-    const fileExt = fileName[fileName.length - 1];
-    const isTypeOk = props.fileType.indexOf(fileExt) >= 0;
-    if (!isTypeOk) {
-      proxy.$modal.msgError(`文件格式不正确, 请上传${props.fileType.join("/")}格式文件!`);
-      return false;
-    }
-  }
-  // 校检文件大小
-  if (props.fileSize) {
-    const isLt = file.size / 1024 / 1024 < props.fileSize;
-    if (!isLt) {
-      proxy.$modal.msgError(`上传文件大小不能超过 ${props.fileSize} MB!`);
-      return false;
-    }
-  }
-  proxy.$modal.loading("正在上传文件,请稍候...");
-  number.value++;
-  return true;
-}
-
-// 文件个数超出
-function handleExceed() {
-  proxy.$modal.msgError(`上传文件数量不能超过 ${props.limit} 个!`);
-}
-
-// 上传失败
-function handleUploadError(err) {
-  proxy.$modal.msgError("上传文件失败");
-}
-
-// 上传成功回调
-function handleUploadSuccess(res, file) {
-  if (res.code === 200) {
-    uploadList.value.push({ name: res.fileName, url: res.fileName });
-    uploadedSuccessfully();
-  } else {
-    number.value--;
-    proxy.$modal.closeLoading();
-    proxy.$modal.msgError(res.msg);
-    proxy.$refs.fileUpload.handleRemove(file);
-    uploadedSuccessfully();
-  }
-}
-
-// 删除文件
-function handleDelete(index) {
-  fileList.value.splice(index, 1);
-  emit("update:modelValue", listToString(fileList.value));
-}
-
-// 上传结束处理
-function uploadedSuccessfully() {
-  if (number.value > 0 && uploadList.value.length === number.value) {
-    fileList.value = fileList.value.filter(f => f.url !== undefined).concat(uploadList.value);
-    uploadList.value = [];
-    number.value = 0;
-    emit("update:modelValue", listToString(fileList.value));
-    proxy.$modal.closeLoading();
-  }
-}
-
-// 获取文件名称
-function getFileName(name) {
-  if (name.lastIndexOf("/") > -1) {
-    return name.slice(name.lastIndexOf("/") + 1);
-  } else {
-    return "";
-  }
-}
-
-// 对象转成指定字符串分隔
-function listToString(list, separator) {
-  let strs = "";
-  separator = separator || ",";
-  for (let i in list) {
-    if (list[i].url) {
-      strs += list[i].url + separator;
-    }
-  }
-  return strs != '' ? strs.substr(0, strs.length - 1) : '';
-}
-</script>
-
-<style scoped lang="scss">
-.upload-file-uploader {
-  margin-bottom: 5px;
-}
-.upload-file-list .el-upload-list__item {
-  border: 1px solid #e4e7ed;
-  line-height: 2;
-  margin-bottom: 10px;
-  position: relative;
-}
-.upload-file-list .ele-upload-list__item-content {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  color: inherit;
-}
-.ele-upload-list__item-content-action .el-link {
-  margin-right: 10px;
-}
-</style>

+ 0 - 179
src/components/HeaderSearch/index.vue

@@ -1,179 +0,0 @@
-<template>
-  <div :class="{ 'show': show }" class="header-search">
-    <svg-icon class-name="search-icon" icon-class="search" @click.stop="click" />
-    <el-select
-      ref="headerSearchSelectRef"
-      v-model="search"
-      :remote-method="querySearch"
-      filterable
-      default-first-option
-      remote
-      placeholder="Search"
-      class="header-search-select"
-      @change="change"
-    >
-      <el-option v-for="option in options" :key="option.item.path" :value="option.item" :label="option.item.title.join(' > ')" />
-    </el-select>
-  </div>
-</template>
-
-<script setup>
-import Fuse from 'fuse.js'
-import { getNormalPath } from '@/utils/ruoyi'
-import { isHttp } from '@/utils/validate'
-import usePermissionStore from '@/store/modules/permission'
-
-const search = ref('');
-const options = ref([]);
-const searchPool = ref([]);
-const show = ref(false);
-const fuse = ref(undefined);
-const headerSearchSelectRef = ref(null);
-const router = useRouter();
-const routes = computed(() => usePermissionStore().routes);
-
-function click() {
-  show.value = !show.value
-  if (show.value) {
-    headerSearchSelectRef.value && headerSearchSelectRef.value.focus()
-  }
-};
-function close() {
-  headerSearchSelectRef.value && headerSearchSelectRef.value.blur()
-  options.value = []
-  show.value = false
-}
-function change(val) {
-  const path = val.path;
-  if (isHttp(path)) {
-    // http(s):// 路径新窗口打开
-    const pindex = path.indexOf("http");
-    window.open(path.substr(pindex, path.length), "_blank");
-  } else {
-    router.push(path)
-  }
-
-  search.value = ''
-  options.value = []
-  nextTick(() => {
-    show.value = false
-  })
-}
-function initFuse(list) {
-  fuse.value = new Fuse(list, {
-    shouldSort: true,
-    threshold: 0.4,
-    location: 0,
-    distance: 100,
-    minMatchCharLength: 1,
-    keys: [{
-      name: 'title',
-      weight: 0.7
-    }, {
-      name: 'path',
-      weight: 0.3
-    }]
-  })
-}
-// Filter out the routes that can be displayed in the sidebar
-// And generate the internationalized title
-function generateRoutes(routes, basePath = '', prefixTitle = []) {
-  let res = []
-
-  for (const r of routes) {
-    // skip hidden router
-    if (r.hidden) { continue }
-    const p = r.path.length > 0 && r.path[0] === '/' ? r.path : '/' + r.path;
-    const data = {
-      path: !isHttp(r.path) ? getNormalPath(basePath + p) : r.path,
-      title: [...prefixTitle]
-    }
-
-    if (r.meta && r.meta.title) {
-      data.title = [...data.title, r.meta.title]
-
-      if (r.redirect !== 'noRedirect') {
-        // only push the routes with title
-        // special case: need to exclude parent router without redirect
-        res.push(data)
-      }
-    }
-
-    // recursive child routes
-    if (r.children) {
-      const tempRoutes = generateRoutes(r.children, data.path, data.title)
-      if (tempRoutes.length >= 1) {
-        res = [...res, ...tempRoutes]
-      }
-    }
-  }
-  return res
-}
-function querySearch(query) {
-  if (query !== '') {
-    options.value = fuse.value.search(query)
-  } else {
-    options.value = []
-  }
-}
-
-onMounted(() => {
-  searchPool.value = generateRoutes(routes.value);
-})
-
-watchEffect(() => {
-  searchPool.value = generateRoutes(routes.value)
-})
-
-watch(show, (value) => {
-  if (value) {
-    document.body.addEventListener('click', close)
-  } else {
-    document.body.removeEventListener('click', close)
-  }
-})
-
-watch(searchPool, (list) => {
-  initFuse(list)
-})
-</script>
-
-<style lang='scss' scoped>
-.header-search {
-  font-size: 0 !important;
-
-  .search-icon {
-    cursor: pointer;
-    font-size: 18px;
-    vertical-align: middle;
-  }
-
-  .header-search-select {
-    font-size: 18px;
-    transition: width 0.2s;
-    width: 0;
-    overflow: hidden;
-    background: transparent;
-    border-radius: 0;
-    display: inline-block;
-    vertical-align: middle;
-
-    :deep(.el-input__inner) {
-      border-radius: 0;
-      border: 0;
-      padding-left: 0;
-      padding-right: 0;
-      box-shadow: none !important;
-      border-bottom: 1px solid #d9d9d9;
-      vertical-align: middle;
-    }
-  }
-
-  &.show {
-    .header-search-select {
-      width: 210px;
-      margin-left: 10px;
-    }
-  }
-}
-</style>

+ 0 - 1395
src/components/process/Contract.vue

@@ -1,1395 +0,0 @@
-<template>
-  <div style="width: 100%; padding: 0px 15px">
-    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
-      <template #seller>
-        <div style="width: 100%">
-          <el-form-item prop="sellCorporationId">
-            <el-select v-model="formData.data.sellCorporationId" style="width: 100%" disabled>
-              <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
-            </el-select>
-          </el-form-item>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="8">
-              <el-form-item label="地址" prop="sellCountryName">
-                <el-input v-model="formData.data.sellCountryName" placeholder="请输入国家" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label=" " prop="sellProvinceName">
-                <el-input v-model="formData.data.sellProvinceName" placeholder="请输入省/州" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label=" " prop="sellCityName">
-                <el-input v-model="formData.data.sellCityName" placeholder="请输入城市" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="24">
-              <el-form-item prop="sellAddress">
-                <el-input v-model="formData.data.sellAddress" type="textarea"> </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="8">
-              <el-form-item label="联系人" prop="sellContactName">
-                <el-input v-model="formData.data.sellContactName" placeholder="请输入联系人" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="16">
-              <el-form-item label=" " prop="sellContactNumber">
-                <el-input v-model="formData.data.sellContactNumber" placeholder="请输入联系人电话" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </div>
-      </template>
-      <template #buyer>
-        <div style="width: 100%">
-          <div style="width: 100%">
-            <el-form-item prop="buyCorporationId">
-              <el-select v-model="formData.data.buyCorporationId" filterable style="width: 100%" @change="changeCustomer">
-                <el-option v-for="item in customerList" :key="item.value" :label="item.label" :value="item.value" />
-              </el-select>
-            </el-form-item>
-            <el-row style="margin-top: 20px; width: 100%">
-              <el-col :span="6">
-                <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
-                    <el-option v-for="item in countryData" :label="formData.data.contractType == '2' ? item.chineseName : item.name" :value="item.id">
-                    </el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label=" " prop="provinceName">
-                  <selectCity
-                    placeholder="省/洲"
-                    @change="(val) => getCityData(val, '30', true)"
-                    addressId="provinceId"
-                    addressName="provinceName"
-                    v-model="formData.data"
-                    :data="provinceData">
-                  </selectCity>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label=" " prop="cityName">
-                  <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData"> </selectCity>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label=" " prop="buyPostalCode">
-                  <el-input v-model="formData.data.buyPostalCode" placeholder="请输入邮编" />
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row style="margin-top: 20px; width: 100%">
-              <el-col :span="24">
-                <el-form-item prop="buyAddress">
-                  <el-input v-model="formData.data.buyAddress" type="textarea"> </el-input>
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row style="margin-top: 20px; width: 100%">
-              <el-col :span="8">
-                <el-form-item label="联系人" prop="buyContactName">
-                  <el-autocomplete
-                    v-model="formData.data.buyContactName"
-                    :fetch-suggestions="querySearchPerson"
-                    clearable
-                    class="inline-input w-50"
-                    placeholder="请输入联系人"
-                    @select="handlePerson">
-                  </el-autocomplete>
-                </el-form-item>
-              </el-col>
-              <el-col :span="16">
-                <el-form-item label=" " prop="buyContactNumber">
-                  <el-input v-model="formData.data.buyContactNumber" placeholder="请输入联系人电话" />
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </div>
-        </div>
-      </template>
-      <template #commodity>
-        <div style="width: 100%">
-          <el-button @click="openProduct = true">添加商品</el-button>
-          <el-table :data="formData.data.contractProductList" style="width: 100%; margin-top: 16px">
-            <el-table-column label="商品图片" width="80">
-              <template #default="{ row }">
-                <div v-if="row.fileUrl">
-                  <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
-                </div>
-                <div v-else></div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="code" label="商品编码" width="120" />
-            <el-table-column prop="name" label="商品中文名" width="160" />
-            <el-table-column label="商品英文名" min-width="200">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'contractProductList.' + $index + '.productName'" :rules="rules.productName" :inline-message="true">
-                    <el-input v-model="row.productName" placeholder="请输入商品英文名" />
-                  </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="'contractProductList.' + $index + '.productModel'" :inline-message="true">
-                    <el-input v-model="row.productModel" placeholder="请输入规格型号" />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="unit" label="单位" width="100" :formatter="(row) => dictValueLabel(row.unit, productUnit)" />
-            <el-table-column label="数量" width="160">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'contractProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.quantity"
-                      placeholder="请输入数量"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
-                        () => {
-                          return calculationAmount('contractProductList', $index, 'quantity');
-                        }
-                      " />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column label="单价" width="160">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'contractProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.price"
-                      placeholder="请输入单价"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
-                        () => {
-                          return calculationAmount('contractProductList', $index, 'price');
-                        }
-                      " />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="amount" label="金额" width="100" />
-            <el-table-column align="center" label="操作" width="120" fixed="right">
-              <template #default="{ row, $index }">
-                <el-button type="primary" link @click="handleHandover(row, $index)">交接单</el-button>
-                <el-button type="primary" link @click="handleRemove($index, row)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </template>
-      <template #otherCharge>
-        <div style="width: 100%">
-          <el-button type="primary" @click="clickAdd()">添加行</el-button>
-          <el-table :data="formData.data.contractProjectList" style="width: 100%; margin-top: 16px">
-            <el-table-column label="收费项目" width="220">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'contractProjectList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true">
-                    <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50" placeholder="请输入收费项目" />
-                  </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="'contractProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.amount"
-                      placeholder="请输入金额"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
-                        () => {
-                          return totalAmount('contractProjectList', $index, 'amount');
-                        }
-                      " />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column label="备注">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'contractProjectList.' + $index + '.remark'">
-                    <el-input v-model="row.remark" placeholder="请输入备注" />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="操作" width="80" fixed="right">
-              <template #default="{ row, $index }">
-                <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </template>
-      <template #offerMoney>
-        <div style="width: 100%">
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="4">
-              <el-form-item label="币种" prop="currency">
-                <el-select v-model="formData.data.currency" placeholder="请选择币种" style="width: 100%">
-                  <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="合同总金额" prop="amount">
-                <el-input v-model="formData.data.amount" placeholder="合同总金额" disabled />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="7">
-              <el-form-item label="付款方式" prop="paymentMethod">
-                <el-select v-model="formData.data.paymentMethod" placeholder="请选择付款方式" style="width: 100%">
-                  <el-option v-for="item in fundsPaymentMethod" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="7">
-              <el-form-item label="预付比例 (%)" prop="advanceRatio">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.advanceRatio"
-                  placeholder="请输入预付比例"
-                  style="width: 100%"
-                  :precision="2"
-                  :controls="false"
-                  :min="0"
-                  :max="100" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="7">
-              <el-form-item label="收款账号" prop="shroffAccountId">
-                <el-select v-model="formData.data.shroffAccountId" placeholder="请选择收款账号" style="width: 100%" @change="changeShroffAccount">
-                  <el-option v-for="item in accountList" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="3">
-              <el-form-item label="  ">
-                <el-button type="primary" @click="changeActiveName" text>
-                  <span v-if="activeName == '1'">收起</span>
-                  <span v-else>展开</span>
-                </el-button>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <div style="width: 100%; margin-top: 34px">
-            <el-collapse v-model="activeName" class="hideCollapse" accordion>
-              <el-collapse-item title="" name="1">
-                <el-row style="width: 100%">
-                  <el-col :span="9">
-                    <el-form-item label="Beneficiary Name" prop="beneficiaryName">
-                      <el-input v-model="formData.data.beneficiaryName" placeholder="请输入Beneficiary Name" />
-                    </el-form-item>
-                    <div style="height: 20px"></div>
-                    <el-form-item label="Beneficiary Bank" prop="beneficiaryBank">
-                      <el-input v-model="formData.data.beneficiaryBank" placeholder="请输入Beneficiary Bank" />
-                    </el-form-item>
-                    <div style="height: 20px"></div>
-                    <el-form-item label="Beneficiary Bank Address" prop="beneficiaryBankAddress">
-                      <el-input v-model="formData.data.beneficiaryBankAddress" placeholder="请输入Beneficiary Bank Address" />
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="9">
-                    <el-form-item label="Beneficiary Account Number" prop="beneficiaryAccountNumber">
-                      <el-input v-model="formData.data.beneficiaryAccountNumber" placeholder="请输入Beneficiary Account Number" />
-                    </el-form-item>
-                    <div style="height: 20px"></div>
-                    <el-form-item label="Swift Code" prop="swiftCode">
-                      <el-input v-model="formData.data.swiftCode" placeholder="请输入Swift Code" />
-                    </el-form-item>
-                    <div style="height: 20px"></div>
-                    <el-form-item label="Beneficiary Address" prop="beneficiaryAddress">
-                      <el-input v-model="formData.data.beneficiaryAddress" placeholder="请输入Beneficiary Address" />
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-collapse-item>
-            </el-collapse>
-          </div>
-        </div>
-      </template>
-      <template #delivery>
-        <div style="width: 100%">
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="7">
-              <el-form-item label="贸易方式" prop="tradeMethods">
-                <el-select v-model="formData.data.tradeMethods" placeholder="请选择贸易方式" style="width: 100%">
-                  <el-option v-for="item in tradeMethods" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="7">
-              <el-form-item label="运输方式" prop="transportMethod">
-                <el-select v-model="formData.data.transportMethod" placeholder="请选择运输方式" style="width: 100%">
-                  <el-option v-for="item in shippingMethod" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="7">
-              <el-form-item label="运输说明" prop="transportRemark">
-                <el-input v-model="formData.data.transportRemark" placeholder="请输入运输说明" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="14">
-              <el-form-item label="付款条件" prop="remark">
-                <el-input v-model="formData.data.remark" :rows="2" type="textarea" placeholder="请输入付款条件" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="7">
-              <el-form-item label="交货期限 (天)" prop="deliveryTime">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.deliveryTime"
-                  placeholder="请输入交货期限"
-                  style="width: 100%"
-                  :precision="0"
-                  :controls="false"
-                  :min="0" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="7">
-              <el-form-item label="质保期 (天)" prop="warranty">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.warranty"
-                  placeholder="请输入质保期"
-                  style="width: 100%"
-                  :precision="0"
-                  :controls="false"
-                  :min="0" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </div>
-      </template>
-      <template #shipment>
-        <div style="width: 100%">
-          <el-table :data="formData.data.contractShipmentList" style="width: 100%; margin-top: 16px">
-            <el-table-column prop="code" label="商品编码" width="120" />
-            <el-table-column prop="productName" label="商品名称" />
-            <el-table-column label="出货日期" width="220">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'contractShipmentList.' + $index + '.shipmentTime'" :rules="rules.shipmentTime" :inline-message="true">
-                    <el-date-picker v-model="row.shipmentTime" type="date" placeholder="请选择出货日期" value-format="YYYY-MM-DD" />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column label="数量" width="160">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'contractShipmentList.' + $index + '.quantity'" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.quantity"
-                      placeholder="请输入数量"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
-                        () => {
-                          return calculationAmount('contractShipmentList', $index, 'quantity');
-                        }
-                      " />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="操作" width="120" fixed="right">
-              <template #default="{ row, $index }">
-                <el-button type="primary" link @click="clickSplit(row)">拆分</el-button>
-                <el-button type="primary" link @click="clickDelete($index)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </template>
-    </byForm>
-
-    <el-dialog v-if="openProduct" v-model="openProduct" title="选择商品" width="70%" append-to-body>
-      <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
-    </el-dialog>
-
-    <el-dialog title="交接单" v-if="openHandover" v-model="openHandover" width="800">
-      <byForm :formConfig="formHandoverConfig" :formOption="formOption" v-model="productRow.data">
-        <template #remark>
-          <div style="width: 100%">
-            <Editor :value="productRow.data.remark" @updateValue="updateContent" />
-          </div>
-        </template>
-        <template #file>
-          <div style="width: 100%">
-            <el-upload
-              v-model:fileList="fileList"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              multiple
-              :before-upload="uploadFile"
-              :on-success="handleSuccess"
-              :on-preview="onPreviewFile">
-              <el-button>选择</el-button>
-            </el-upload>
-          </div>
-        </template>
-      </byForm>
-      <template #footer>
-        <el-button @click="openHandover = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitHandoverForm()" size="large">确 定</el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-
-<script setup>
-import byForm from "@/components/byForm/index";
-import SelectGoods from "@/components/product/SelectGoods";
-import { ElMessage } from "element-plus";
-import Editor from "@/components/Editor/index.vue";
-import selectCity from "@/components/selectCity/index.vue";
-import { useRoute } from "vue-router";
-
-const route = useRoute();
-// 接收父组件的传值
-const props = defineProps({
-  queryData: String,
-});
-const { proxy } = getCurrentInstance();
-const contractType = ref([]);
-const accountCurrency = ref([]);
-const fundsPaymentMethod = ref([]);
-const tradeMethods = ref([]);
-const shippingMethod = ref([]);
-const templateList = ref([]);
-const corporationList = ref([]);
-const customerList = ref([]);
-const countryData = ref([]);
-const provinceData = ref([]);
-const cityData = ref([]);
-const customerUserList = ref([]);
-const accountList = ref([]);
-const productUnit = ref([]);
-const openProduct = ref(false);
-const activeName = ref("");
-const formData = reactive({
-  data: {
-    contractType: "1",
-    amount: undefined,
-    contractProductList: [],
-    contractProjectList: [],
-    contractShipmentList: [],
-  },
-});
-const submit = ref(null);
-const judgeStatus = () => {
-  if (route.query.processType == 20 || route.query.processType == 10) {
-    return true;
-  }
-  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
-    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
-    if (data && data.length > 0) {
-      return true;
-    }
-  }
-  return false;
-};
-const formOption = reactive({
-  inline: true,
-  labelWidth: 100,
-  itemWidth: 100,
-  rules: [],
-  disabled: false,
-});
-const formConfig = computed(() => {
-  return [
-    {
-      type: "title",
-      title: "合同模板",
-      label: "",
-    },
-    {
-      type: "select",
-      label: "合同类型",
-      prop: "contractType",
-      data: contractType.value,
-      itemWidth: 25,
-    },
-    {
-      type: "select",
-      label: "选择合同模板",
-      prop: "contractTemplateId",
-      data: templateList.value,
-      fn: (val) => {
-        changeTemplate(val);
-      },
-      itemWidth: 26,
-    },
-    {
-      type: "slot",
-      slotName: "seller",
-      label: "卖方信息",
-      itemWidth: 50,
-    },
-    {
-      type: "slot",
-      slotName: "buyer",
-      label: "买方信息",
-      itemWidth: 50,
-    },
-    {
-      type: "slot",
-      slotName: "commodity",
-      label: "商品信息",
-    },
-    {
-      type: "slot",
-      slotName: "otherCharge",
-      label: "其他收费项目",
-    },
-    {
-      type: "slot",
-      slotName: "offerMoney",
-      label: "收款信息",
-    },
-    {
-      type: "slot",
-      slotName: "delivery",
-      label: "交付信息",
-    },
-    {
-      type: "slot",
-      slotName: "shipment",
-      label: "出货计划",
-    },
-  ];
-});
-const rules = ref({
-  contractType: [{ required: true, message: "请选择合同类型", trigger: "change" }],
-  contractTemplateId: [{ required: true, message: "请选择合同模板", trigger: "change" }],
-  buyCorporationId: [{ required: true, message: "请选择公司", trigger: "change" }],
-  countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
-  sellAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
-  buyAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
-  buyContactName: [{ required: true, message: "请输入联系人", trigger: ["change", "blur"] }],
-  buyContactNumber: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
-  productName: [{ required: true, message: "请输入商品英文名", trigger: "blur" }],
-  productModel: [{ required: true, message: "请输入规格型号", trigger: "blur" }],
-  quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
-  price: [{ required: true, message: "请输入单价", trigger: "blur" }],
-  amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
-  payName: [{ required: true, message: "请输入收费项目", trigger: ["change", "blur"] }],
-  currency: [{ required: true, message: "请选择币种", trigger: "change" }],
-  effective: [{ required: true, message: "请输入报价有效期", trigger: "blur" }],
-  deliveryTime: [{ required: true, message: "请选择交货期限", trigger: "blur" }],
-  paymentMethod: [{ required: true, message: "请选择付款方式", trigger: "change" }],
-  advanceRatio: [{ required: true, message: "请输入预付比例", trigger: "blur" }],
-  shroffAccountId: [{ required: true, message: "请选择收款账号", trigger: "change" }],
-  tradeMethods: [{ required: true, message: "请选择贸易方式", trigger: "change" }],
-  transportMethod: [{ required: true, message: "请选择运输方式", trigger: "change" }],
-  transportRemark: [{ required: true, message: "请输入运输说明", trigger: "blur" }],
-  remark: [{ required: true, message: "请输入付款条件", trigger: "blur" }],
-});
-const getDict = () => {
-  proxy.getDictOne(["account_currency", "funds_payment_method", "trade_mode", "shipping_method", "contract_type", "unit"]).then((res) => {
-    accountCurrency.value = res["account_currency"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    fundsPaymentMethod.value = res["funds_payment_method"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    tradeMethods.value = res["trade_mode"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    shippingMethod.value = res["shipping_method"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    contractType.value = res["contract_type"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    productUnit.value = res["unit"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
-
-  proxy.post("/contractTemplate/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    templateList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.templateName,
-        value: item.id,
-      };
-    });
-  });
-  proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    corporationList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.name,
-        value: item.id,
-      };
-    });
-  });
-  proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    accountList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.alias,
-        value: item.id,
-      };
-    });
-  });
-};
-getDict();
-const changeTemplate = (val) => {
-  formData.data.sellCorporationId = "";
-  formData.data.sellContactName = "";
-  formData.data.sellContactNumber = "";
-  formData.data.sellCountryName = "";
-  formData.data.sellProvinceName = "";
-  formData.data.sellCityName = "";
-  formData.data.sellAddress = "";
-  if (val) {
-    proxy.post("/contractTemplate/detail", { id: val }).then((res) => {
-      formData.data.sellCorporationId = res.corporationId;
-      if (res.corporationId) {
-        proxy.post("/corporation/detail", { id: res.corporationId }).then((detailCorporation) => {
-          if (detailCorporation.countryEnStr) {
-            formData.data.sellCountryName = detailCorporation.countryEnStr;
-          }
-          if (detailCorporation.provinceEnStr) {
-            formData.data.sellProvinceName = detailCorporation.provinceEnStr;
-          }
-          if (detailCorporation.cityEnStr) {
-            formData.data.sellCityName = detailCorporation.cityEnStr;
-          }
-          if (detailCorporation.addressEn) {
-            formData.data.sellAddress = detailCorporation.addressEn;
-          }
-          // proxy.post("/customizeArea/list", { parentId: "0" }).then((resCountry) => {
-          //   let sellCountryData = resCountry.filter((item) => item.id === detailCorporation.countryId);
-          //   if (sellCountryData && sellCountryData.length > 0) {
-          //     formData.data.sellCountryName = sellCountryData[0].chineseName;
-          //   } else {
-          //     formData.data.sellCountryName = "";
-          //   }
-          // });
-          // if (detailCorporation.countryId) {
-          //   proxy
-          //     .post("/customizeArea/list", {
-          //       parentId: detailCorporation.countryId,
-          //     })
-          //     .then((resProvince) => {
-          //       let sellProvinceData = resProvince.filter((item) => item.id === detailCorporation.provinceId);
-          //       if (sellProvinceData && sellProvinceData.length > 0) {
-          //         formData.data.sellProvinceName = sellProvinceData[0].name;
-          //       } else {
-          //         formData.data.sellProvinceName = "";
-          //       }
-          //     });
-          // } else {
-          //   formData.data.sellProvinceName = "";
-          // }
-          // if (detailCorporation.provinceId) {
-          //   proxy
-          //     .post("/customizeArea/list", {
-          //       parentId: detailCorporation.provinceId,
-          //     })
-          //     .then((resCity) => {
-          //       let sellCityData = resCity.filter((item) => item.id === detailCorporation.cityId);
-          //       if (sellCityData && sellCityData.length > 0) {
-          //         formData.data.sellCityName = sellCityData[0].name;
-          //       } else {
-          //         formData.data.sellCityName = "";
-          //       }
-          //     });
-          // } else {
-          //   formData.data.sellCityName = "";
-          // }
-          // formData.data.sellAddress = detailCorporation.address;
-        });
-      }
-      formData.data.sellContactName = res.contactName;
-      formData.data.sellContactNumber = res.contactNumber;
-    });
-  }
-};
-const getCityData = (id, type, isChange) => {
-  proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
-    if (type === "20") {
-      provinceData.value = res;
-      if (isChange) {
-        formData.data.provinceId = "";
-        formData.data.provinceName = "";
-        formData.data.cityId = "";
-        formData.data.cityName = "";
-      }
-    } else if (type === "30") {
-      cityData.value = res;
-      if (isChange) {
-        formData.data.cityId = "";
-        formData.data.cityName = "";
-      }
-    } else {
-      countryData.value = res;
-    }
-  });
-};
-getCityData("0");
-const changeCustomer = (val) => {
-  formData.data.buyContactName = "";
-  formData.data.buyContactNumber = "";
-  if (val) {
-    proxy.post("/customer/detail", { id: val }).then(
-      (res) => {
-        if (res.customerUserList && res.customerUserList.length > 0) {
-          formData.data.buyContactName = res.customerUserList[0].name;
-          if (res.customerUserList[0].contactJson) {
-            let contactJson = JSON.parse(res.customerUserList[0].contactJson);
-            if (contactJson && contactJson.length > 0) {
-              formData.data.buyContactNumber = contactJson[0].contactNo;
-            }
-          }
-          customerUserList.value = res.customerUserList.map((item) => {
-            return {
-              ...item,
-              value: item.name,
-            };
-          });
-        }
-        formData.data.countryId = res.countryId;
-        formData.data.provinceId = res.provinceId;
-        formData.data.cityId = res.cityId;
-        formData.data.buyPostalCode = res.zipCode;
-        formData.data.buyAddress = res.address;
-        getCityData(formData.data.countryId, "20");
-        if (formData.data.provinceId) {
-          getCityData(formData.data.provinceId, "30");
-        }
-      },
-      (err) => {
-        console.log(err);
-        formData.data.countryId = "";
-        formData.data.provinceId = "";
-        formData.data.cityId = "";
-        formData.data.buyPostalCode = "";
-        formData.data.buyAddress = "";
-      }
-    );
-  } else {
-    formData.data.countryId = "";
-    formData.data.provinceId = "";
-    formData.data.cityId = "";
-    formData.data.buyPostalCode = "";
-    formData.data.buyAddress = "";
-  }
-  getDecisionAids();
-};
-let auxiliaryData = ref([
-  {
-    label: "最近合同",
-    data: [],
-  },
-  {
-    label: "产品价格",
-    data: [],
-  },
-]);
-const emit = defineEmits(["auxiliaryChange"]);
-const getDecisionAids = () => {
-  let data = {
-    buyCorporationId: formData.data.buyCorporationId,
-    productIdList: [],
-  };
-  if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
-    data.productIdList = formData.data.contractProductList.map((item) => item.productId);
-  }
-  proxy.post("/contract/decisionAid", data).then((res) => {
-    if (res.lastContractList && res.lastContractList.length > 0) {
-      auxiliaryData.value[0].data = res.lastContractList.map((item) => {
-        return [
-          {
-            label: "合同编号",
-            value: item.code,
-            style: {
-              color: "#0084FF",
-            },
-            id: item.id,
-            num: 1,
-            // fn: () => {},
-          },
-          {
-            label: "下单日期",
-            value: item.createTime,
-            id: item.id,
-            num: 1,
-          },
-          {
-            label: "合同金额",
-            value: item.currency + item.amount,
-            id: item.id,
-            num: 1,
-          },
-        ];
-      });
-    } else {
-      auxiliaryData.value[0].data = [];
-    }
-    if (res.productPriceList && res.productPriceList.length > 0) {
-      auxiliaryData.value[1].data = res.productPriceList.map((item) => {
-        return [
-          {
-            label: "产品名称",
-            value: item.name,
-            id: item.id,
-            num: 1,
-          },
-          {
-            label: "最近价格",
-            value: item.lastPrice,
-            id: item.id,
-            num: 1,
-          },
-          {
-            label: "历史最高",
-            value: item.maxPrice,
-            id: item.id,
-            num: 1,
-          },
-          {
-            label: "历史最低",
-            value: item.minPrice,
-            id: item.id,
-            num: 1,
-          },
-        ];
-      });
-    } else {
-      auxiliaryData.value[1].data = [];
-    }
-    emit("auxiliaryChange", auxiliaryData.value);
-  });
-};
-const createFilter = (queryString) => {
-  return (restaurant) => {
-    return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
-  };
-};
-const querySearchPerson = (queryString, callback) => {
-  const results = queryString ? customerUserList.value.filter(createFilter(queryString)) : customerUserList.value;
-  callback(results);
-};
-const handlePerson = (item) => {
-  if (item.contactJson) {
-    let contactJson = JSON.parse(item.contactJson);
-    if (contactJson && contactJson.length > 0) {
-      formData.data.buyContactNumber = contactJson[0].contactNo;
-    } else {
-      formData.data.buyContactNumber = "";
-    }
-  }
-};
-const pushGoods = (goods) => {
-  if (goods && goods.length > 0) {
-    let afterFiltering = [];
-    if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
-      afterFiltering = goods.filter((item) => {
-        let data = formData.data.contractProductList.filter((itemProduct) => itemProduct.productId === item.id);
-        if (data && data.length > 0) {
-          return false;
-        }
-        return true;
-      });
-    } else {
-      afterFiltering = goods;
-    }
-    formData.data.contractProductList = formData.data.contractProductList.concat(
-      afterFiltering.map((item) => {
-        let fileUrl = "";
-        if (item.fileList && item.fileList.length > 0) {
-          fileUrl = item.fileList[0].fileUrl;
-        }
-        let name = item.name;
-        if (item.standardJson) {
-          let standardJson = JSON.parse(item.standardJson);
-          if (standardJson && standardJson.englishName) {
-            name = standardJson.englishName;
-          }
-        }
-        return {
-          fileUrl: fileUrl,
-          code: item.code,
-          productId: item.id,
-          name: item.name,
-          productName: name,
-          productModel: item.spec,
-          unit: item.unit,
-          quantity: undefined,
-          price: undefined,
-          amount: "",
-          remark: "",
-          fileList: [],
-        };
-      })
-    );
-    formData.data.contractShipmentList = formData.data.contractShipmentList.concat(
-      afterFiltering.map((item) => {
-        return {
-          code: item.code,
-          productId: item.id,
-          productName: item.name,
-          shipmentTime: "",
-          quantity: undefined,
-        };
-      })
-    );
-    ElMessage({
-      message: "添加成功!",
-      type: "success",
-    });
-    openProduct.value = false;
-    getDecisionAids();
-  } else {
-    ElMessage("请选择至少一件商品");
-  }
-};
-const onPicture = (path) => {
-  window.open(path, "_blank");
-};
-const productRow = reactive({
-  data: {
-    productName: "",
-    productModel: "",
-    remark: "",
-  },
-});
-const productIndex = ref(0);
-const openHandover = ref(false);
-const fileList = ref([]);
-const uploadData = ref({});
-const formHandoverConfig = computed(() => {
-  return [
-    {
-      type: "title",
-      title: "产品信息",
-      label: "",
-    },
-    {
-      type: "input",
-      prop: "productName",
-      label: "产品名称",
-      itemType: "text",
-      disabled: true,
-    },
-    {
-      type: "input",
-      prop: "productModel",
-      label: "规格型号",
-      itemType: "text",
-      disabled: true,
-    },
-    {
-      type: "slot",
-      slotName: "remark",
-      label: "交接单",
-    },
-    {
-      type: "slot",
-      prop: "file",
-      slotName: "file",
-      label: "上传附件",
-    },
-  ];
-});
-const handleHandover = (row, index) => {
-  productRow.data = {
-    productName: row.productName,
-    productModel: row.productModel,
-    remark: row.remark,
-  };
-  if (row.fileList && row.fileList.length > 0) {
-    fileList.value = row.fileList.map((item) => {
-      return {
-        raw: item,
-        name: item.fileName,
-        url: item.fileUrl,
-      };
-    });
-  } else {
-    fileList.value = [];
-  }
-  productIndex.value = index;
-  openHandover.value = true;
-};
-const updateContent = (val) => {
-  productRow.data.remark = val;
-};
-const changeActiveName = () => {
-  if (activeName.value) {
-    activeName.value = "";
-  } else {
-    activeName.value = "1";
-  }
-};
-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;
-  file.uploadState = true;
-  return true;
-};
-const handleSuccess = (any, UploadFile) => {
-  UploadFile.raw.uploadState = false;
-};
-const onPreviewFile = (file) => {
-  window.open(file.raw.fileUrl, "_blank");
-};
-const submitHandoverForm = () => {
-  if (fileList.value && fileList.value.length > 0) {
-    for (let i = 0; i < fileList.value.length; i++) {
-      if (fileList.value[i].raw.uploadState) {
-        ElMessage("文件上传中,请稍后提交");
-        return;
-      }
-    }
-    formData.data.contractProductList[productIndex.value].fileList = fileList.value.map((item) => {
-      return {
-        id: item.raw.id,
-        fileName: item.raw.fileName,
-        fileUrl: item.raw.fileUrl,
-        uploadState: item.raw.uploadState,
-      };
-    });
-  } else {
-    formData.data.contractProductList[productIndex.value].fileList = [];
-  }
-  formData.data.contractProductList[productIndex.value].remark = productRow.data.remark;
-  openHandover.value = false;
-};
-const handleRemove = async (index, row) => {
-  formData.data.contractShipmentList = formData.data.contractShipmentList.filter((item) => item.productId !== row.productId);
-  await formData.data.contractProductList.splice(index, 1);
-  totalAmount();
-  getDecisionAids();
-};
-const calculationAmount = (listLabel, index, label) => {
-  if (formData.data[listLabel][index][label]) {
-    formData.data[listLabel][index][label] = Number(Math.round(Number(formData.data[listLabel][index][label]) * 10000) / 10000);
-  }
-  nextTick(() => {
-    if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
-      for (let i = 0; i < formData.data.contractProductList.length; i++) {
-        let money = 0;
-        if (formData.data.contractProductList[i].quantity && formData.data.contractProductList[i].price) {
-          money = Number(
-            Math.round(Number(formData.data.contractProductList[i].quantity) * Number(formData.data.contractProductList[i].price) * 10000) / 10000
-          );
-        }
-        formData.data.contractProductList[i].amount = money;
-      }
-    }
-    nextTick(() => {
-      totalAmount();
-    });
-  });
-};
-const totalAmount = (listLabel, index, label) => {
-  if (listLabel && formData.data[listLabel][index][label]) {
-    formData.data[listLabel][index][label] = Number(Math.round(Number(formData.data[listLabel][index][label]) * 10000) / 10000);
-  }
-  let money = 0;
-  if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
-    for (let i = 0; i < formData.data.contractProductList.length; i++) {
-      if (formData.data.contractProductList[i].amount) {
-        money = Number(Math.round((Number(money) + Number(formData.data.contractProductList[i].amount)) * 10000) / 10000);
-      }
-    }
-  }
-  if (formData.data.contractProjectList && formData.data.contractProjectList.length > 0) {
-    for (let i = 0; i < formData.data.contractProjectList.length; i++) {
-      if (formData.data.contractProjectList[i].amount) {
-        money = Number(Math.round((Number(money) + Number(formData.data.contractProjectList[i].amount)) * 10000) / 10000);
-      }
-    }
-  }
-  formData.data.amount = money;
-};
-const clickAdd = () => {
-  if (formData.data.contractProjectList && formData.data.contractProjectList.length > 0) {
-    formData.data.contractProjectList.push({
-      payName: "",
-      amount: undefined,
-      remark: "",
-    });
-  } else {
-    formData.data.contractProjectList = [{ payName: "", amount: undefined, remark: "" }];
-  }
-};
-const handleDelete = async (index) => {
-  await formData.data.contractProjectList.splice(index, 1);
-  totalAmount();
-};
-const querySearch = (queryString, callback) => {
-  proxy.post("/quotationPay/page", { payName: queryString }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      res.rows = res.rows.map((item) => {
-        return {
-          ...item,
-          value: item.payName,
-        };
-      });
-      callback(res.rows);
-    } else {
-      callback([]);
-    }
-  });
-};
-const clickSplit = (item) => {
-  formData.data.contractShipmentList.push({
-    code: item.code,
-    productId: item.productId,
-    productName: item.productName,
-    shipmentTime: "",
-    quantity: undefined,
-  });
-};
-const clickDelete = (index) => {
-  formData.data.contractShipmentList.splice(index, 1);
-};
-
-const handleSubmit = async () => {
-  let status = await submit.value.handleSubmit(() => {});
-  if (status) {
-    if (!(formData.data.contractProductList && formData.data.contractProductList.length > 0)) {
-      ElMessage("请添加至少一件商品");
-      return false;
-    }
-    if (formData.data.contractShipmentList && formData.data.contractShipmentList.length > 0) {
-      for (let i = 0; i < formData.data.contractProductList.length; i++) {
-        let data = formData.data.contractShipmentList.filter((item) => item.productId === formData.data.contractProductList[i].productId);
-        if (data && data.length > 0) {
-          let quantity = 0;
-          for (let j = 0; j < data.length; j++) {
-            quantity = parseFloat(Number(quantity) + Number(data[j].quantity));
-          }
-          if (quantity > formData.data.contractProductList[i].quantity) {
-            ElMessage("出货数量不能大于商品数量");
-            return false;
-          }
-        }
-      }
-    }
-    return true;
-  } else {
-    setTimeout(() => {
-      const errorDiv = document.getElementsByClassName("is-error");
-      errorDiv[0].scrollIntoView();
-    }, 0);
-  }
-  return false;
-};
-const getFormData = () => {
-  return proxy.deepClone(formData.data);
-};
-// 向父组件暴露
-defineExpose({
-  getFormData,
-  handleSubmit,
-});
-const changeShroffAccount = (val) => {
-  if (val) {
-    let data = accountList.value.filter((item) => item.value === val);
-    if (data && data.length > 0) {
-      formData.data.beneficiaryName = data[0].beneficiaryName;
-      formData.data.beneficiaryBank = data[0].beneficiaryBank;
-      formData.data.beneficiaryBankAddress = data[0].beneficiaryBankAddress;
-      formData.data.beneficiaryAccountNumber = data[0].beneficiaryAccountNumber;
-      formData.data.swiftCode = data[0].swiftCode;
-      formData.data.beneficiaryAddress = data[0].beneficiaryAddress;
-    }
-  }
-};
-watch(
-  props.queryData,
-  () => {
-    formOption.disabled = judgeStatus();
-    if (props.queryData && ["10", "20", "30"].includes(route.query.processType)) {
-      for (var text in props.queryData) {
-        formData.data[text] = props.queryData[text];
-      }
-      if (formData.data.countryId) {
-        getCityData(formData.data.countryId, "20");
-      }
-      if (formData.data.provinceId) {
-        getCityData(formData.data.provinceId, "30");
-      }
-      getDecisionAids();
-    }
-  },
-  {
-    deep: true,
-  }
-);
-const acquireSelectList = () => {
-  let data = [];
-  if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
-    data = formData.data.contractProductList.map((item) => {
-      return {
-        id: item.productId,
-        name: item.name,
-      };
-    });
-  }
-  return data;
-};
-onMounted(() => {
-  if (!route.query.processType || route.query.processType == 30) {
-    proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 }).then((res) => {
-      customerList.value = res.rows.map((item) => {
-        return {
-          ...item,
-          label: item.name,
-          value: item.id,
-        };
-      });
-    });
-  } else {
-    proxy.post("/customer/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-      customerList.value = res.rows.map((item) => {
-        return {
-          ...item,
-          label: item.name,
-          value: item.id,
-        };
-      });
-    });
-  }
-  if (props.queryData.priceSheetId) {
-    proxy.post("/saleQuotation/detail", { id: props.queryData.priceSheetId }).then((res) => {
-      res.countryId = res.buyCountryId;
-      res.provinceId = res.buyProvinceId;
-      res.cityId = res.buyCityId;
-      for (var text in res) {
-        formData.data[text] = res[text];
-      }
-      if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
-        formData.data.contractProductList = formData.data.quotationProductList.map((item) => {
-          delete item.id;
-          return {
-            ...item,
-          };
-        });
-        formData.data.contractShipmentList = proxy.deepClone(
-          formData.data.contractProductList.map((item) => {
-            return {
-              ...item,
-              quantity: undefined,
-            };
-          })
-        );
-        for (let i = 0; i < formData.data.contractProductList.length; i++) {
-          proxy.post("/productInfo/detail", { id: formData.data.contractProductList[i].productId }).then((resProduct) => {
-            let name = resProduct.name;
-            if (resProduct.standardJson) {
-              let standardJson = JSON.parse(resProduct.standardJson);
-              if (standardJson && standardJson.englishName) {
-                name = standardJson.englishName;
-              }
-            }
-            formData.data.contractProductList[i].name = resProduct.name;
-            formData.data.contractProductList[i].productName = name;
-            formData.data.contractProductList[i].code = resProduct.code;
-            formData.data.contractProductList[i].unit = resProduct.unit;
-            formData.data.contractShipmentList[i].code = resProduct.code;
-          });
-        }
-      }
-      delete formData.data.id;
-      delete formData.data.code;
-      getCityData(formData.data.countryId, "20");
-      if (formData.data.provinceId) {
-        getCityData(formData.data.provinceId, "30");
-      }
-      if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
-        formData.data.contractProjectList = formData.data.quotationPayList.map((item) => {
-          delete item.id;
-          return {
-            ...item,
-          };
-        });
-      }
-    });
-  }
-});
-</script>
-
-<style lang="scss" scoped>
-::v-deep(.el-input-number .el-input__inner) {
-  text-align: left;
-}
-.pic {
-  object-fit: contain;
-  width: 50px;
-  height: 50px;
-  cursor: pointer;
-  vertical-align: middle;
-}
-.shrinkPadding {
-  padding-right: 0 !important;
-}
-.hideCollapse {
-  margin-top: -62px;
-  border: 0 !important;
-}
-::v-deep(.el-collapse-item__arrow) {
-  display: none !important;
-}
-::v-deep(.el-collapse-item__wrap) {
-  border: 0 !important;
-}
-::v-deep(.el-collapse-item__header) {
-  border: 0 !important;
-}
-</style>

+ 0 - 1388
src/components/process/ContractAlteration.vue

@@ -1,1388 +0,0 @@
-<template>
-  <div style="width: 100%; padding: 0px 15px">
-    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
-      <template #seller>
-        <div style="width: 100%">
-          <el-form-item prop="sellCorporationId">
-            <el-select v-model="formData.data.sellCorporationId" style="width: 100%" disabled>
-              <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
-            </el-select>
-          </el-form-item>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="8">
-              <el-form-item label="地址" prop="sellCountryName">
-                <el-input v-model="formData.data.sellCountryName" placeholder="请输入国家" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label=" " prop="sellProvinceName">
-                <el-input v-model="formData.data.sellProvinceName" placeholder="请输入省/州" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label=" " prop="sellCityName">
-                <el-input v-model="formData.data.sellCityName" placeholder="请输入城市" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="24">
-              <el-form-item prop="sellAddress">
-                <el-input v-model="formData.data.sellAddress" type="textarea"> </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="8">
-              <el-form-item label="联系人" prop="sellContactName">
-                <el-input v-model="formData.data.sellContactName" placeholder="请输入联系人" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="16">
-              <el-form-item label=" " prop="sellContactNumber">
-                <el-input v-model="formData.data.sellContactNumber" placeholder="请输入联系人电话" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </div>
-      </template>
-      <template #buyer>
-        <div style="width: 100%">
-          <div style="width: 100%">
-            <el-form-item prop="buyCorporationId">
-              <el-select v-model="formData.data.buyCorporationId" filterable style="width: 100%" @change="changeCustomer">
-                <el-option v-for="item in customerList" :key="item.value" :label="item.label" :value="item.value" />
-              </el-select>
-            </el-form-item>
-            <el-row style="margin-top: 20px; width: 100%">
-              <el-col :span="6">
-                <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
-                    <el-option v-for="item in countryData" :label="formData.data.contractType == '2' ? item.chineseName : item.name" :value="item.id">
-                    </el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label=" " prop="provinceName">
-                  <selectCity
-                    placeholder="省/洲"
-                    @change="(val) => getCityData(val, '30', true)"
-                    addressId="provinceId"
-                    addressName="provinceName"
-                    v-model="formData.data"
-                    :data="provinceData">
-                  </selectCity>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label=" " prop="cityName">
-                  <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData"> </selectCity>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label=" " prop="buyPostalCode">
-                  <el-input v-model="formData.data.buyPostalCode" placeholder="请输入邮编" />
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row style="margin-top: 20px; width: 100%">
-              <el-col :span="24">
-                <el-form-item prop="buyAddress">
-                  <el-input v-model="formData.data.buyAddress" type="textarea"> </el-input>
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row style="margin-top: 20px; width: 100%">
-              <el-col :span="8">
-                <el-form-item label="联系人" prop="buyContactName">
-                  <el-autocomplete
-                    v-model="formData.data.buyContactName"
-                    :fetch-suggestions="querySearchPerson"
-                    clearable
-                    class="inline-input w-50"
-                    placeholder="请输入联系人"
-                    @select="handlePerson">
-                  </el-autocomplete>
-                </el-form-item>
-              </el-col>
-              <el-col :span="16">
-                <el-form-item label=" " prop="buyContactNumber">
-                  <el-input v-model="formData.data.buyContactNumber" placeholder="请输入联系人电话" />
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </div>
-        </div>
-      </template>
-      <template #commodity>
-        <div style="width: 100%">
-          <el-button @click="openProduct = true">添加商品</el-button>
-          <el-table :data="formData.data.contractProductList" style="width: 100%; margin-top: 16px">
-            <el-table-column label="商品图片" width="80">
-              <template #default="{ row }">
-                <div v-if="row.fileUrl">
-                  <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
-                </div>
-                <div v-else></div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="productCode" label="商品编码" width="120" />
-            <el-table-column prop="productCnName" label="商品中文名" width="160" />
-            <el-table-column label="商品英文名" min-width="200">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'contractProductList.' + $index + '.productName'" :rules="rules.productName" :inline-message="true">
-                    <el-input v-model="row.productName" placeholder="请输入商品英文名" />
-                  </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="'contractProductList.' + $index + '.productModel'" :inline-message="true">
-                    <el-input v-model="row.productModel" placeholder="请输入规格型号" />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column label="单位" width="100" :formatter="(row) => dictValueLabel(row.productUnit, productUnit)" />
-            <el-table-column label="数量" width="160">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'contractProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.quantity"
-                      placeholder="请输入数量"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
-                        () => {
-                          return calculationAmount('contractProductList', $index, 'quantity');
-                        }
-                      " />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column label="单价" width="160">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'contractProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.price"
-                      placeholder="请输入单价"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
-                        () => {
-                          return calculationAmount('contractProductList', $index, 'price');
-                        }
-                      " />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="amount" label="金额" width="100" />
-            <el-table-column align="center" label="操作" width="120" fixed="right">
-              <template #default="{ row, $index }">
-                <el-button type="primary" link @click="handleHandover(row, $index)">交接单</el-button>
-                <el-button type="primary" link @click="handleRemove($index, row)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </template>
-      <template #otherCharge>
-        <div style="width: 100%">
-          <el-button type="primary" @click="clickAdd()">添加行</el-button>
-          <el-table :data="formData.data.contractProjectList" style="width: 100%; margin-top: 16px">
-            <el-table-column label="收费项目" width="220">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'contractProjectList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true">
-                    <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50" placeholder="请输入收费项目" />
-                  </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="'contractProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.amount"
-                      placeholder="请输入金额"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
-                        () => {
-                          return totalAmount('contractProjectList', $index, 'amount');
-                        }
-                      " />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column label="备注">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'contractProjectList.' + $index + '.remark'">
-                    <el-input v-model="row.remark" placeholder="请输入备注" />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="操作" width="80" fixed="right">
-              <template #default="{ row, $index }">
-                <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </template>
-      <template #offerMoney>
-        <div style="width: 100%">
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="4">
-              <el-form-item label="币种" prop="currency">
-                <el-select v-model="formData.data.currency" placeholder="请选择币种" style="width: 100%">
-                  <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="合同总金额" prop="amount">
-                <el-input v-model="formData.data.amount" placeholder="合同总金额" disabled />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="7">
-              <el-form-item label="付款方式" prop="paymentMethod">
-                <el-select v-model="formData.data.paymentMethod" placeholder="请选择付款方式" style="width: 100%">
-                  <el-option v-for="item in fundsPaymentMethod" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="7">
-              <el-form-item label="预付比例 (%)" prop="advanceRatio">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.advanceRatio"
-                  placeholder="请输入预付比例"
-                  style="width: 100%"
-                  :precision="2"
-                  :controls="false"
-                  :min="0"
-                  :max="100" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="7">
-              <el-form-item label="收款账号" prop="shroffAccountId">
-                <el-select v-model="formData.data.shroffAccountId" placeholder="请选择收款账号" style="width: 100%" @change="changeShroffAccount">
-                  <el-option v-for="item in accountList" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="3">
-              <el-form-item label="  ">
-                <el-button type="primary" @click="changeActiveName" text>
-                  <span v-if="activeName == '1'">收起</span>
-                  <span v-else>展开</span>
-                </el-button>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <div style="width: 100%; margin-top: 34px">
-            <el-collapse v-model="activeName" class="hideCollapse" accordion>
-              <el-collapse-item title="" name="1">
-                <el-row style="width: 100%">
-                  <el-col :span="9">
-                    <el-form-item label="Beneficiary Name" prop="beneficiaryName">
-                      <el-input v-model="formData.data.beneficiaryName" placeholder="请输入Beneficiary Name" />
-                    </el-form-item>
-                    <div style="height: 20px"></div>
-                    <el-form-item label="Beneficiary Bank" prop="beneficiaryBank">
-                      <el-input v-model="formData.data.beneficiaryBank" placeholder="请输入Beneficiary Bank" />
-                    </el-form-item>
-                    <div style="height: 20px"></div>
-                    <el-form-item label="Beneficiary Bank Address" prop="beneficiaryBankAddress">
-                      <el-input v-model="formData.data.beneficiaryBankAddress" placeholder="请输入Beneficiary Bank Address" />
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="9">
-                    <el-form-item label="Beneficiary Account Number" prop="beneficiaryAccountNumber">
-                      <el-input v-model="formData.data.beneficiaryAccountNumber" placeholder="请输入Beneficiary Account Number" />
-                    </el-form-item>
-                    <div style="height: 20px"></div>
-                    <el-form-item label="Swift Code" prop="swiftCode">
-                      <el-input v-model="formData.data.swiftCode" placeholder="请输入Swift Code" />
-                    </el-form-item>
-                    <div style="height: 20px"></div>
-                    <el-form-item label="Beneficiary Address" prop="beneficiaryAddress">
-                      <el-input v-model="formData.data.beneficiaryAddress" placeholder="请输入Beneficiary Address" />
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-collapse-item>
-            </el-collapse>
-          </div>
-        </div>
-      </template>
-      <template #delivery>
-        <div style="width: 100%">
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="7">
-              <el-form-item label="贸易方式" prop="tradeMethods">
-                <el-select v-model="formData.data.tradeMethods" placeholder="请选择贸易方式" style="width: 100%">
-                  <el-option v-for="item in tradeMethods" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="7">
-              <el-form-item label="运输方式" prop="transportMethod">
-                <el-select v-model="formData.data.transportMethod" placeholder="请选择运输方式" style="width: 100%">
-                  <el-option v-for="item in shippingMethod" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="7">
-              <el-form-item label="运输说明" prop="transportRemark">
-                <el-input v-model="formData.data.transportRemark" placeholder="请输入运输说明" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="14">
-              <el-form-item label="付款条件" prop="remark">
-                <el-input v-model="formData.data.remark" :rows="2" type="textarea" placeholder="请输入付款条件" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="7">
-              <el-form-item label="交货期限 (天)" prop="deliveryTime">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.deliveryTime"
-                  placeholder="请输入交货期限"
-                  style="width: 100%"
-                  :precision="0"
-                  :controls="false"
-                  :min="0" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="7">
-              <el-form-item label="质保期 (天)" prop="warranty">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.warranty"
-                  placeholder="请输入质保期"
-                  style="width: 100%"
-                  :precision="0"
-                  :controls="false"
-                  :min="0" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </div>
-      </template>
-      <template #shipment>
-        <div style="width: 100%">
-          <el-table :data="formData.data.contractShipmentList" style="width: 100%; margin-top: 16px">
-            <el-table-column prop="productCode" label="商品编码" width="120" />
-            <el-table-column prop="productCnName" label="商品名称" />
-            <el-table-column label="出货日期" width="220">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'contractShipmentList.' + $index + '.shipmentTime'" :rules="rules.shipmentTime" :inline-message="true">
-                    <el-date-picker v-model="row.shipmentTime" type="date" placeholder="请选择出货日期" value-format="YYYY-MM-DD" />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column label="数量" width="160">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'contractShipmentList.' + $index + '.quantity'" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.quantity"
-                      placeholder="请输入数量"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
-                        () => {
-                          return calculationAmount('contractShipmentList', $index, 'quantity');
-                        }
-                      " />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="操作" width="120" fixed="right">
-              <template #default="{ row, $index }">
-                <el-button type="primary" link @click="clickSplit(row)">拆分</el-button>
-                <el-button type="primary" link @click="clickDelete($index)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </template>
-    </byForm>
-
-    <el-dialog v-if="openProduct" v-model="openProduct" title="选择商品" width="70%" append-to-body>
-      <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
-    </el-dialog>
-
-    <el-dialog title="交接单" v-if="openHandover" v-model="openHandover" width="800">
-      <byForm :formConfig="formHandoverConfig" :formOption="formOption" v-model="productRow.data">
-        <template #remark>
-          <div style="width: 100%">
-            <Editor :value="productRow.data.remark" @updateValue="updateContent" />
-          </div>
-        </template>
-        <template #file>
-          <div style="width: 100%">
-            <el-upload
-              v-model:fileList="fileList"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              multiple
-              :before-upload="uploadFile"
-              :on-success="handleSuccess"
-              :on-preview="onPreviewFile">
-              <el-button>选择</el-button>
-            </el-upload>
-          </div>
-        </template>
-      </byForm>
-      <template #footer>
-        <el-button @click="openHandover = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitHandoverForm()" size="large">确 定</el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-
-<script setup>
-import byForm from "@/components/byForm/index";
-import SelectGoods from "@/components/product/SelectGoods";
-import { ElMessage } from "element-plus";
-import Editor from "@/components/Editor/index.vue";
-import selectCity from "@/components/selectCity/index.vue";
-import { useRoute } from "vue-router";
-
-const route = useRoute();
-// 接收父组件的传值
-const props = defineProps({
-  queryData: String,
-});
-const { proxy } = getCurrentInstance();
-const contractType = ref([]);
-const accountCurrency = ref([]);
-const fundsPaymentMethod = ref([]);
-const tradeMethods = ref([]);
-const shippingMethod = ref([]);
-const templateList = ref([]);
-const corporationList = ref([]);
-const customerList = ref([]);
-const countryData = ref([]);
-const provinceData = ref([]);
-const cityData = ref([]);
-const customerUserList = ref([]);
-const accountList = ref([]);
-const productUnit = ref([]);
-const openProduct = ref(false);
-const activeName = ref("");
-const formData = reactive({
-  data: {
-    contractType: "1",
-    amount: undefined,
-    contractProductList: [],
-    contractProjectList: [],
-    contractShipmentList: [],
-  },
-});
-const submit = ref(null);
-const judgeStatus = () => {
-  if (route.query.processType == 20 || route.query.processType == 10) {
-    return true;
-  }
-  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
-    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
-    if (data && data.length > 0) {
-      return true;
-    }
-  }
-  return false;
-};
-const formOption = reactive({
-  inline: true,
-  labelWidth: 100,
-  itemWidth: 100,
-  rules: [],
-  disabled: false,
-});
-const formConfig = computed(() => {
-  return [
-    {
-      type: "title",
-      title: "合同模板",
-      label: "",
-    },
-    {
-      type: "select",
-      label: "合同类型",
-      prop: "contractType",
-      data: contractType.value,
-      itemWidth: 25,
-    },
-    {
-      type: "select",
-      label: "选择合同模板",
-      prop: "contractTemplateId",
-      data: templateList.value,
-      fn: (val) => {
-        changeTemplate(val);
-      },
-      itemWidth: 26,
-    },
-    {
-      type: "slot",
-      slotName: "seller",
-      label: "卖方信息",
-      itemWidth: 50,
-    },
-    {
-      type: "slot",
-      slotName: "buyer",
-      label: "买方信息",
-      itemWidth: 50,
-    },
-    {
-      type: "slot",
-      slotName: "commodity",
-      label: "商品信息",
-    },
-    {
-      type: "slot",
-      slotName: "otherCharge",
-      label: "其他收费项目",
-    },
-    {
-      type: "slot",
-      slotName: "offerMoney",
-      label: "收款信息",
-    },
-    {
-      type: "slot",
-      slotName: "delivery",
-      label: "交付信息",
-    },
-    {
-      type: "slot",
-      slotName: "shipment",
-      label: "出货计划",
-    },
-  ];
-});
-const rules = ref({
-  contractType: [{ required: true, message: "请选择合同类型", trigger: "change" }],
-  contractTemplateId: [{ required: true, message: "请选择合同模板", trigger: "change" }],
-  buyCorporationId: [{ required: true, message: "请选择公司", trigger: "change" }],
-  countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
-  sellAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
-  buyAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
-  buyContactName: [{ required: true, message: "请输入联系人", trigger: ["change", "blur"] }],
-  buyContactNumber: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
-  productName: [{ required: true, message: "请输入商品英文名", trigger: "blur" }],
-  productModel: [{ required: true, message: "请输入规格型号", trigger: "blur" }],
-  quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
-  price: [{ required: true, message: "请输入单价", trigger: "blur" }],
-  amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
-  payName: [{ required: true, message: "请输入收费项目", trigger: ["change", "blur"] }],
-  currency: [{ required: true, message: "请选择币种", trigger: "change" }],
-  effective: [{ required: true, message: "请输入报价有效期", trigger: "blur" }],
-  deliveryTime: [{ required: true, message: "请选择交货期限", trigger: "blur" }],
-  paymentMethod: [{ required: true, message: "请选择付款方式", trigger: "change" }],
-  advanceRatio: [{ required: true, message: "请输入预付比例", trigger: "blur" }],
-  shroffAccountId: [{ required: true, message: "请选择收款账号", trigger: "change" }],
-  tradeMethods: [{ required: true, message: "请选择贸易方式", trigger: "change" }],
-  transportMethod: [{ required: true, message: "请选择运输方式", trigger: "change" }],
-  transportRemark: [{ required: true, message: "请输入运输说明", trigger: "blur" }],
-  remark: [{ required: true, message: "请输入付款条件", trigger: "blur" }],
-});
-const getDict = () => {
-  proxy.getDictOne(["account_currency", "funds_payment_method", "trade_mode", "shipping_method", "contract_type", "unit"]).then((res) => {
-    accountCurrency.value = res["account_currency"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    fundsPaymentMethod.value = res["funds_payment_method"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    tradeMethods.value = res["trade_mode"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    shippingMethod.value = res["shipping_method"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    contractType.value = res["contract_type"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    productUnit.value = res["unit"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
-  proxy.post("/contractTemplate/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    templateList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.templateName,
-        value: item.id,
-      };
-    });
-  });
-  proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    corporationList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.name,
-        value: item.id,
-      };
-    });
-  });
-  proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 }).then((res) => {
-    customerList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.name,
-        value: item.id,
-      };
-    });
-  });
-  proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    accountList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.alias,
-        value: item.id,
-      };
-    });
-  });
-};
-getDict();
-const changeTemplate = (val) => {
-  formData.data.sellCorporationId = "";
-  formData.data.sellContactName = "";
-  formData.data.sellContactNumber = "";
-  formData.data.sellCountryName = "";
-  formData.data.sellProvinceName = "";
-  formData.data.sellCityName = "";
-  formData.data.sellAddress = "";
-  if (val) {
-    proxy.post("/contractTemplate/detail", { id: val }).then((res) => {
-      formData.data.sellCorporationId = res.corporationId;
-      if (res.corporationId) {
-        proxy.post("/corporation/detail", { id: res.corporationId }).then((detailCorporation) => {
-          if (detailCorporation.countryEnStr) {
-            formData.data.sellCountryName = detailCorporation.countryEnStr;
-          }
-          if (detailCorporation.provinceEnStr) {
-            formData.data.sellProvinceName = detailCorporation.provinceEnStr;
-          }
-          if (detailCorporation.cityEnStr) {
-            formData.data.sellCityName = detailCorporation.cityEnStr;
-          }
-          if (detailCorporation.addressEn) {
-            formData.data.sellAddress = detailCorporation.addressEn;
-          }
-        });
-      }
-      formData.data.sellContactName = res.contactName;
-      formData.data.sellContactNumber = res.contactNumber;
-    });
-  }
-};
-const getCityData = (id, type, isChange) => {
-  proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
-    if (type === "20") {
-      provinceData.value = res;
-      if (isChange) {
-        formData.data.provinceId = "";
-        formData.data.provinceName = "";
-        formData.data.cityId = "";
-        formData.data.cityName = "";
-      }
-    } else if (type === "30") {
-      cityData.value = res;
-      if (isChange) {
-        formData.data.cityId = "";
-        formData.data.cityName = "";
-      }
-    } else {
-      countryData.value = res;
-    }
-  });
-};
-getCityData("0");
-const changeCustomer = (val) => {
-  formData.data.buyContactName = "";
-  formData.data.buyContactNumber = "";
-  if (val) {
-    proxy.post("/customer/detail", { id: val }).then(
-      (res) => {
-        if (res.customerUserList && res.customerUserList.length > 0) {
-          formData.data.buyContactName = res.customerUserList[0].name;
-          if (res.customerUserList[0].contactJson) {
-            let contactJson = JSON.parse(res.customerUserList[0].contactJson);
-            if (contactJson && contactJson.length > 0) {
-              formData.data.buyContactNumber = contactJson[0].contactNo;
-            }
-          }
-          customerUserList.value = res.customerUserList.map((item) => {
-            return {
-              ...item,
-              value: item.name,
-            };
-          });
-        }
-        formData.data.countryId = res.countryId;
-        formData.data.provinceId = res.provinceId;
-        formData.data.cityId = res.cityId;
-        formData.data.buyPostalCode = res.zipCode;
-        formData.data.buyAddress = res.address;
-        getCityData(formData.data.countryId, "20");
-        if (formData.data.provinceId) {
-          getCityData(formData.data.provinceId, "30");
-        }
-      },
-      (err) => {
-        console.log(err);
-        formData.data.countryId = "";
-        formData.data.provinceId = "";
-        formData.data.cityId = "";
-        formData.data.buyPostalCode = "";
-        formData.data.buyAddress = "";
-      }
-    );
-  } else {
-    formData.data.countryId = "";
-    formData.data.provinceId = "";
-    formData.data.cityId = "";
-    formData.data.buyPostalCode = "";
-    formData.data.buyAddress = "";
-  }
-  getDecisionAids();
-};
-let auxiliaryData = ref([
-  {
-    label: "最近合同",
-    data: [],
-  },
-  {
-    label: "产品价格",
-    data: [],
-  },
-]);
-const emit = defineEmits(["auxiliaryChange"]);
-const getDecisionAids = () => {
-  let data = {
-    buyCorporationId: formData.data.buyCorporationId,
-    productIdList: [],
-  };
-  if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
-    data.productIdList = formData.data.contractProductList.map((item) => item.productId);
-  }
-  proxy.post("/contract/decisionAid", data).then((res) => {
-    if (res.lastContractList && res.lastContractList.length > 0) {
-      auxiliaryData.value[0].data = res.lastContractList.map((item) => {
-        return [
-          {
-            label: "合同编号",
-            value: item.code,
-            style: {
-              color: "#0084FF",
-            },
-            id: item.id,
-            num: 1,
-            // fn: () => {},
-          },
-          {
-            label: "下单日期",
-            value: item.createTime,
-            id: item.id,
-            num: 1,
-          },
-          {
-            label: "合同金额",
-            value: item.currency + item.amount,
-            id: item.id,
-            num: 1,
-          },
-        ];
-      });
-    } else {
-      auxiliaryData.value[0].data = [];
-    }
-    if (res.productPriceList && res.productPriceList.length > 0) {
-      auxiliaryData.value[1].data = res.productPriceList.map((item) => {
-        return [
-          {
-            label: "产品名称",
-            value: item.name,
-            id: item.id,
-            num: 1,
-          },
-          {
-            label: "最近价格",
-            value: item.lastPrice,
-            id: item.id,
-            num: 1,
-          },
-          {
-            label: "历史最高",
-            value: item.maxPrice,
-            id: item.id,
-            num: 1,
-          },
-          {
-            label: "历史最低",
-            value: item.minPrice,
-            id: item.id,
-            num: 1,
-          },
-        ];
-      });
-    } else {
-      auxiliaryData.value[1].data = [];
-    }
-    emit("auxiliaryChange", auxiliaryData.value);
-  });
-};
-const createFilter = (queryString) => {
-  return (restaurant) => {
-    return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
-  };
-};
-const querySearchPerson = (queryString, callback) => {
-  const results = queryString ? customerUserList.value.filter(createFilter(queryString)) : customerUserList.value;
-  callback(results);
-};
-const handlePerson = (item) => {
-  formData.data.buyContactNumber = item.phone;
-};
-const pushGoods = (goods) => {
-  if (goods && goods.length > 0) {
-    let afterFiltering = [];
-    if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
-      afterFiltering = goods.filter((item) => {
-        let data = formData.data.contractProductList.filter((itemProduct) => itemProduct.productId === item.id);
-        if (data && data.length > 0) {
-          return false;
-        }
-        return true;
-      });
-    } else {
-      afterFiltering = goods;
-    }
-    formData.data.contractProductList = formData.data.contractProductList.concat(
-      afterFiltering.map((item) => {
-        let fileUrl = "";
-        if (item.fileList && item.fileList.length > 0) {
-          fileUrl = item.fileList[0].fileUrl;
-        }
-        let name = item.name;
-        if (item.standardJson) {
-          let standardJson = JSON.parse(item.standardJson);
-          if (standardJson && standardJson.englishName) {
-            name = standardJson.englishName;
-          }
-        }
-        return {
-          fileUrl: fileUrl,
-          productCode: item.code,
-          productId: item.id,
-          productCnName: item.name,
-          productName: name,
-          productModel: item.spec,
-          productUnit: item.unit,
-          quantity: undefined,
-          price: undefined,
-          amount: "",
-          remark: "",
-          fileList: [],
-        };
-      })
-    );
-    formData.data.contractShipmentList = formData.data.contractShipmentList.concat(
-      afterFiltering.map((item) => {
-        return {
-          productCode: item.code,
-          productId: item.id,
-          productCnName: item.name,
-          shipmentTime: "",
-          quantity: undefined,
-        };
-      })
-    );
-    ElMessage({
-      message: "添加成功!",
-      type: "success",
-    });
-    openProduct.value = false;
-    getDecisionAids();
-  } else {
-    ElMessage("请选择至少一件商品");
-  }
-};
-const onPicture = (path) => {
-  window.open(path, "_blank");
-};
-const productRow = reactive({
-  data: {
-    productName: "",
-    productModel: "",
-    remark: "",
-  },
-});
-const productIndex = ref(0);
-const openHandover = ref(false);
-const fileList = ref([]);
-const uploadData = ref({});
-const formHandoverConfig = computed(() => {
-  return [
-    {
-      type: "title",
-      title: "产品信息",
-      label: "",
-    },
-    {
-      type: "input",
-      prop: "productName",
-      label: "产品名称",
-      itemType: "text",
-      disabled: true,
-    },
-    {
-      type: "input",
-      prop: "productModel",
-      label: "规格型号",
-      itemType: "text",
-      disabled: true,
-    },
-    {
-      type: "slot",
-      slotName: "remark",
-      label: "交接单",
-    },
-    {
-      type: "slot",
-      prop: "file",
-      slotName: "file",
-      label: "上传附件",
-    },
-  ];
-});
-const handleHandover = (row, index) => {
-  productRow.data = {
-    productName: row.productName,
-    productModel: row.productModel,
-    remark: row.remark,
-  };
-  if (row.fileList && row.fileList.length > 0) {
-    fileList.value = row.fileList.map((item) => {
-      return {
-        raw: item,
-        name: item.fileName,
-        url: item.fileUrl,
-      };
-    });
-  } else {
-    fileList.value = [];
-  }
-  productIndex.value = index;
-  openHandover.value = true;
-};
-const updateContent = (val) => {
-  productRow.data.remark = val;
-};
-const changeActiveName = () => {
-  if (activeName.value) {
-    activeName.value = "";
-  } else {
-    activeName.value = "1";
-  }
-};
-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;
-  file.uploadState = true;
-  return true;
-};
-const handleSuccess = (any, UploadFile) => {
-  UploadFile.raw.uploadState = false;
-};
-const onPreviewFile = (file) => {
-  window.open(file.raw.fileUrl, "_blank");
-};
-const submitHandoverForm = () => {
-  if (fileList.value && fileList.value.length > 0) {
-    for (let i = 0; i < fileList.value.length; i++) {
-      if (fileList.value[i].raw.uploadState) {
-        ElMessage("文件上传中,请稍后提交");
-        return;
-      }
-    }
-    formData.data.contractProductList[productIndex.value].fileList = fileList.value.map((item) => {
-      return {
-        id: item.raw.id,
-        fileName: item.raw.fileName,
-        fileUrl: item.raw.fileUrl,
-        uploadState: item.raw.uploadState,
-      };
-    });
-  } else {
-    formData.data.contractProductList[productIndex.value].fileList = [];
-  }
-  formData.data.contractProductList[productIndex.value].remark = productRow.data.remark;
-  openHandover.value = false;
-};
-const handleRemove = async (index, row) => {
-  formData.data.contractShipmentList = formData.data.contractShipmentList.filter((item) => item.productId !== row.productId);
-  await formData.data.contractProductList.splice(index, 1);
-  totalAmount();
-  getDecisionAids();
-};
-const calculationAmount = (listLabel, index, label) => {
-  if (formData.data[listLabel][index][label]) {
-    formData.data[listLabel][index][label] = Number(Math.round(Number(formData.data[listLabel][index][label]) * 10000) / 10000);
-  }
-  nextTick(() => {
-    if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
-      for (let i = 0; i < formData.data.contractProductList.length; i++) {
-        let money = 0;
-        if (formData.data.contractProductList[i].quantity && formData.data.contractProductList[i].price) {
-          money = Number(
-            Math.round(Number(formData.data.contractProductList[i].quantity) * Number(formData.data.contractProductList[i].price) * 10000) / 10000
-          );
-        }
-        formData.data.contractProductList[i].amount = money;
-      }
-    }
-    nextTick(() => {
-      totalAmount();
-    });
-  });
-};
-const totalAmount = (listLabel, index, label) => {
-  if (listLabel && formData.data[listLabel][index][label]) {
-    formData.data[listLabel][index][label] = Number(Math.round(Number(formData.data[listLabel][index][label]) * 10000) / 10000);
-  }
-  let money = 0;
-  if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
-    for (let i = 0; i < formData.data.contractProductList.length; i++) {
-      if (formData.data.contractProductList[i].amount) {
-        money = Number(Math.round((Number(money) + Number(formData.data.contractProductList[i].amount)) * 10000) / 10000);
-      }
-    }
-  }
-  if (formData.data.contractProjectList && formData.data.contractProjectList.length > 0) {
-    for (let i = 0; i < formData.data.contractProjectList.length; i++) {
-      if (formData.data.contractProjectList[i].amount) {
-        money = Number(Math.round((Number(money) + Number(formData.data.contractProjectList[i].amount)) * 10000) / 10000);
-      }
-    }
-  }
-  formData.data.amount = money;
-};
-const clickAdd = () => {
-  if (formData.data.contractProjectList && formData.data.contractProjectList.length > 0) {
-    formData.data.contractProjectList.push({
-      payName: "",
-      amount: undefined,
-      remark: "",
-    });
-  } else {
-    formData.data.contractProjectList = [{ payName: "", amount: undefined, remark: "" }];
-  }
-};
-const handleDelete = async (index) => {
-  await formData.data.contractProjectList.splice(index, 1);
-  totalAmount();
-};
-const querySearch = (queryString, callback) => {
-  proxy.post("/quotationPay/page", { payName: queryString }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      res.rows = res.rows.map((item) => {
-        return {
-          ...item,
-          value: item.payName,
-        };
-      });
-      callback(res.rows);
-    } else {
-      callback([]);
-    }
-  });
-};
-const clickSplit = (item) => {
-  formData.data.contractShipmentList.push({
-    code: item.code,
-    productId: item.productId,
-    productName: item.productName,
-    shipmentTime: "",
-    quantity: undefined,
-  });
-};
-const clickDelete = (index) => {
-  formData.data.contractShipmentList.splice(index, 1);
-};
-
-const handleSubmit = async () => {
-  let status = await submit.value.handleSubmit(() => {});
-  if (status) {
-    if (!(formData.data.contractProductList && formData.data.contractProductList.length > 0)) {
-      ElMessage("请添加至少一件商品");
-      return false;
-    }
-    if (formData.data.contractShipmentList && formData.data.contractShipmentList.length > 0) {
-      for (let i = 0; i < formData.data.contractProductList.length; i++) {
-        let data = formData.data.contractShipmentList.filter((item) => item.productId === formData.data.contractProductList[i].productId);
-        if (data && data.length > 0) {
-          let quantity = 0;
-          for (let j = 0; j < data.length; j++) {
-            quantity = parseFloat(Number(quantity) + Number(data[j].quantity));
-          }
-          if (quantity > formData.data.contractProductList[i].quantity) {
-            ElMessage("出货数量不能大于商品数量");
-            return false;
-          }
-        }
-      }
-    }
-    return true;
-  } else {
-    setTimeout(() => {
-      const errorDiv = document.getElementsByClassName("is-error");
-      errorDiv[0].scrollIntoView();
-    }, 0);
-  }
-  return false;
-};
-const getFormData = () => {
-  return proxy.deepClone(formData.data);
-};
-// 向父组件暴露
-defineExpose({
-  getFormData,
-  handleSubmit,
-});
-const changeShroffAccount = (val) => {
-  if (val) {
-    let data = accountList.value.filter((item) => item.value === val);
-    if (data && data.length > 0) {
-      formData.data.beneficiaryName = data[0].beneficiaryName;
-      formData.data.beneficiaryBank = data[0].beneficiaryBank;
-      formData.data.beneficiaryBankAddress = data[0].beneficiaryBankAddress;
-      formData.data.beneficiaryAccountNumber = data[0].beneficiaryAccountNumber;
-      formData.data.swiftCode = data[0].swiftCode;
-      formData.data.beneficiaryAddress = data[0].beneficiaryAddress;
-    }
-  }
-};
-watch(
-  props.queryData,
-  () => {
-    formOption.disabled = judgeStatus();
-    if (props.queryData && ["10", "20", "30"].includes(route.query.processType)) {
-      for (var text in props.queryData) {
-        formData.data[text] = props.queryData[text];
-      }
-      if (formData.data.countryId) {
-        getCityData(formData.data.countryId, "20");
-      }
-      if (formData.data.provinceId) {
-        getCityData(formData.data.provinceId, "30");
-      }
-      getDecisionAids();
-    }
-  },
-  {
-    deep: true,
-  }
-);
-const acquireSelectList = () => {
-  let data = [];
-  if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
-    data = formData.data.contractProductList.map((item) => {
-      return {
-        id: item.productId,
-        name: item.name,
-      };
-    });
-  }
-  return data;
-};
-onMounted(() => {
-  if (props.queryData.priceSheetId) {
-    proxy.post("/saleQuotation/detail", { id: props.queryData.priceSheetId }).then((res) => {
-      res.countryId = res.buyCountryId;
-      res.provinceId = res.buyProvinceId;
-      res.cityId = res.buyCityId;
-      for (var text in res) {
-        formData.data[text] = res[text];
-      }
-      if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
-        formData.data.contractProductList = formData.data.quotationProductList.map((item) => {
-          delete item.id;
-          return {
-            ...item,
-          };
-        });
-        formData.data.contractShipmentList = proxy.deepClone(
-          formData.data.contractProductList.map((item) => {
-            return {
-              ...item,
-              quantity: undefined,
-            };
-          })
-        );
-        for (let i = 0; i < formData.data.contractProductList.length; i++) {
-          proxy.post("/productInfo/detail", { id: formData.data.contractProductList[i].productId }).then((resProduct) => {
-            let name = resProduct.name;
-            if (resProduct.standardJson) {
-              let standardJson = JSON.parse(resProduct.standardJson);
-              if (standardJson && standardJson.englishName) {
-                name = standardJson.englishName;
-              }
-            }
-            formData.data.contractProductList[i].productCnName = resProduct.name;
-            formData.data.contractProductList[i].productName = name;
-            formData.data.contractProductList[i].productCode = resProduct.code;
-            formData.data.contractProductList[i].productUnit = resProduct.unit;
-            formData.data.contractShipmentList[i].productCode = resProduct.code;
-          });
-        }
-      }
-      delete formData.data.id;
-      delete formData.data.code;
-      getCityData(formData.data.countryId, "20");
-      if (formData.data.provinceId) {
-        getCityData(formData.data.provinceId, "30");
-      }
-      if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
-        formData.data.contractProjectList = formData.data.quotationPayList.map((item) => {
-          delete item.id;
-          return {
-            ...item,
-          };
-        });
-      }
-    });
-  } else if (props.queryData.contractId) {
-    proxy.post("/contract/detail", { id: props.queryData.contractId }).then((res) => {
-      res.countryId = res.buyCountryId;
-      res.provinceId = res.buyProvinceId;
-      res.cityId = res.buyCityId;
-      for (var text in res) {
-        if (text === "contractType") {
-          formData.data[text] = res[text] + "";
-        } else {
-          formData.data[text] = res[text];
-        }
-      }
-      formData.data.oldContractId = formData.data.id;
-      delete formData.data.id;
-      delete formData.data.code;
-      getCityData(formData.data.countryId, "20");
-      if (formData.data.provinceId) {
-        getCityData(formData.data.provinceId, "30");
-      }
-      if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
-        let productIds = formData.data.contractProductList.map((item) => item.productId);
-        proxy.post("/fileInfo/getList", { businessIdList: productIds }).then((resFile) => {
-          for (let i = 0; i < formData.data.contractProductList.length; i++) {
-            if (resFile[formData.data.contractProductList[i].productId] && resFile[formData.data.contractProductList[i].productId].length > 0) {
-              formData.data.contractProductList[i].fileUrl = resFile[formData.data.contractProductList[i].productId][0].fileUrl;
-            }
-          }
-        });
-        let ids = formData.data.contractProductList.map((item) => item.id);
-        proxy.post("/fileInfo/getList", { businessIdList: ids }).then((resFile) => {
-          for (let i = 0; i < formData.data.contractProductList.length; i++) {
-            if (resFile[formData.data.contractProductList[i].id] && resFile[formData.data.contractProductList[i].id].length > 0) {
-              formData.data.contractProductList[i].fileList = resFile[formData.data.contractProductList[i].id];
-            }
-          }
-        });
-      }
-      if (formData.data.contractProjectList && formData.data.contractProjectList.length > 0) {
-        formData.data.contractProjectList = formData.data.contractProjectList.map((item) => {
-          delete item.id;
-          return {
-            ...item,
-          };
-        });
-      }
-      if (formData.data.contractShipmentList && formData.data.contractShipmentList.length > 0) {
-        formData.data.contractShipmentList = formData.data.contractShipmentList.map((item) => {
-          delete item.id;
-          return {
-            ...item,
-          };
-        });
-      }
-    });
-  }
-});
-</script>
-
-<style lang="scss" scoped>
-::v-deep(.el-input-number .el-input__inner) {
-  text-align: left;
-}
-.pic {
-  object-fit: contain;
-  width: 50px;
-  height: 50px;
-  cursor: pointer;
-  vertical-align: middle;
-}
-.shrinkPadding {
-  padding-right: 0 !important;
-}
-.hideCollapse {
-  margin-top: -62px;
-  border: 0 !important;
-}
-::v-deep(.el-collapse-item__arrow) {
-  display: none !important;
-}
-::v-deep(.el-collapse-item__wrap) {
-  border: 0 !important;
-}
-::v-deep(.el-collapse-item__header) {
-  border: 0 !important;
-}
-</style>

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

@@ -1,955 +0,0 @@
-<template>
-  <div style="width: 100%; padding: 0px 15px">
-    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
-      <template #seller>
-        <div style="width: 100%">
-          <el-form-item prop="sellCorporationId">
-            <el-select v-model="formData.data.sellCorporationId" style="width: 100%" disabled>
-              <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
-            </el-select>
-          </el-form-item>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="8">
-              <el-form-item label="地址" prop="sellCountryName">
-                <el-input v-model="formData.data.sellCountryName" placeholder="请输入国家" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label=" " prop="sellProvinceName">
-                <el-input v-model="formData.data.sellProvinceName" placeholder="请输入省/州" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label=" " prop="sellCityName">
-                <el-input v-model="formData.data.sellCityName" placeholder="请输入城市" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="24">
-              <el-form-item prop="sellAddress">
-                <el-input v-model="formData.data.sellAddress" type="textarea"> </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="8">
-              <el-form-item label="联系人" prop="sellContactName">
-                <el-input v-model="formData.data.sellContactName" placeholder="请输入联系人" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="16">
-              <el-form-item label=" " prop="sellContactNumber">
-                <el-input v-model="formData.data.sellContactNumber" placeholder="请输入联系人电话" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </div>
-      </template>
-      <template #buyer>
-        <div style="width: 100%">
-          <div style="width: 100%">
-            <el-form-item prop="buyCorporationId">
-              <el-select v-model="formData.data.buyCorporationId" filterable style="width: 100%" @change="changeCustomer">
-                <el-option v-for="item in customerList" :key="item.value" :label="item.label" :value="item.value" />
-              </el-select>
-            </el-form-item>
-            <el-row style="margin-top: 20px; width: 100%">
-              <el-col :span="6">
-                <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
-                    <el-option v-for="item in countryData" :label="item.name" :value="item.id"> </el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label=" " prop="provinceName">
-                  <selectCity
-                    placeholder="省/洲"
-                    @change="(val) => getCityData(val, '30', true)"
-                    addressId="provinceId"
-                    addressName="provinceName"
-                    v-model="formData.data"
-                    :data="provinceData">
-                  </selectCity>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label=" " prop="cityName">
-                  <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData"> </selectCity>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label=" " prop="buyPostalCode">
-                  <el-input v-model="formData.data.buyPostalCode" placeholder="请输入邮编" />
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row style="margin-top: 20px; width: 100%">
-              <el-col :span="24">
-                <el-form-item prop="buyAddress">
-                  <el-input v-model="formData.data.buyAddress" type="textarea"> </el-input>
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row style="margin-top: 20px; width: 100%">
-              <el-col :span="8">
-                <el-form-item label="联系人" prop="buyContactName">
-                  <el-autocomplete
-                    v-model="formData.data.buyContactName"
-                    :fetch-suggestions="querySearchPerson"
-                    clearable
-                    class="inline-input w-50"
-                    placeholder="请输入联系人"
-                    @select="handlePerson">
-                  </el-autocomplete>
-                </el-form-item>
-              </el-col>
-              <el-col :span="16">
-                <el-form-item label=" " prop="buyContactNumber">
-                  <el-input v-model="formData.data.buyContactNumber" placeholder="请输入联系人电话" />
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </div>
-        </div>
-      </template>
-      <template #commodity>
-        <div style="width: 100%">
-          <el-button @click="openProduct = true">添加商品</el-button>
-          <el-table :data="formData.data.quotationProductList" style="width: 100%; margin-top: 16px">
-            <el-table-column label="商品图片" width="80">
-              <template #default="{ row }">
-                <div v-if="row.fileUrl">
-                  <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
-                </div>
-                <div v-else></div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="code" label="商品编码" width="120" />
-            <el-table-column prop="name" label="商品中文名" width="160" />
-            <el-table-column label="商品英文名" min-width="200">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'quotationProductList.' + $index + '.productName'" :rules="rules.productName" :inline-message="true">
-                    <el-input v-model="row.productName" placeholder="请输入商品英文名" />
-                  </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="'quotationProductList.' + $index + '.productModel'" :inline-message="true">
-                    <el-input v-model="row.productModel" placeholder="请输入规格型号" />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="unit" label="单位" width="100" :formatter="(row) => dictValueLabel(row.unit, productUnit)" />
-            <el-table-column label="数量" width="150">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'quotationProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.quantity"
-                      placeholder="请输入数量"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
-                        () => {
-                          return calculationAmount('quotationProductList', $index, 'quantity');
-                        }
-                      " />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column label="单价" width="160">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'quotationProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.price"
-                      placeholder="请输入单价"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
-                        () => {
-                          return calculationAmount('quotationProductList', $index, 'price');
-                        }
-                      " />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="amount" label="金额" width="100" />
-            <el-table-column align="center" label="操作" width="80" fixed="right">
-              <template #default="{ $index }">
-                <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </template>
-      <template #otherCharge>
-        <div style="width: 100%">
-          <el-button type="primary" @click="clickAdd()">添加行</el-button>
-          <el-table :data="formData.data.quotationPayList" style="width: 100%; margin-top: 16px">
-            <el-table-column label="收费项目" width="220">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'quotationPayList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true">
-                    <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50" placeholder="请输入收费项目" />
-                  </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="'quotationPayList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.amount"
-                      placeholder="请输入金额"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
-                        () => {
-                          return totalAmount('quotationPayList', $index, 'amount');
-                        }
-                      " />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column label="备注">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'quotationPayList.' + $index + '.remark'">
-                    <el-input v-model="row.remark" placeholder="请输入备注" />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column label="操作" width="80" fixed="right">
-              <template #default="{ row, $index }">
-                <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </template>
-      <template #offerMoney>
-        <div style="width: 100%">
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="4">
-              <el-form-item label="币种" prop="currency">
-                <el-select v-model="formData.data.currency" placeholder="请选择币种" style="width: 100%">
-                  <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="合同总金额" prop="amount">
-                <el-input v-model="formData.data.amount" placeholder="合同总金额" disabled />
-              </el-form-item>
-            </el-col>
-            <el-col :span="4">
-              <el-form-item label="报价有效期 (天)" prop="effective">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.effective"
-                  placeholder="请输入有效期"
-                  style="width: 100%"
-                  :precision="0"
-                  :controls="false"
-                  :min="0" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="7">
-              <el-form-item label="付款方式" prop="paymentMethod">
-                <el-select v-model="formData.data.paymentMethod" placeholder="请选择付款方式" style="width: 100%">
-                  <el-option v-for="item in fundsPaymentMethod" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="7">
-              <el-form-item label="预付比例 (%)" prop="advanceRatio">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.advanceRatio"
-                  placeholder="请输入预付比例"
-                  style="width: 100%"
-                  :precision="2"
-                  :controls="false"
-                  :min="0"
-                  :max="100" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </div>
-      </template>
-      <template #delivery>
-        <div style="width: 100%">
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="7">
-              <el-form-item label="贸易方式" prop="tradeMethods">
-                <el-select v-model="formData.data.tradeMethods" placeholder="请选择贸易方式" style="width: 100%">
-                  <el-option v-for="item in tradeMethods" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="7">
-              <el-form-item label="运输方式" prop="transportMethod">
-                <el-select v-model="formData.data.transportMethod" placeholder="请选择运输方式" style="width: 100%">
-                  <el-option v-for="item in shippingMethod" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="7">
-              <el-form-item label="运输说明" prop="transportRemark">
-                <el-input v-model="formData.data.transportRemark" placeholder="请输入运输说明" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="14">
-              <el-form-item label="付款条件" prop="remark">
-                <el-input v-model="formData.data.remark" :rows="2" type="textarea" placeholder="请输入付款条件" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="7">
-              <el-form-item label="质保期 (天)" prop="warranty">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.warranty"
-                  placeholder="请输入质保期"
-                  style="width: 100%"
-                  :precision="0"
-                  :controls="false"
-                  :min="0" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </div>
-      </template>
-    </byForm>
-
-    <el-dialog v-if="openProduct" v-model="openProduct" title="选择商品" width="70%" append-to-body>
-      <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
-    </el-dialog>
-  </div>
-</template>
-
-<script setup>
-import byForm from "@/components/byForm/index";
-import SelectGoods from "@/components/product/SelectGoods";
-import { ElMessage } from "element-plus";
-import selectCity from "@/components/selectCity/index.vue";
-import { useRoute } from "vue-router";
-
-const route = useRoute();
-const { proxy } = getCurrentInstance();
-const accountCurrency = ref([]);
-const fundsPaymentMethod = ref([]);
-const tradeMethods = ref([]);
-const shippingMethod = ref([]);
-const productUnit = ref([]);
-const templateList = ref([]);
-const corporationList = ref([]);
-const customerList = ref([]);
-const countryData = ref([]);
-const provinceData = ref([]);
-const cityData = ref([]);
-const customerUserList = ref([]);
-const openProduct = ref(false);
-const formData = reactive({
-  data: {
-    amount: undefined,
-    quotationProductList: [],
-    quotationPayList: [],
-  },
-});
-const submit = ref(null);
-const judgeStatus = () => {
-  if (route.query.processType == 20 || route.query.processType == 10) {
-    return true;
-  }
-  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
-    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
-    if (data && data.length > 0) {
-      return true;
-    }
-  }
-  return false;
-};
-const formOption = reactive({
-  inline: true,
-  labelWidth: 100,
-  itemWidth: 100,
-  rules: [],
-  disabled: false,
-});
-const formConfig = computed(() => {
-  return [
-    {
-      type: "title",
-      title: "合同模板",
-      label: "",
-    },
-    {
-      type: "select",
-      label: "选择合同模板",
-      prop: "contractTemplateId",
-      data: templateList.value,
-      fn: (val) => {
-        changeTemplate(val);
-      },
-    },
-    {
-      type: "slot",
-      slotName: "seller",
-      label: "卖方信息",
-      itemWidth: 50,
-    },
-    {
-      type: "slot",
-      slotName: "buyer",
-      label: "买方信息",
-      itemWidth: 50,
-    },
-    {
-      type: "slot",
-      slotName: "commodity",
-      label: "商品信息",
-    },
-    {
-      type: "slot",
-      slotName: "otherCharge",
-      label: "其他收费项目",
-    },
-    {
-      type: "slot",
-      slotName: "offerMoney",
-      label: "报价金额",
-    },
-    {
-      type: "slot",
-      slotName: "delivery",
-      label: "交付信息",
-    },
-  ];
-});
-const rules = ref({
-  contractTemplateId: [{ required: true, message: "请选择合同模板", trigger: "change" }],
-  buyCorporationId: [{ required: true, message: "请选择公司", trigger: "change" }],
-  countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
-  sellAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
-  buyAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
-  buyContactName: [{ required: true, message: "请输入联系人", trigger: ["change", "blur"] }],
-  buyContactNumber: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
-  productName: [{ required: true, message: "请输入商品英文名", trigger: "blur" }],
-  productModel: [{ required: true, message: "请输入规格型号", trigger: "blur" }],
-  quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
-  price: [{ required: true, message: "请输入单价", trigger: "blur" }],
-  amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
-  payName: [{ required: true, message: "请输入收费项目", trigger: ["change", "blur"] }],
-  currency: [{ required: true, message: "请选择币种", trigger: "change" }],
-  effective: [{ required: true, message: "请输入报价有效期", trigger: "blur" }],
-  paymentMethod: [{ required: true, message: "请选择付款方式", trigger: "change" }],
-  advanceRatio: [{ required: true, message: "请输入预付比例", trigger: "blur" }],
-  tradeMethods: [{ required: true, message: "请选择贸易方式", trigger: "change" }],
-  transportMethod: [{ required: true, message: "请选择运输方式", trigger: "change" }],
-  transportRemark: [{ required: true, message: "请输入运输说明", trigger: "blur" }],
-  remark: [{ required: true, message: "请输入付款条件", trigger: "blur" }],
-});
-const getDict = () => {
-  proxy.getDictOne(["account_currency", "funds_payment_method", "trade_mode", "shipping_method", "unit"]).then((res) => {
-    accountCurrency.value = res["account_currency"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    fundsPaymentMethod.value = res["funds_payment_method"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    tradeMethods.value = res["trade_mode"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    shippingMethod.value = res["shipping_method"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    productUnit.value = res["unit"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
-  proxy.post("/contractTemplate/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    templateList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.templateName,
-        value: item.id,
-      };
-    });
-  });
-  proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    corporationList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.name,
-        value: item.id,
-      };
-    });
-  });
-};
-getDict();
-const changeTemplate = (val) => {
-  formData.data.sellCorporationId = "";
-  formData.data.sellContactName = "";
-  formData.data.sellContactNumber = "";
-  formData.data.sellCountryName = "";
-  formData.data.sellProvinceName = "";
-  formData.data.sellCityName = "";
-  formData.data.sellAddress = "";
-  if (val) {
-    proxy.post("/contractTemplate/detail", { id: val }).then((res) => {
-      formData.data.sellCorporationId = res.corporationId;
-      if (res.corporationId) {
-        proxy.post("/corporation/detail", { id: res.corporationId }).then((detailCorporation) => {
-          if (detailCorporation.countryEnStr) {
-            formData.data.sellCountryName = detailCorporation.countryEnStr;
-          }
-          if (detailCorporation.provinceEnStr) {
-            formData.data.sellProvinceName = detailCorporation.provinceEnStr;
-          }
-          if (detailCorporation.cityEnStr) {
-            formData.data.sellCityName = detailCorporation.cityEnStr;
-          }
-          if (detailCorporation.addressEn) {
-            formData.data.sellAddress = detailCorporation.addressEn;
-          }
-          // proxy.post("/customizeArea/list", { parentId: "0" }).then((resCountry) => {
-          //   let sellCountryData = resCountry.filter((item) => item.id === detailCorporation.countryId);
-          //   if (sellCountryData && sellCountryData.length > 0) {
-          //     formData.data.sellCountryName = sellCountryData[0].chineseName;
-          //   } else {
-          //     formData.data.sellCountryName = "";
-          //   }
-          // });
-          // if (detailCorporation.countryId) {
-          //   proxy.post("/customizeArea/list", { parentId: detailCorporation.countryId }).then((resProvince) => {
-          //     let sellProvinceData = resProvince.filter((item) => item.id === detailCorporation.provinceId);
-          //     if (sellProvinceData && sellProvinceData.length > 0) {
-          //       formData.data.sellProvinceName = sellProvinceData[0].name;
-          //     } else {
-          //       formData.data.sellProvinceName = "";
-          //     }
-          //   });
-          // } else {
-          //   formData.data.sellProvinceName = "";
-          // }
-          // if (detailCorporation.provinceId) {
-          //   proxy.post("/customizeArea/list", { parentId: detailCorporation.provinceId }).then((resCity) => {
-          //     let sellCityData = resCity.filter((item) => item.id === detailCorporation.cityId);
-          //     if (sellCityData && sellCityData.length > 0) {
-          //       formData.data.sellCityName = sellCityData[0].name;
-          //     } else {
-          //       formData.data.sellCityName = "";
-          //     }
-          //   });
-          // } else {
-          //   formData.data.sellCityName = "";
-          // }
-          // formData.data.sellAddress = detailCorporation.address;
-        });
-      }
-      formData.data.sellContactName = res.contactName;
-      formData.data.sellContactNumber = res.contactNumber;
-    });
-  }
-};
-const getCityData = (id, type, isChange) => {
-  proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
-    if (type === "20") {
-      provinceData.value = res;
-      if (isChange) {
-        formData.data.provinceId = "";
-        formData.data.provinceName = "";
-        formData.data.cityId = "";
-        formData.data.cityName = "";
-      }
-    } else if (type === "30") {
-      cityData.value = res;
-      if (isChange) {
-        formData.data.cityId = "";
-        formData.data.cityName = "";
-      }
-    } else {
-      countryData.value = res;
-    }
-  });
-};
-getCityData("0");
-const changeCustomer = (val) => {
-  formData.data.buyContactName = "";
-  formData.data.buyContactNumber = "";
-  if (val) {
-    proxy.post("/customer/detail", { id: val }).then(
-      (res) => {
-        if (res.customerUserList && res.customerUserList.length > 0) {
-          formData.data.buyContactName = res.customerUserList[0].name;
-          if (res.customerUserList[0].contactJson) {
-            let contactJson = JSON.parse(res.customerUserList[0].contactJson);
-            if (contactJson && contactJson.length > 0) {
-              formData.data.buyContactNumber = contactJson[0].contactNo;
-            }
-          }
-          customerUserList.value = res.customerUserList.map((item) => {
-            return {
-              ...item,
-              value: item.name,
-            };
-          });
-        }
-        formData.data.countryId = res.countryId;
-        formData.data.provinceId = res.provinceId;
-        formData.data.cityId = res.cityId;
-        formData.data.buyPostalCode = res.zipCode;
-        formData.data.buyAddress = res.address;
-        getCityData(formData.data.countryId, "20");
-        if (formData.data.provinceId) {
-          getCityData(formData.data.provinceId, "30");
-        }
-      },
-      (err) => {
-        console.log(err);
-        formData.data.countryId = "";
-        formData.data.provinceId = "";
-        formData.data.cityId = "";
-        formData.data.buyPostalCode = "";
-        formData.data.buyAddress = "";
-      }
-    );
-  } else {
-    formData.data.countryId = "";
-    formData.data.provinceId = "";
-    formData.data.cityId = "";
-    formData.data.buyPostalCode = "";
-    formData.data.buyAddress = "";
-  }
-};
-const createFilter = (queryString) => {
-  return (restaurant) => {
-    return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
-  };
-};
-const querySearchPerson = (queryString, callback) => {
-  const results = queryString ? customerUserList.value.filter(createFilter(queryString)) : customerUserList.value;
-  callback(results);
-};
-const handlePerson = (item) => {
-  formData.data.buyContactNumber = item.phone;
-};
-const pushGoods = (goods) => {
-  if (goods && goods.length > 0) {
-    let afterFiltering = [];
-    if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
-      afterFiltering = goods.filter((item) => {
-        let data = formData.data.quotationProductList.filter((itemProduct) => itemProduct.productId === item.id);
-        if (data && data.length > 0) {
-          return false;
-        }
-        return true;
-      });
-    } else {
-      afterFiltering = goods;
-    }
-    formData.data.quotationProductList = formData.data.quotationProductList.concat(
-      afterFiltering.map((item) => {
-        let fileUrl = "";
-        if (item.fileList && item.fileList.length > 0) {
-          fileUrl = item.fileList[0].fileUrl;
-        }
-        let name = item.name;
-        if (item.standardJson) {
-          let standardJson = JSON.parse(item.standardJson);
-          if (standardJson && standardJson.englishName) {
-            name = standardJson.englishName;
-          }
-        }
-        return {
-          fileUrl: fileUrl,
-          code: item.code,
-          productId: item.id,
-          name: item.name,
-          productName: name,
-          productModel: item.spec,
-          unit: item.unit,
-          quantity: undefined,
-          price: undefined,
-          amount: "",
-          remark: item.remark,
-        };
-      })
-    );
-    ElMessage({
-      message: "添加成功!",
-      type: "success",
-    });
-    openProduct.value = false;
-  } else {
-    ElMessage("请选择至少一件商品");
-  }
-};
-const onPicture = (path) => {
-  window.open(path, "_blank");
-};
-const handleRemove = async (index) => {
-  await formData.data.quotationProductList.splice(index, 1);
-  totalAmount();
-};
-const calculationAmount = (listLabel, index, label) => {
-  if (formData.data[listLabel][index][label]) {
-    formData.data[listLabel][index][label] = Number(Math.round(Number(formData.data[listLabel][index][label]) * 10000) / 10000);
-  }
-  nextTick(() => {
-    if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
-      for (let i = 0; i < formData.data.quotationProductList.length; i++) {
-        let money = 0;
-        if (formData.data.quotationProductList[i].quantity && formData.data.quotationProductList[i].price) {
-          money = Number(
-            Math.round(Number(formData.data.quotationProductList[i].quantity) * Number(formData.data.quotationProductList[i].price) * 10000) / 10000
-          );
-        }
-        formData.data.quotationProductList[i].amount = money;
-      }
-    }
-    nextTick(() => {
-      totalAmount();
-    });
-  });
-};
-const totalAmount = (listLabel, index, label) => {
-  if (listLabel && formData.data[listLabel][index][label]) {
-    formData.data[listLabel][index][label] = Number(Math.round(Number(formData.data[listLabel][index][label]) * 10000) / 10000);
-  }
-  let money = 0;
-  if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
-    for (let i = 0; i < formData.data.quotationProductList.length; i++) {
-      if (formData.data.quotationProductList[i].amount) {
-        money = Number(Math.round((Number(money) + Number(formData.data.quotationProductList[i].amount)) * 10000) / 10000);
-      }
-    }
-  }
-  if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
-    for (let i = 0; i < formData.data.quotationPayList.length; i++) {
-      if (formData.data.quotationPayList[i].amount) {
-        money = Number(Math.round((Number(money) + Number(formData.data.quotationPayList[i].amount)) * 10000) / 10000);
-      }
-    }
-  }
-  formData.data.amount = money;
-};
-const clickAdd = () => {
-  if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
-    formData.data.quotationPayList.push({
-      payName: "",
-      amount: undefined,
-      remark: "",
-    });
-  } else {
-    formData.data.quotationPayList = [{ payName: "", amount: undefined, remark: "" }];
-  }
-};
-const handleDelete = async (index) => {
-  await formData.data.quotationPayList.splice(index, 1);
-  totalAmount();
-};
-const querySearch = (queryString, callback) => {
-  proxy.post("/quotationPay/page", { payName: queryString }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      res.rows = res.rows.map((item) => {
-        return {
-          ...item,
-          value: item.payName,
-        };
-      });
-      callback(res.rows);
-    } else {
-      callback([]);
-    }
-  });
-};
-const handleSubmit = async () => {
-  let status = await submit.value.handleSubmit(() => {});
-  if (status) {
-    if (!(formData.data.quotationProductList && formData.data.quotationProductList.length > 0)) {
-      ElMessage("请添加至少一件商品");
-      return false;
-    }
-    return true;
-  } else {
-    setTimeout(() => {
-      const errorDiv = document.getElementsByClassName("is-error");
-      errorDiv[0].scrollIntoView();
-    }, 0);
-  }
-  return status;
-};
-// 接收父组件的传值
-const props = defineProps({
-  queryData: Object,
-});
-watch(
-  props.queryData,
-  () => {
-    formOption.disabled = judgeStatus();
-    if (props.queryData && ["10", "20", "30"].includes(route.query.processType)) {
-      for (var text in props.queryData) {
-        formData.data[text] = props.queryData[text];
-      }
-      if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
-        for (let i = 0; i < formData.data.quotationProductList.length; i++) {
-          delete formData.data.quotationProductList[i].id;
-          proxy.post("/productInfo/detail", { id: formData.data.quotationProductList[i].productId }).then((resProduct) => {
-            formData.data.quotationProductList[i].name = resProduct.name;
-            formData.data.quotationProductList[i].code = resProduct.code;
-            formData.data.quotationProductList[i].unit = resProduct.unit;
-          });
-        }
-        let fileIds = formData.data.quotationProductList.map((item) => item.productId);
-        proxy.post("/fileInfo/getList", { businessIdList: fileIds }).then((resFile) => {
-          for (let i = 0; i < formData.data.quotationProductList.length; i++) {
-            if (resFile[formData.data.quotationProductList[i].productId] && resFile[formData.data.quotationProductList[i].productId].length > 0) {
-              formData.data.quotationProductList[i].fileUrl = resFile[formData.data.quotationProductList[i].productId][0].fileUrl;
-            }
-          }
-        });
-      }
-      if (formData.data.countryId) {
-        getCityData(formData.data.countryId, "20");
-      }
-      if (formData.data.provinceId) {
-        getCityData(formData.data.provinceId, "30");
-      }
-    }
-  },
-  {
-    deep: true,
-  }
-);
-onMounted(() => {
-  if (!route.query.processType || route.query.processType == 30) {
-    proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 }).then((res) => {
-      customerList.value = res.rows.map((item) => {
-        return {
-          ...item,
-          label: item.name,
-          value: item.id,
-        };
-      });
-    });
-  } else {
-    proxy.post("/customer/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-      customerList.value = res.rows.map((item) => {
-        return {
-          ...item,
-          label: item.name,
-          value: item.id,
-        };
-      });
-    });
-  }
-  if (props.queryData.priceSheetId) {
-    proxy.post("/saleQuotation/detail", { id: props.queryData.priceSheetId }).then((res) => {
-      res.countryId = res.buyCountryId;
-      res.provinceId = res.buyProvinceId;
-      res.cityId = res.buyCityId;
-      for (var text in res) {
-        formData.data[text] = res[text];
-      }
-      if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
-        for (let i = 0; i < formData.data.quotationProductList.length; i++) {
-          delete formData.data.quotationProductList[i].id;
-          proxy.post("/productInfo/detail", { id: formData.data.quotationProductList[i].productId }).then((resProduct) => {
-            formData.data.quotationProductList[i].name = resProduct.name;
-            formData.data.quotationProductList[i].code = resProduct.code;
-            formData.data.quotationProductList[i].unit = resProduct.unit;
-          });
-        }
-        let fileIds = formData.data.quotationProductList.map((item) => item.productId);
-        proxy.post("/fileInfo/getList", { businessIdList: fileIds }).then((resFile) => {
-          for (let i = 0; i < formData.data.quotationProductList.length; i++) {
-            if (resFile[formData.data.quotationProductList[i].productId] && resFile[formData.data.quotationProductList[i].productId].length > 0) {
-              formData.data.quotationProductList[i].fileUrl = resFile[formData.data.quotationProductList[i].productId][0].fileUrl;
-            }
-          }
-        });
-      }
-      delete formData.data.id;
-      delete formData.data.code;
-      getCityData(formData.data.countryId, "20");
-      if (formData.data.provinceId) {
-        getCityData(formData.data.provinceId, "30");
-      }
-      if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
-        formData.data.quotationPayList = formData.data.quotationPayList.map((item) => {
-          delete item.id;
-          return {
-            ...item,
-          };
-        });
-      }
-    });
-  }
-});
-const getFormData = () => {
-  return proxy.deepClone(formData.data);
-};
-// 向父组件暴露
-defineExpose({
-  getFormData,
-  handleSubmit,
-});
-const acquireSelectList = () => {
-  let data = [];
-  if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
-    data = formData.data.quotationProductList.map((item) => {
-      return {
-        id: item.productId,
-        name: item.name,
-      };
-    });
-  }
-  return data;
-};
-</script>
-
-<style lang="scss" scoped>
-::v-deep(.el-input-number .el-input__inner) {
-  text-align: left;
-}
-.pic {
-  object-fit: contain;
-  width: 50px;
-  height: 50px;
-  cursor: pointer;
-  vertical-align: middle;
-}
-</style>

+ 0 - 338
src/components/process/PurchaseRefund.vue

@@ -1,338 +0,0 @@
-<template>
-  <div style="width: 100%; padding: 0px 15px">
-    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
-      <template #refundDetailList>
-        <div style="width: 100%">
-          <el-button type="primary" @click="clickAdd()">添加行</el-button>
-          <el-table :data="formData.data.refundDetailList" style="width: 100%; margin-top: 16px">
-            <el-table-column label="退货单号" width="220">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'refundDetailList.' + $index + '.salesReturnId'" :rules="rules.salesReturnId" :inline-message="true">
-                    <el-select v-model="row.salesReturnId" placeholder="请选择退货单号" style="width: 100%" @change="changePurchaseId(row)">
-                      <el-option v-for="item in returnGoods" :key="item.value" :label="item.label" :value="item.value" />
-                    </el-select>
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="approvedDate" label="退货时间" width="160" />
-            <el-table-column label="退货状态" width="140">
-              <template #default="{ row }">
-                <div style="width: 100%">
-                  {{ dictValueLabel(row.status, returnStatus) }}
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column label="退款金额" width="180">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'refundDetailList.' + $index + '.money'" :rules="rules.money" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      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="备注">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'refundDetailList.' + $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="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 useUserStore from "@/store/modules/user";
-import moment from "moment";
-import { ElMessage } from "element-plus";
-import { useRoute } from "vue-router";
-
-const route = useRoute();
-const { proxy } = getCurrentInstance();
-const supplierList = ref([]);
-const returnGoods = ref([]);
-const returnStatus = ref([
-  {
-    label: "审批中",
-    value: "10",
-  },
-  {
-    label: "驳回",
-    value: "15",
-  },
-  {
-    label: "待退货",
-    value: "20",
-  },
-  {
-    label: "部分退货",
-    value: "30",
-  },
-  {
-    label: "已退货",
-    value: "40",
-  },
-  {
-    label: "已结束",
-    value: "50",
-  },
-]);
-let formData = reactive({
-  data: {
-    supplyId: "",
-    deptName: useUserStore().user.dept.deptName,
-    refundName: useUserStore().user.dept.userName,
-    amount: "",
-    remark: "",
-    refundTime: moment().format("yyyy-MM-DD HH:mm:ss"),
-    refundDetailList: [],
-  },
-});
-const submit = ref(null);
-const judgeStatus = () => {
-  if (route.query.processType == 20 || route.query.processType == 10) {
-    return true;
-  }
-  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
-    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
-    if (data && data.length > 0) {
-      return true;
-    }
-  }
-  return false;
-};
-const formOption = reactive({
-  inline: true,
-  labelWidth: 100,
-  itemWidth: 100,
-  rules: [],
-  disabled: false,
-});
-const formConfig = computed(() => {
-  return [
-    {
-      type: "title",
-      title: "基础信息",
-      label: "",
-    },
-    {
-      type: "input",
-      prop: "deptName",
-      label: "申请部门",
-      required: true,
-      itemType: "text",
-      disabled: true,
-      itemWidth: 25,
-    },
-    {
-      type: "input",
-      prop: "refundName",
-      label: "申请人",
-      required: true,
-      itemType: "text",
-      disabled: true,
-      itemWidth: 25,
-    },
-    {
-      type: "input",
-      prop: "refundTime",
-      label: "申请时间",
-      required: true,
-      itemType: "text",
-      disabled: true,
-      itemWidth: 25,
-    },
-    {
-      type: "select",
-      label: "供应商",
-      prop: "supplyId",
-      data: supplierList.value,
-      fn: (val) => {
-        changeSupply(val);
-      },
-    },
-    {
-      type: "input",
-      prop: "remark",
-      label: "退款原因",
-      itemType: "textarea",
-    },
-    {
-      type: "slot",
-      prop: "refundDetailList",
-      slotName: "refundDetailList",
-      label: "关联退货",
-    },
-    {
-      type: "input",
-      prop: "amount",
-      label: "应退款金额",
-      required: true,
-      itemType: "text",
-      disabled: true,
-    },
-  ];
-});
-let rules = ref({
-  supplyId: [{ required: true, message: "请选择供应商", trigger: "change" }],
-  salesReturnId: [{ required: true, message: "请选择退货单号", trigger: "change" }],
-  money: [{ required: true, message: "请输入退款金额", trigger: "blur" }],
-});
-const getDict = () => {
-  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,
-        };
-      });
-    }
-  });
-};
-getDict();
-const changeSupply = (val, status) => {
-  if (!status) {
-    formData.data.refundDetailList = [];
-  }
-  if (val) {
-    proxy.get("/salesReturn/getBySupplyId", { supplyId: val }).then((res) => {
-      if (res.data && res.data.length > 0) {
-        returnGoods.value = res.data.map((item) => {
-          return {
-            ...item,
-            value: item.id,
-            label: item.code,
-          };
-        });
-      } else {
-        returnGoods.value = [];
-      }
-      if (status) {
-        if (formData.data.refundDetailList && formData.data.refundDetailList.length > 0) {
-          for (let i = 0; i < formData.data.refundDetailList.length; i++) {
-            changePurchaseId(formData.data.refundDetailList[i]);
-          }
-        }
-      }
-    });
-  } else {
-    returnGoods.value = [];
-  }
-};
-const clickAdd = () => {
-  if (formData.data.refundDetailList && formData.data.refundDetailList.length > 0) {
-    formData.data.refundDetailList.push({ salesReturnId: "", money: undefined, remark: "", approvedDate: "", status: "" });
-  } else {
-    formData.data.refundDetailList = [{ salesReturnId: "", money: undefined, remark: "", approvedDate: "", status: "" }];
-  }
-};
-const handleRemove = (index) => {
-  formData.data.refundDetailList.splice(index, 1);
-};
-const changeMoney = () => {
-  let money = 0;
-  for (let i = 0; i < formData.data.refundDetailList.length; i++) {
-    if (formData.data.refundDetailList[i].money) {
-      money = parseFloat(Number(money) + Number(formData.data.refundDetailList[i].money)).toFixed(2);
-    }
-  }
-  formData.data.amount = money;
-};
-const handleSubmit = async () => {
-  let status = await submit.value.handleSubmit(() => {});
-  if (status) {
-    if (!(formData.data.refundDetailList && formData.data.refundDetailList.length > 0)) {
-      ElMessage("请添加至少一条退货信息");
-      return false;
-    }
-    for (let i = 0; i < formData.data.refundDetailList.length; i++) {
-      if (!formData.data.refundDetailList[0].money || Number(formData.data.refundDetailList[i].money) === 0) {
-        ElMessage("退款金额不能为0");
-        return false;
-      }
-    }
-    return true;
-  }
-  return status;
-};
-const getFormData = () => {
-  return proxy.deepClone(formData.data);
-};
-// 向父组件暴露
-defineExpose({
-  getFormData,
-  handleSubmit,
-});
-// 接收父组件的传值
-const props = defineProps({
-  queryData: Object,
-});
-watch(
-  props.queryData,
-  () => {
-    formOption.disabled = judgeStatus();
-    if (props.queryData && ["10", "20", "30"].includes(route.query.processType)) {
-      for (var text in props.queryData) {
-        formData.data[text] = props.queryData[text];
-      }
-      if (formData.data.supplyId) {
-        changeSupply(formData.data.supplyId, true);
-      }
-    }
-  },
-  {
-    deep: true,
-  }
-);
-// 获取用户信息并赋默认值
-const userInfo = useUserStore().user;
-onMounted(() => {
-  formData.data.refundName = userInfo.nickName;
-});
-const changePurchaseId = (row) => {
-  if (row.salesReturnId) {
-    let data = returnGoods.value.filter((item) => item.id === row.salesReturnId);
-    if (data && data.length > 0) {
-      row.approvedDate = data[0].approvedDate;
-      row.status = data[0].status;
-    } else {
-      row.approvedDate = "";
-      row.status = "";
-    }
-  } else {
-    row.approvedDate = "";
-    row.status = "";
-  }
-};
-</script>
-
-<style lang="scss" scoped>
-::v-deep(.el-input-number .el-input__inner) {
-  text-align: left;
-}
-</style>

+ 0 - 266
src/components/process/ReturnGood.vue

@@ -1,266 +0,0 @@
-<template>
-  <div style="width: 100%; padding: 0px 15px">
-    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom">
-      <template #details>
-        <div style="width: 100%">
-          <el-button type="primary" @click="openProduct = true" style="margin-bottom: 10px"> 添加物品 </el-button>
-          <el-table :data="formData.data.salesReturnDetailList">
-            <el-table-column prop="productCode" label="货品编码" />
-            <el-table-column prop="productName" label="货品名称" />
-            <el-table-column prop="productSpec" label="规格型号" />
-            <el-table-column prop="productUnit" label="单位" :formatter="(row) => dictValueLabel(row.productUnit, productUnit)" />
-            <el-table-column prop="count" label="退货数量" min-width="150">
-              <template #default="{ row, $index }">
-                <el-form-item :prop="'salesReturnDetailList.' + $index + '.count'" :rules="rules.count" :inline-message="true">
-                  <el-input-number onmousewheel="return false;" v-model="row.count" :precision="4" :controls="false" :min="0" />
-                </el-form-item>
-              </template>
-            </el-table-column>
-            <el-table-column prop="remark" label="退货原因" min-width="150">
-              <template #default="{ row, $index }">
-                <el-form-item :prop="'salesReturnDetailList.' + $index + '.remark'" :rules="rules.remark" :inline-message="true">
-                  <el-input v-model="row.remark" placeholder="请输入" type="textarea" />
-                </el-form-item>
-              </template>
-            </el-table-column>
-            <el-table-column prop="zip" label="操作" width="100">
-              <template #default="{ $index }">
-                <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </template>
-    </byForm>
-    <el-dialog v-if="openProduct" v-model="openProduct" title="选择货品" width="70%" append-to-body>
-      <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
-    </el-dialog>
-  </div>
-</template>
-
-<script setup>
-import byForm from "@/components/byForm/index";
-import { ElMessage } from "element-plus";
-import SelectGoods from "@/components/product/SelectGoods";
-import useUserStore from "@/store/modules/user";
-const { proxy } = getCurrentInstance();
-const route = useRoute();
-
-let formData = reactive({
-  data: {
-    supplyId: "",
-    salesReturnDetailList: [],
-    returnName: "",
-  },
-});
-
-let rules = ref({
-  supplyId: [{ required: true, message: "请选择供应商", trigger: "change" }],
-  count: [{ required: true, message: "请输入退货数量", trigger: "blur" }],
-  remark: [{ required: true, message: "请输入退货原因", trigger: "blur" }],
-});
-const formOption = reactive({
-  inline: true,
-  labelWidth: 100,
-  itemWidth: 100,
-});
-const formConfig = computed(() => {
-  return [
-    {
-      type: "input",
-      prop: "returnDept",
-      label: "申请部门",
-      itemWidth: 25,
-      disabled: true,
-      style: {
-        "margin-right": "10px",
-      },
-    },
-    {
-      type: "input",
-      prop: "returnName",
-      label: "申请人",
-      itemWidth: 25,
-      disabled: true,
-      style: {
-        "margin-right": "10px",
-      },
-    },
-    {
-      type: "date",
-      prop: "purchaseTime",
-      label: "申请时间",
-      itemWidth: 25,
-      disabled: true,
-      style: {
-        "margin-right": "10px",
-      },
-    },
-    {
-      type: "select",
-      prop: "supplyId",
-      label: "供应商",
-      isLoad: {
-        url: "/supplierInfo/page",
-        req: {
-          pageNum: 1,
-          pageSize: 9999,
-        },
-        labelKey: "name",
-        labelVal: "id",
-        method: "post",
-        resUrl: "rows",
-      },
-    },
-    {
-      type: "slot",
-      slotName: "details",
-      label: "退货明细",
-    },
-  ];
-});
-const formDom = ref(null);
-const handleSubmit = async () => {
-  const vaild = await formDom.value.handleSubmit(() => {}); //拿到内部表单是否验证通过
-  if (vaild) {
-    if (formData.data.salesReturnDetailList.length > 0) {
-      const list = formData.data.salesReturnDetailList;
-      for (let i = 0; i < list.length; i++) {
-        const e = list[i];
-        if (e.count == 0) {
-          ElMessage({
-            message: "退货数量不能为0!",
-            type: "info",
-          });
-          return false;
-        }
-      }
-      return true;
-    }
-    ElMessage({
-      message: "请添加退货明细!",
-      type: "info",
-    });
-    return false;
-  }
-};
-let openProduct = ref(false);
-const handleRemove = (index) => {
-  formData.data.salesReturnDetailList.splice(index, 1);
-  return ElMessage({
-    message: "删除成功!",
-    type: "success",
-  });
-};
-const pushGoods = (goods) => {
-  if (goods && goods.length > 0) {
-    let afterFiltering = [];
-    if (formData.data.salesReturnDetailList && formData.data.salesReturnDetailList.length > 0) {
-      afterFiltering = goods.filter((item) => {
-        let data = formData.data.salesReturnDetailList.filter((itemProduct) => itemProduct.bussinessId === item.id);
-        if (data && data.length > 0) {
-          return false;
-        }
-        return true;
-      });
-    } else {
-      afterFiltering = goods;
-    }
-    const arr = afterFiltering.map((x) => ({
-      goodType: x.goodType,
-      productCode: x.code,
-      productName: x.name,
-      productSpec: x.spec,
-      productUnit: x.unit,
-      count: 0,
-      bussinessId: x.id,
-      remark: "",
-    }));
-    formData.data.salesReturnDetailList = formData.data.salesReturnDetailList.concat(arr);
-    openProduct.value = false;
-    return ElMessage({
-      message: "添加成功!",
-      type: "success",
-    });
-  } else {
-    ElMessage("请选择至少一件物品");
-  }
-};
-
-// 接收父组件的传值
-const props = defineProps({
-  queryData: String,
-});
-
-// 获取用户信息并赋默认值
-const userInfo = useUserStore().user;
-onMounted(() => {
-  if (!route.query.processType) {
-    formData.data.purchaseTime = proxy.parseTime(new Date());
-    formData.data.returnDept = userInfo.dept.deptName;
-    formData.data.returnName = userInfo.nickName;
-  }
-});
-
-const judgeStatus = () => {
-  if (route.query.processType == 20 || route.query.processType == 10) {
-    return true;
-  }
-  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
-    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
-    if (data && data.length > 0) {
-      return true;
-    }
-  }
-  return false;
-};;
-
-watch(
-  props.queryData,
-  () => {
-    formOption.disabled = judgeStatus();
-    if (props.queryData && ["10", "20", "30"].includes(route.query.processType)) {
-      for (const key in props.queryData) {
-        formData.data[key] = props.queryData[key];
-      }
-    }
-  },
-  {
-    deep: true,
-  }
-);
-
-const productUnit = ref([]);
-const getDict = () => {
-  proxy.getDictOne(["unit"]).then((res) => {
-    productUnit.value = res["unit"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
-};
-getDict();
-
-const getFormData = () => {
-  return proxy.deepClone(formData.data);
-};
-// 向父组件暴露
-defineExpose({
-  getFormData,
-  handleSubmit,
-});
-const acquireSelectList = () => {
-  let data = [];
-  if (formData.data.salesReturnDetailList && formData.data.salesReturnDetailList.length > 0) {
-    data = formData.data.salesReturnDetailList.map((item) => {
-      return {
-        id: item.bussinessId,
-        name: item.productName,
-      };
-    });
-  }
-  return data;
-};
-</script>
-
-<style lang="scss" scoped></style>

+ 0 - 975
src/components/process/ServiceContract.vue

@@ -1,975 +0,0 @@
-<template>
-  <div style="width: 100%; padding: 0px 15px">
-    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
-      <template #seller>
-        <div style="width: 100%">
-          <el-form-item prop="sellCorporationId">
-            <el-select v-model="formData.data.sellCorporationId" style="width: 100%" disabled>
-              <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
-            </el-select>
-          </el-form-item>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="8">
-              <el-form-item label="地址" prop="sellCountryName">
-                <el-input v-model="formData.data.sellCountryName" placeholder="请输入国家" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label=" " prop="sellProvinceName">
-                <el-input v-model="formData.data.sellProvinceName" placeholder="请输入省/州" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label=" " prop="sellCityName">
-                <el-input v-model="formData.data.sellCityName" placeholder="请输入城市" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="24">
-              <el-form-item prop="sellAddress">
-                <el-input v-model="formData.data.sellAddress" type="textarea"> </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="8">
-              <el-form-item label="联系人" prop="sellContactName">
-                <el-input v-model="formData.data.sellContactName" placeholder="请输入联系人" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="16">
-              <el-form-item label=" " prop="sellContactNumber">
-                <el-input v-model="formData.data.sellContactNumber" placeholder="请输入联系人电话" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </div>
-      </template>
-      <template #buyer>
-        <div style="width: 100%">
-          <div style="width: 100%">
-            <el-form-item prop="buyCorporationId">
-              <el-select v-model="formData.data.buyCorporationId" filterable style="width: 100%" @change="changeCustomer">
-                <el-option v-for="item in customerList" :key="item.value" :label="item.label" :value="item.value" />
-              </el-select>
-            </el-form-item>
-            <el-row style="margin-top: 20px; width: 100%">
-              <el-col :span="6">
-                <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @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="6">
-                <el-form-item label=" " prop="provinceName">
-                  <selectCity
-                    placeholder="省/洲"
-                    @change="(val) => getCityData(val, '30', true)"
-                    addressId="provinceId"
-                    addressName="provinceName"
-                    v-model="formData.data"
-                    :data="provinceData">
-                  </selectCity>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label=" " prop="cityName">
-                  <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData"> </selectCity>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label=" " prop="buyPostalCode">
-                  <el-input v-model="formData.data.buyPostalCode" placeholder="请输入邮编" />
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row style="margin-top: 20px; width: 100%">
-              <el-col :span="24">
-                <el-form-item prop="buyAddress">
-                  <el-input v-model="formData.data.buyAddress" type="textarea"> </el-input>
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row style="margin-top: 20px; width: 100%">
-              <el-col :span="8">
-                <el-form-item label="联系人" prop="buyContactName">
-                  <el-autocomplete
-                    v-model="formData.data.buyContactName"
-                    :fetch-suggestions="querySearchPerson"
-                    clearable
-                    class="inline-input w-50"
-                    placeholder="请输入联系人"
-                    @select="handlePerson">
-                  </el-autocomplete>
-                </el-form-item>
-              </el-col>
-              <el-col :span="16">
-                <el-form-item label=" " prop="buyContactNumber">
-                  <el-input v-model="formData.data.buyContactNumber" placeholder="请输入联系人电话" />
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </div>
-        </div>
-      </template>
-      <template #sellerOther>
-        <div style="width: 100%">
-          <div v-if="judgeStatus()">
-            <div v-html="getStyle(formData.data.remark)"></div>
-          </div>
-          <Editor v-else :value="formData.data.remark" @updateValue="updateContentSeller" ref="remarkEditor" />
-        </div>
-      </template>
-      <template #commodity>
-        <div style="width: 100%">
-          <el-button @click="openProduct = true">添加商品</el-button>
-          <el-table :data="formData.data.serviceContractProductList" style="width: 100%; margin-top: 16px">
-            <el-table-column label="商品图片" width="80">
-              <template #default="{ row }">
-                <div v-if="row.fileUrl">
-                  <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
-                </div>
-                <div v-else></div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="code" label="商品编码" width="120" />
-            <el-table-column prop="name" label="商品中文名" width="160" />
-            <el-table-column label="商品英文名" min-width="200">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'serviceContractProductList.' + $index + '.productName'" :rules="rules.productName" :inline-message="true">
-                    <el-input v-model="row.productName" placeholder="请输入商品英文名" />
-                  </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="'serviceContractProductList.' + $index + '.productModel'" :rules="rules.productModel" :inline-message="true">
-                    <el-input v-model="row.productModel" placeholder="请输入规格型号" />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="unit" label="单位" width="100" />
-            <el-table-column label="数量" width="150">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'serviceContractProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.quantity"
-                      placeholder="请输入数量"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
-                        () => {
-                          return calculationAmount('serviceContractProductList', $index, 'quantity');
-                        }
-                      " />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column label="单价" width="160">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'serviceContractProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.price"
-                      placeholder="请输入单价"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
-                        () => {
-                          return calculationAmount('serviceContractProductList', $index, 'price');
-                        }
-                      " />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="amount" label="金额" width="100" />
-            <el-table-column align="center" label="操作" width="120" fixed="right">
-              <template #default="{ row, $index }">
-                <el-button type="primary" link @click="handleHandover(row, $index)">交接单</el-button>
-                <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </template>
-      <template #otherCharge>
-        <div style="width: 100%">
-          <el-button type="primary" @click="clickAdd()">添加行</el-button>
-          <el-table :data="formData.data.serviceContractPayList" style="width: 100%; margin-top: 16px">
-            <el-table-column label="收费项目" width="220">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'serviceContractPayList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true">
-                    <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50" placeholder="请输入收费项目" />
-                  </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="'serviceContractPayList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.amount"
-                      placeholder="请输入金额"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
-                        () => {
-                          return totalAmount('serviceContractPayList', $index, 'amount');
-                        }
-                      " />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column label="备注">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'serviceContractPayList.' + $index + '.remark'">
-                    <el-input v-model="row.remark" placeholder="请输入备注" />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="操作" width="80" fixed="right">
-              <template #default="{ row, $index }">
-                <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </template>
-      <template #offerMoney>
-        <div style="width: 100%">
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="4">
-              <el-form-item label="币种" prop="currency">
-                <el-select v-model="formData.data.currency" placeholder="请选择币种" style="width: 100%">
-                  <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="合同总金额" prop="amount">
-                <el-input v-model="formData.data.amount" placeholder="合同总金额" disabled />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="7">
-              <el-form-item label="付款方式" prop="paymentMethod">
-                <el-select v-model="formData.data.paymentMethod" placeholder="请选择付款方式" style="width: 100%">
-                  <el-option v-for="item in fundsPaymentMethod" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="7">
-              <el-form-item label="预付比例 (%)" prop="advanceRatio">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.advanceRatio"
-                  placeholder="请输入预付比例"
-                  style="width: 100%"
-                  :precision="2"
-                  :controls="false"
-                  :min="0"
-                  :max="100" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="7">
-              <el-form-item label="收款账号" prop="shroffAccountId">
-                <el-select v-model="formData.data.shroffAccountId" placeholder="请选择收款账号" style="width: 100%">
-                  <el-option v-for="item in accountList" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </div>
-      </template>
-    </byForm>
-
-    <el-dialog v-if="openProduct" v-model="openProduct" title="选择商品" width="70%" append-to-body>
-      <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
-    </el-dialog>
-
-    <el-dialog title="交接单" v-if="openHandover" v-model="openHandover" width="800">
-      <byForm :formConfig="formHandoverConfig" :formOption="formOption" v-model="productRow.data">
-        <template #remark>
-          <div style="width: 100%">
-            <Editor :value="productRow.data.remark" @updateValue="updateContent" />
-          </div>
-        </template>
-        <template #file>
-          <div style="width: 100%">
-            <el-upload
-              v-model:fileList="fileList"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              multiple
-              :before-upload="uploadFile"
-              :on-success="handleSuccess"
-              :on-preview="onPreviewFile">
-              <el-button>选择</el-button>
-            </el-upload>
-          </div>
-        </template>
-      </byForm>
-      <template #footer>
-        <el-button @click="openHandover = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitHandoverForm()" size="large">确 定</el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-
-<script setup>
-import byForm from "@/components/byForm/index";
-import SelectGoods from "@/components/product/SelectGoods";
-import { ElMessage } from "element-plus";
-import Editor from "@/components/Editor/index.vue";
-import selectCity from "@/components/selectCity/index.vue";
-import { useRoute } from "vue-router";
-
-const route = useRoute();
-// 接收父组件的传值
-const props = defineProps({
-  queryData: Object,
-});
-const { proxy } = getCurrentInstance();
-const accountCurrency = ref([]);
-const fundsPaymentMethod = ref([]);
-const templateList = ref([]);
-const corporationList = ref([]);
-const customerList = ref([]);
-const countryData = ref([]);
-const provinceData = ref([]);
-const cityData = ref([]);
-const customerUserList = ref([]);
-const accountList = ref([]);
-const openProduct = ref(false);
-const formData = reactive({
-  data: {
-    remark: "",
-    amount: undefined,
-    serviceContractProductList: [],
-    serviceContractPayList: [],
-  },
-});
-const submit = ref(null);
-const judgeStatus = () => {
-  if (route.query.processType == 20 || route.query.processType == 10) {
-    return true;
-  }
-  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
-    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
-    if (data && data.length > 0) {
-      return true;
-    }
-  }
-  return false;
-};
-const formOption = reactive({
-  inline: true,
-  labelWidth: 100,
-  itemWidth: 100,
-  rules: [],
-  disabled: false,
-});
-const formConfig = computed(() => {
-  return [
-    {
-      type: "title",
-      title: "合同模板",
-      label: "",
-    },
-    {
-      type: "select",
-      label: "选择合同模板",
-      prop: "contractTemplateId",
-      data: templateList.value,
-      fn: (val) => {
-        changeTemplate(val);
-      },
-    },
-    {
-      type: "slot",
-      slotName: "seller",
-      label: "卖方信息",
-      itemWidth: 50,
-    },
-    {
-      type: "slot",
-      slotName: "buyer",
-      label: "买方信息",
-      itemWidth: 50,
-    },
-    {
-      type: "slot",
-      slotName: "sellerOther",
-      label: "卖方信息",
-    },
-    {
-      type: "slot",
-      slotName: "commodity",
-      label: "商品信息",
-    },
-    {
-      type: "slot",
-      slotName: "otherCharge",
-      label: "其他收费项目",
-    },
-    {
-      type: "slot",
-      slotName: "offerMoney",
-      label: "收款信息",
-    },
-  ];
-});
-const rules = ref({
-  contractTemplateId: [{ required: true, message: "请选择合同模板", trigger: "change" }],
-  buyCorporationId: [{ required: true, message: "请选择公司", trigger: "change" }],
-  countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
-  sellAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
-  buyAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
-  buyContactName: [{ required: true, message: "请输入联系人", trigger: ["change", "blur"] }],
-  buyContactNumber: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
-  productName: [{ required: true, message: "请输入商品英文名", trigger: "blur" }],
-  productModel: [{ required: true, message: "请输入规格型号", trigger: "blur" }],
-  quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
-  price: [{ required: true, message: "请输入单价", trigger: "blur" }],
-  amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
-  payName: [{ required: true, message: "请输入收费项目", trigger: ["change", "blur"] }],
-  currency: [{ required: true, message: "请选择币种", trigger: "change" }],
-  paymentMethod: [{ required: true, message: "请选择付款方式", trigger: "change" }],
-  advanceRatio: [{ required: true, message: "请输入预付比例", trigger: "blur" }],
-  shroffAccountId: [{ required: true, message: "请选择收款账号", trigger: "change" }],
-});
-const getDict = () => {
-  proxy.getDictOne(["account_currency", "funds_payment_method"]).then((res) => {
-    accountCurrency.value = res["account_currency"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    fundsPaymentMethod.value = res["funds_payment_method"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
-  proxy.post("/contractTemplate/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    templateList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.templateName,
-        value: item.id,
-      };
-    });
-  });
-  proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    corporationList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.name,
-        value: item.id,
-      };
-    });
-  });
-  proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 }).then((res) => {
-    customerList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.name,
-        value: item.id,
-      };
-    });
-  });
-  proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    accountList.value = res.rows.map((item) => {
-      return {
-        label: item.alias,
-        value: item.id,
-      };
-    });
-  });
-};
-getDict();
-const changeTemplate = (val) => {
-  formData.data.sellCorporationId = "";
-  formData.data.sellContactName = "";
-  formData.data.sellContactNumber = "";
-  formData.data.sellCountryName = "";
-  formData.data.sellProvinceName = "";
-  formData.data.sellCityName = "";
-  formData.data.sellAddress = "";
-  if (val) {
-    proxy.post("/contractTemplate/detail", { id: val }).then((res) => {
-      formData.data.sellCorporationId = res.corporationId;
-      if (res.corporationId) {
-        proxy.post("/corporation/detail", { id: res.corporationId }).then((detailCorporation) => {
-          if (detailCorporation.countryEnStr) {
-            formData.data.sellCountryName = detailCorporation.countryEnStr;
-          }
-          if (detailCorporation.provinceEnStr) {
-            formData.data.sellProvinceName = detailCorporation.provinceEnStr;
-          }
-          if (detailCorporation.cityEnStr) {
-            formData.data.sellCityName = detailCorporation.cityEnStr;
-          }
-          if (detailCorporation.addressEn) {
-            formData.data.sellAddress = detailCorporation.addressEn;
-          }
-          // proxy.post("/customizeArea/list", { parentId: "0" }).then((resCountry) => {
-          //   let sellCountryData = resCountry.filter((item) => item.id === detailCorporation.countryId);
-          //   if (sellCountryData && sellCountryData.length > 0) {
-          //     formData.data.sellCountryName = sellCountryData[0].chineseName;
-          //   } else {
-          //     formData.data.sellCountryName = "";
-          //   }
-          // });
-          // if (detailCorporation.countryId) {
-          //   proxy.post("/customizeArea/list", { parentId: detailCorporation.countryId }).then((resProvince) => {
-          //     let sellProvinceData = resProvince.filter((item) => item.id === detailCorporation.provinceId);
-          //     if (sellProvinceData && sellProvinceData.length > 0) {
-          //       formData.data.sellProvinceName = sellProvinceData[0].name;
-          //     } else {
-          //       formData.data.sellProvinceName = "";
-          //     }
-          //   });
-          // } else {
-          //   formData.data.sellProvinceName = "";
-          // }
-          // if (detailCorporation.provinceId) {
-          //   proxy.post("/customizeArea/list", { parentId: detailCorporation.provinceId }).then((resCity) => {
-          //     let sellCityData = resCity.filter((item) => item.id === detailCorporation.cityId);
-          //     if (sellCityData && sellCityData.length > 0) {
-          //       formData.data.sellCityName = sellCityData[0].name;
-          //     } else {
-          //       formData.data.sellCityName = "";
-          //     }
-          //   });
-          // } else {
-          //   formData.data.sellCityName = "";
-          // }
-          // formData.data.sellAddress = detailCorporation.address;
-        });
-      }
-      formData.data.sellContactName = res.contactName;
-      formData.data.sellContactNumber = res.contactNumber;
-    });
-  }
-};
-const getCityData = (id, type, isChange) => {
-  proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
-    if (type === "20") {
-      provinceData.value = res;
-      if (isChange) {
-        formData.data.provinceId = "";
-        formData.data.provinceName = "";
-        formData.data.cityId = "";
-        formData.data.cityName = "";
-      }
-    } else if (type === "30") {
-      cityData.value = res;
-      if (isChange) {
-        formData.data.cityId = "";
-        formData.data.cityName = "";
-      }
-    } else {
-      countryData.value = res;
-    }
-  });
-};
-getCityData("0");
-const changeCustomer = (val) => {
-  formData.data.buyContactName = "";
-  formData.data.buyContactNumber = "";
-  if (val) {
-    proxy.post("/customer/detail", { id: val }).then(
-      (res) => {
-        if (res.customerUserList && res.customerUserList.length > 0) {
-          formData.data.buyContactName = res.customerUserList[0].name;
-          if (res.customerUserList[0].contactJson) {
-            let contactJson = JSON.parse(res.customerUserList[0].contactJson);
-            if (contactJson && contactJson.length > 0) {
-              formData.data.buyContactNumber = contactJson[0].contactNo;
-            }
-          }
-          customerUserList.value = res.customerUserList.map((item) => {
-            return {
-              ...item,
-              value: item.name,
-            };
-          });
-        }
-        formData.data.countryId = res.countryId;
-        formData.data.provinceId = res.provinceId;
-        formData.data.cityId = res.cityId;
-        formData.data.buyPostalCode = res.zipCode;
-        formData.data.buyAddress = res.address;
-        getCityData(formData.data.countryId, "20");
-        if (formData.data.provinceId) {
-          getCityData(formData.data.provinceId, "30");
-        }
-      },
-      (err) => {
-        console.log(err);
-        formData.data.countryId = "";
-        formData.data.provinceId = "";
-        formData.data.cityId = "";
-        formData.data.buyPostalCode = "";
-        formData.data.buyAddress = "";
-      }
-    );
-  } else {
-    formData.data.countryId = "";
-    formData.data.provinceId = "";
-    formData.data.cityId = "";
-    formData.data.buyPostalCode = "";
-    formData.data.buyAddress = "";
-  }
-};
-const createFilter = (queryString) => {
-  return (restaurant) => {
-    return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
-  };
-};
-const querySearchPerson = (queryString, callback) => {
-  const results = queryString ? customerUserList.value.filter(createFilter(queryString)) : customerUserList.value;
-  callback(results);
-};
-const handlePerson = (item) => {
-  formData.data.buyContactNumber = item.phone;
-};
-const pushGoods = (goods) => {
-  if (goods && goods.length > 0) {
-    let afterFiltering = [];
-    if (formData.data.serviceContractProductList && formData.data.serviceContractProductList.length > 0) {
-      afterFiltering = goods.filter((item) => {
-        let data = formData.data.serviceContractProductList.filter((itemProduct) => itemProduct.productId === item.id);
-        if (data && data.length > 0) {
-          return false;
-        }
-        return true;
-      });
-    } else {
-      afterFiltering = goods;
-    }
-    formData.data.serviceContractProductList = formData.data.serviceContractProductList.concat(
-      afterFiltering.map((item) => {
-        let fileUrl = "";
-        if (item.fileList && item.fileList.length > 0) {
-          fileUrl = item.fileList[0].fileUrl;
-        }
-        let name = item.name;
-        if (item.standardJson) {
-          let standardJson = JSON.parse(item.standardJson);
-          if (standardJson && standardJson.englishName) {
-            name = standardJson.englishName;
-          }
-        }
-        return {
-          fileUrl: fileUrl,
-          code: item.code,
-          productId: item.id,
-          name: item.name,
-          productName: name,
-          productModel: item.spec,
-          unit: item.unit,
-          quantity: undefined,
-          price: undefined,
-          amount: "",
-          remark: "",
-          fileList: [],
-        };
-      })
-    );
-    ElMessage({
-      message: "添加成功!",
-      type: "success",
-    });
-    openProduct.value = false;
-  } else {
-    ElMessage("请选择至少一件商品");
-  }
-};
-const onPicture = (path) => {
-  window.open(path, "_blank");
-};
-const productRow = reactive({
-  data: {
-    productName: "",
-    productModel: "",
-    remark: "",
-  },
-});
-const productIndex = ref(0);
-const openHandover = ref(false);
-const fileList = ref([]);
-const uploadData = ref({});
-const formHandoverConfig = computed(() => {
-  return [
-    {
-      type: "title",
-      title: "产品信息",
-      label: "",
-    },
-    {
-      type: "input",
-      prop: "productName",
-      label: "产品名称",
-      itemType: "text",
-      disabled: true,
-    },
-    {
-      type: "input",
-      prop: "productModel",
-      label: "规格型号",
-      itemType: "text",
-      disabled: true,
-    },
-    {
-      type: "slot",
-      slotName: "remark",
-      label: "交接单",
-    },
-    {
-      type: "slot",
-      prop: "file",
-      slotName: "file",
-      label: "上传附件",
-    },
-  ];
-});
-const handleHandover = (row, index) => {
-  productRow.data = {
-    productName: row.productName,
-    productModel: row.productModel,
-    remark: row.remark,
-  };
-  if (row.fileList && row.fileList.length > 0) {
-    fileList.value = row.fileList.map((item) => {
-      return {
-        raw: item,
-        name: item.fileName,
-        url: item.fileUrl,
-      };
-    });
-  } else {
-    fileList.value = [];
-  }
-  productIndex.value = index;
-  openHandover.value = true;
-};
-const updateContent = (val) => {
-  productRow.data.remark = val;
-};
-const remarkEditor = ref(null);
-const updateContentSeller = (val) => {
-  formData.data.remark = val;
-};
-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;
-  file.uploadState = true;
-  return true;
-};
-const handleSuccess = (any, UploadFile) => {
-  UploadFile.raw.uploadState = false;
-};
-const onPreviewFile = (file) => {
-  window.open(file.raw.fileUrl, "_blank");
-};
-const submitHandoverForm = () => {
-  formData.data.serviceContractProductList[productIndex.value].remark = productRow.data.remark;
-  if (fileList.value && fileList.value.length > 0) {
-    for (let i = 0; i < fileList.value.length; i++) {
-      if (fileList.value[i].raw.uploadState) {
-        ElMessage("文件上传中,请稍后提交");
-        return;
-      }
-    }
-    formData.data.serviceContractProductList[productIndex.value].fileList = fileList.value.map((item) => {
-      return {
-        id: item.raw.id,
-        fileName: item.raw.fileName,
-        fileUrl: item.raw.fileUrl,
-        uploadState: item.raw.uploadState,
-      };
-    });
-  } else {
-    formData.data.serviceContractProductList[productIndex.value].fileList = [];
-  }
-  openHandover.value = false;
-};
-const handleRemove = async (index) => {
-  await formData.data.serviceContractProductList.splice(index, 1);
-  totalAmount();
-};
-const calculationAmount = (listLabel, index, label) => {
-  if (formData.data[listLabel][index][label]) {
-    formData.data[listLabel][index][label] = Number(Math.round(Number(formData.data[listLabel][index][label]) * 10000) / 10000);
-  }
-  nextTick(() => {
-    if (formData.data.serviceContractProductList && formData.data.serviceContractProductList.length > 0) {
-      for (let i = 0; i < formData.data.serviceContractProductList.length; i++) {
-        let money = 0;
-        if (formData.data.serviceContractProductList[i].quantity && formData.data.serviceContractProductList[i].price) {
-          money = Number(
-            Math.round(Number(formData.data.serviceContractProductList[i].quantity) * Number(formData.data.serviceContractProductList[i].price) * 10000) / 10000
-          );
-        }
-        formData.data.serviceContractProductList[i].amount = money;
-      }
-    }
-    nextTick(() => {
-      totalAmount();
-    });
-  });
-};
-const totalAmount = (listLabel, index, label) => {
-  if (listLabel && formData.data[listLabel][index][label]) {
-    formData.data[listLabel][index][label] = Number(Math.round(Number(formData.data[listLabel][index][label]) * 10000) / 10000);
-  }
-  let money = 0;
-  if (formData.data.serviceContractProductList && formData.data.serviceContractProductList.length > 0) {
-    for (let i = 0; i < formData.data.serviceContractProductList.length; i++) {
-      if (formData.data.serviceContractProductList[i].amount) {
-        money = Number(Math.round((Number(money) + Number(formData.data.serviceContractProductList[i].amount)) * 10000) / 10000);
-      }
-    }
-  }
-  if (formData.data.serviceContractPayList && formData.data.serviceContractPayList.length > 0) {
-    for (let i = 0; i < formData.data.serviceContractPayList.length; i++) {
-      if (formData.data.serviceContractPayList[i].amount) {
-        money = Number(Math.round((Number(money) + Number(formData.data.serviceContractPayList[i].amount)) * 10000) / 10000);
-      }
-    }
-  }
-  formData.data.amount = money;
-};
-const clickAdd = () => {
-  if (formData.data.serviceContractPayList && formData.data.serviceContractPayList.length > 0) {
-    formData.data.serviceContractPayList.push({
-      payName: "",
-      amount: undefined,
-      remark: "",
-    });
-  } else {
-    formData.data.serviceContractPayList = [{ payName: "", amount: undefined, remark: "" }];
-  }
-};
-const handleDelete = async (index) => {
-  await formData.data.serviceContractPayList.splice(index, 1);
-  totalAmount();
-};
-const querySearch = (queryString, callback) => {
-  proxy.post("/serviceContractPay/page", { payName: queryString }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      res.rows = res.rows.map((item) => {
-        return {
-          ...item,
-          value: item.payName,
-        };
-      });
-      callback(res.rows);
-    } else {
-      callback([]);
-    }
-  });
-};
-const handleSubmit = async () => {
-  let status = await submit.value.handleSubmit(() => {});
-  if (status) {
-    if (!(formData.data.serviceContractProductList && formData.data.serviceContractProductList.length > 0)) {
-      ElMessage("请添加至少一件商品");
-      return false;
-    }
-    return true;
-  } else {
-    setTimeout(() => {
-      const errorDiv = document.getElementsByClassName("is-error");
-      errorDiv[0].scrollIntoView();
-    }, 0);
-  }
-  return status;
-};
-const getFormData = () => {
-  return proxy.deepClone(formData.data);
-};
-// 向父组件暴露
-defineExpose({
-  getFormData,
-  handleSubmit,
-});
-const getStyle = (text) => {
-  if (text) {
-    return text.replace(/\n|\r\n/g, "<br>");
-  } else {
-    return "";
-  }
-};
-watch(
-  props.queryData,
-  () => {
-    formOption.disabled = judgeStatus();
-    if (props.queryData && ["10", "20", "30"].includes(route.query.processType)) {
-      for (var text in props.queryData) {
-        formData.data[text] = props.queryData[text];
-      }
-      if (formData.data.countryId) {
-        getCityData(formData.data.countryId, "20");
-      }
-      if (formData.data.provinceId) {
-        getCityData(formData.data.provinceId, "30");
-      }
-      remarkEditor.value.changeHtml(formData.data.remark);
-    }
-  },
-  {
-    deep: true,
-  }
-);
-const acquireSelectList = () => {
-  let data = [];
-  if (formData.data.serviceContractProductList && formData.data.serviceContractProductList.length > 0) {
-    data = formData.data.serviceContractProductList.map((item) => {
-      return {
-        id: item.productId,
-        name: item.name,
-      };
-    });
-  }
-  return data;
-};
-</script>
-
-<style lang="scss" scoped>
-::v-deep(.el-input-number .el-input__inner) {
-  text-align: left;
-}
-.pic {
-  object-fit: contain;
-  width: 50px;
-  height: 50px;
-  cursor: pointer;
-  vertical-align: middle;
-}
-</style>

+ 40 - 7
src/components/webDiskData/treeList.vue

@@ -4,7 +4,13 @@
       {{ title }}
     </div>
     <div class="search">
-      <el-input v-model="search" placeholder="请输入搜索内容" clearable @clear="search = ''" @keyup.enter="searchChange"></el-input>
+      <el-input
+        v-model="search"
+        placeholder="请输入搜索内容"
+        clearable
+        @clear="search = ''"
+        @keyup.enter="searchChange"
+      ></el-input>
       <el-button type="primary" plain @click="add({ id: '-1' })">
         <el-icon :size="20">
           <Plus />
@@ -19,7 +25,8 @@
       @node-click="treeChange"
       default-expand-all
       :expand-on-click-node="false"
-      :filter-node-method="filterNode">
+      :filter-node-method="filterNode"
+    >
       <template #default="{ node, data }">
         <div class="custom-tree-node">
           <div style="flex: 1">{{ data.name }}</div>
@@ -27,21 +34,47 @@
             <el-icon :size="17" @click.stop="() => edit(node, data)">
               <Edit />
             </el-icon>
-            <el-icon :size="17" style="margin-left: 10px" @click.stop="() => add(data)">
+            <el-icon
+              :size="17"
+              style="margin-left: 10px"
+              @click.stop="() => add(data)"
+            >
               <Plus />
             </el-icon>
-            <el-icon :size="17" style="margin-left: 10px" @click.stop="() => del(data)">
+            <el-icon
+              :size="17"
+              style="margin-left: 10px"
+              @click.stop="() => del(data)"
+            >
               <Delete />
             </el-icon>
           </div>
         </div>
       </template>
     </el-tree>
-    <el-dialog :title="treeModalType == 'add' ? '添加目录' : '编辑目录'" v-model="treeModal" width="400" v-loading="loading">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit"> </byForm>
+    <el-dialog
+      :title="treeModalType == 'add' ? '添加目录' : '编辑目录'"
+      v-model="treeModal"
+      width="400"
+      v-loading="loading"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="submit"
+      >
+      </byForm>
       <template #footer>
         <el-button @click="treeModal = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large" :loading="submitLoading">确 定</el-button>
+        <el-button
+          type="primary"
+          @click="submitForm()"
+          size="large"
+          :loading="submitLoading"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
   </div>

+ 49 - 31
src/layout/components/Navbar.vue

@@ -1,8 +1,21 @@
 <template>
   <div class="navbar">
-    <hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
-    <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!settingsStore.topNav" />
-    <top-nav id="topmenu-container" class="topmenu-container" v-if="settingsStore.topNav" />
+    <hamburger
+      id="hamburger-container"
+      :is-active="appStore.sidebar.opened"
+      class="hamburger-container"
+      @toggleClick="toggleSideBar"
+    />
+    <breadcrumb
+      id="breadcrumb-container"
+      class="breadcrumb-container"
+      v-if="!settingsStore.topNav"
+    />
+    <top-nav
+      id="topmenu-container"
+      class="topmenu-container"
+      v-if="settingsStore.topNav"
+    />
 
     <div class="right-menu">
       <template v-if="appStore.device !== 'mobile'">
@@ -23,7 +36,11 @@
         </el-tooltip>
       </template>
       <div class="avatar-container">
-        <el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click">
+        <el-dropdown
+          @command="handleCommand"
+          class="right-menu-item hover-effect"
+          trigger="click"
+        >
           <div class="avatar-wrapper">
             <img :src="userStore.avatar" class="user-avatar" />
             <el-icon><caret-bottom /></el-icon>
@@ -48,25 +65,24 @@
 </template>
 
 <script setup>
-import { ElMessageBox } from 'element-plus'
-import Breadcrumb from '@/components/Breadcrumb'
-import TopNav from '@/components/TopNav'
-import Hamburger from '@/components/Hamburger'
-import Screenfull from '@/components/Screenfull'
-import SizeSelect from '@/components/SizeSelect'
-import HeaderSearch from '@/components/HeaderSearch'
-import RuoYiGit from '@/components/RuoYi/Git'
-import RuoYiDoc from '@/components/RuoYi/Doc'
-import useAppStore from '@/store/modules/app'
-import useUserStore from '@/store/modules/user'
-import useSettingsStore from '@/store/modules/settings'
-
-const appStore = useAppStore()
-const userStore = useUserStore()
-const settingsStore = useSettingsStore()
+import { ElMessageBox } from "element-plus";
+import Breadcrumb from "@/components/Breadcrumb";
+import TopNav from "@/components/TopNav";
+import Hamburger from "@/components/Hamburger";
+import Screenfull from "@/components/Screenfull";
+import SizeSelect from "@/components/SizeSelect";
+import RuoYiGit from "@/components/RuoYi/Git";
+import RuoYiDoc from "@/components/RuoYi/Doc";
+import useAppStore from "@/store/modules/app";
+import useUserStore from "@/store/modules/user";
+import useSettingsStore from "@/store/modules/settings";
+
+const appStore = useAppStore();
+const userStore = useUserStore();
+const settingsStore = useSettingsStore();
 
 function toggleSideBar() {
-  appStore.toggleSideBar()
+  appStore.toggleSideBar();
 }
 
 function handleCommand(command) {
@@ -83,20 +99,22 @@ function handleCommand(command) {
 }
 
 function logout() {
-  ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
-    confirmButtonText: '确定',
-    cancelButtonText: '取消',
-    type: 'warning'
-  }).then(() => {
-    userStore.logOut().then(() => {
-      location.href = '/index';
+  ElMessageBox.confirm("确定注销并退出系统吗?", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      userStore.logOut().then(() => {
+        location.href = "/index";
+      });
     })
-  }).catch(() => { });
+    .catch(() => {});
 }
 
-const emits = defineEmits(['setLayout'])
+const emits = defineEmits(["setLayout"]);
 function setLayout() {
-  emits('setLayout');
+  emits("setLayout");
 }
 </script>
 

+ 0 - 3
src/main.js

@@ -65,8 +65,6 @@ import {
 import Pagination from '@/components/Pagination'
 // 自定义表格工具组件
 import RightToolbar from '@/components/RightToolbar'
-// 文件上传组件
-import FileUpload from "@/components/FileUpload"
 // 图片上传组件
 import ImageUpload from "@/components/ImageUpload"
 // 图片预览组件
@@ -116,7 +114,6 @@ app.config.globalProperties.compareTime = compareTime
 app.component('DictTag', DictTag)
 app.component('Pagination', Pagination)
 app.component('TreeSelect', TreeSelect)
-app.component('FileUpload', FileUpload)
 app.component('ImageUpload', ImageUpload)
 app.component('ImagePreview', ImagePreview)
 app.component('RightToolbar', RightToolbar)

+ 0 - 752
src/views/JXSK/production/bom/index.vue

@@ -1,752 +0,0 @@
-<template>
-  <div class="tenant">
-    <!-- <Banner /> -->
-    <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        highlight-current-row
-        :selectConfig="selectConfig"
-        :table-events="{
-          //element talbe事件都能传
-          select: select,
-        }"
-        :action-list="[
-          {
-            text: '添加BOM',
-            action: () => openModal('add'),
-          },
-        ]"
-        @get-list="getList"
-      >
-        <template #versionSlot="{ item }">
-          <div
-            style="cursor: pointer; color: #409eff"
-            @click="hanldeOpenVer(item)"
-          >
-            v{{ item.versionNumber }}
-          </div>
-        </template>
-      </byTable>
-    </div>
-    <el-dialog
-      :title="titleText"
-      v-model="dialogVisible"
-      width="800"
-      v-loading="submitLoading"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
-        <template #slotFile>
-          <div>
-            <el-upload
-              v-model:fileList="fileList"
-              :show-file-list="false"
-              class="upload-demo"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              :before-upload="handleBeforeUpload"
-              accept=".rar,.zip"
-            >
-              <el-button type="primary">选 择</el-button>
-            </el-upload>
-            <div>
-              <div style="margin-top: 15px">
-                <el-tag
-                  style="margin-right: 10px"
-                  class="ml-2"
-                  type="info"
-                  v-for="(item, index) in fileListCopy"
-                  :key="index"
-                  >{{ item.fileName }}</el-tag
-                >
-              </div>
-            </div>
-          </div>
-        </template>
-        <template #slot>
-          <div>
-            <el-button type="primary" plain @click="openMaterial = true"
-              >添加物料/半成品</el-button
-            >
-            <el-button type="primary" plain> Excel导入</el-button>
-            <el-form
-              ref="tableForm"
-              :model="formData.data"
-              :rules="rules"
-              label-width="0px"
-              style="margin-top: 15px"
-            >
-              <el-table :data="formData.data.bomDetailList">
-                <el-table-column prop="productCode" label="物料编码" />
-                <el-table-column prop="productName" label="物料名称" />
-                <el-table-column
-                  prop="productUnit"
-                  label="单位"
-                  :formatter="
-                    (row) => dictValueLabel(row.productUnit, materialUnit)
-                  "
-                />
-                <el-table-column prop="quantity" label="数量" width="150">
-                  <template #default="{ row, $index }">
-                    <el-form-item
-                      :prop="'bomDetailList.' + $index + '.quantity'"
-                      :rules="rules.quantity"
-                      :inline-message="true"
-                    >
-                      <el-input-number
-                        v-model="row.quantity"
-                        :precision="2"
-                        :controls="false"
-                        :min="1"
-                      />
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-                <el-table-column prop="zip" label="成本" width="150">
-                  <template #default="{ row, $index }">
-                    <el-form-item
-                      :prop="'bomDetailList.' + $index + '.cost'"
-                      :rules="rules.cost"
-                      :inline-message="true"
-                    >
-                      <el-input-number
-                        v-model="row.cost"
-                        :precision="2"
-                        :controls="false"
-                        :min="1"
-                      />
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-                <el-table-column prop="zip" label="操作" width="100">
-                  <template #default="{ $index }">
-                    <el-button type="primary" link @click="handleRemove($index)"
-                      >删除</el-button
-                    >
-                  </template>
-                </el-table-column>
-              </el-table>
-            </el-form>
-          </div>
-        </template>
-      </byForm>
-      <template #footer>
-        <div v-if="isShowBtns">
-          <el-button @click="dialogVisible = false" size="large"
-            >取 消</el-button
-          >
-          <el-button
-            type="primary"
-            @click="submitForm('byform')"
-            size="large"
-            :loading="submitLoading"
-          >
-            确 定
-          </el-button>
-        </div>
-      </template>
-    </el-dialog>
-
-    <el-dialog
-      v-model="openMaterial"
-      title="选择物料/半成品"
-      width="70%"
-      append-to-body
-    >
-      <SelectMaterial @handleSelect="handleSelect"></SelectMaterial>
-      <template #footer>
-        <span class="dialog-footer">
-          <el-button @click="openMaterial = false">取消</el-button>
-        </span>
-      </template>
-    </el-dialog>
-
-    <el-dialog v-model="openVersion" title="切换版本" width="30%">
-      <byForm
-        :formConfig="formConfig1"
-        :formOption="formOption"
-        v-model="formData.data1"
-        :rules="rules1"
-        ref="byform1"
-      >
-        <template #versionSlot>
-          <div>
-            <el-select
-              v-model="formData.data1.versionNumber"
-              placeholder="请选择版本号"
-              @change="changeRowData"
-            >
-              <el-option
-                v-for="item in versionData"
-                :label="'v' + item.versionNumber"
-                :value="item.versionNumber"
-              />
-            </el-select>
-            <el-button
-              type="primary"
-              link
-              style="margin-left: 10px"
-              @click="handleGetDetails"
-              v-if="formData.data1.versionNumber"
-              >查看</el-button
-            >
-          </div>
-        </template>
-      </byForm>
-      <template #footer>
-        <el-button @click="openVersion = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="handleChangeVer('byform1')"
-          size="large"
-        >
-          确 定
-        </el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-  
-<script setup>
-/* eslint-disabled vue/no-unused-components */
-import { ElMessage, ElMessageBox } from "element-plus";
-import byTable from "@/components/byTable/index";
-import byForm from "@/components/byForm/index";
-import { computed, defineComponent, ref, watch, watchEffect } from "vue";
-import SelectMaterial from "@/components/product/SelectMaterial";
-const uploadData = ref({});
-let fileList = ref([]);
-let fileListCopy = ref([]);
-const loading = ref(false);
-const submitLoading = ref(false);
-const sourceList = ref({
-  data: [],
-  pagination: {
-    total: 3,
-    pageNum: 1,
-    pageSize: 10,
-  },
-});
-let dialogVisible = ref(false);
-let openMaterial = ref(false);
-let openVersion = ref(false);
-let titleText = ref("");
-let modalType = ref("add");
-let rules = ref({
-  productId: [{ required: true, message: "请选择产品", trigger: "change" }],
-  quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
-  cost: [{ required: true, message: "请输入成本", trigger: "blur" }],
-  personLiableId: [
-    { required: true, message: "请选择负责人", trigger: "change" },
-  ],
-});
-let rules1 = ref({
-  versionNumber: [
-    { required: true, message: "请选择版本号", trigger: "change" },
-  ],
-});
-
-const { proxy } = getCurrentInstance();
-const selectConfig = reactive([
-  // {
-  //   label: "车间类型",
-  //   prop: "type",
-  //   data: [
-  //     {
-  //       label: "普通车间",
-  //       value: "1",
-  //     },
-  //     {
-  //       label: "半自动化车间",
-  //       value: "2",
-  //     },
-  //     {
-  //       label: "自动化车间",
-  //       value: "3",
-  //     },
-  //   ],
-  // },
-]);
-const config = computed(() => {
-  return [
-    {
-      attrs: {
-        label: "产品类型",
-        prop: "productType",
-        width: 100,
-      },
-      render(productType) {
-        return productType ? "成品" : "半成品";
-      },
-    },
-    {
-      attrs: {
-        label: "产品编码",
-        prop: "productCode",
-        width: 150,
-      },
-    },
-    {
-      attrs: {
-        label: "产品名称",
-        prop: "productName",
-      },
-    },
-    {
-      attrs: {
-        label: "状态",
-        prop: "status",
-      },
-      render(status) {
-        return status === 1 ? "启用" : "禁用";
-      },
-    },
-    {
-      attrs: {
-        label: "当前版本",
-        prop: "versionNumber",
-        slot: "versionSlot",
-      },
-    },
-    {
-      attrs: {
-        label: "最近维护人",
-        prop: "updateUserName",
-      },
-    },
-    {
-      attrs: {
-        label: "最近维护时间",
-        prop: "updateTime",
-      },
-    },
-    // {
-    //   attrs: {
-    //     label: "BOM文件",
-    //     prop: "type",
-    //     width: 120,
-    //   },
-    //   render(type) {
-    //     return type == 1
-    //       ? "普通车间"
-    //       : type == 2
-    //       ? "半自动化车间"
-    //       : type == "3"
-    //       ? "自动化车间"
-    //       : "";
-    //   },
-    // },
-
-    {
-      attrs: {
-        label: "操作",
-        width: "200",
-        align: "right",
-      },
-      // 渲染 el-button,一般用在最后一列。
-      renderHTML(row) {
-        return [
-          {
-            attrs: {
-              label: "新建版本",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              getDtl(row, "add", true);
-            },
-          },
-          {
-            attrs: {
-              label: "修改",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              getDtl(row, "edit");
-            },
-          },
-          {
-            attrs: {
-              label: row.status === 1 ? "禁用" : "启用",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              ElMessageBox.confirm(
-                `是否${row.status === 1 ? "禁用" : "启用"} ?`,
-                "提示",
-                {
-                  confirmButtonText: "确定",
-                  cancelButtonText: "取消",
-                  type: "warning",
-                }
-              ).then(() => {
-                proxy.post("/bomInfo/detail", { id: row.id }).then((res) => {
-                  res.bomDetailList = res.bomDetailVoList;
-                  res.status = row.status ? 0 : 1;
-                  formData.data = res;
-                  proxy.post("/bomInfo/edit", formData.data).then((res) => {
-                    ElMessage({
-                      message: "操作成功",
-                      type: "success",
-                    });
-                    getList();
-                  });
-                });
-              });
-            },
-          },
-          // {
-          //   attrs: {
-          //     label: "删除",
-          //     type: "danger",
-          //     text: true,
-          //   },
-          //   el: "button",
-          //   click() {
-          //     // 弹窗提示是否删除
-          //     ElMessageBox.confirm(
-          //       "此操作将永久删除该数据, 是否继续?",
-          //       "提示",
-          //       {
-          //         confirmButtonText: "确定",
-          //         cancelButtonText: "取消",
-          //         type: "warning",
-          //       }
-          //     ).then(() => {
-          //       // 删除
-          //       proxy
-          //         .post("/workshop/delete", {
-          //           id: row.id,
-          //         })
-          //         .then((res) => {
-          //           ElMessage({
-          //             message: "删除成功",
-          //             type: "success",
-          //           });
-          //           getList();
-          //         });
-          //     });
-          //   },
-          // },
-        ];
-      },
-    },
-  ];
-});
-
-let formData = reactive({
-  data: {
-    productId: "",
-    addType: "1",
-    bomDetailList: [],
-  },
-  data1: {
-    productId: "",
-    versionNumber: "",
-  },
-});
-const formOption = reactive({
-  inline: true,
-  labelWidth: 100,
-  itemWidth: 100,
-  rules: [],
-});
-const byform = ref(null);
-const formConfig = reactive([
-  {
-    type: "select",
-    prop: "productId",
-    label: "产品名称",
-    required: true,
-    disabled: false,
-    isLoad: {
-      url: "/productInfo/page",
-      req: {
-        pageNum: 1,
-        pageSize: 9999,
-        definition: "1",
-      },
-      labelKey: "name",
-      labelVal: "id",
-      method: "post",
-      resUrl: "rows",
-    },
-  },
-  {
-    type: "title",
-    title: "应用程序",
-  },
-  {
-    type: "slot",
-    slotName: "slotFile",
-    label: "上传程序",
-  },
-  {
-    type: "slot",
-    slotName: "slot",
-    label: "物料信息",
-  },
-]);
-
-const formConfig1 = reactive([
-  {
-    type: "select",
-    prop: "productId",
-    label: "产品名称",
-    required: true,
-    disabled: true,
-    isLoad: {
-      url: "/productInfo/page",
-      req: {
-        pageNum: 1,
-        pageSize: 9999,
-        definition: "1",
-      },
-      labelKey: "name",
-      labelVal: "id",
-      method: "post",
-      resUrl: "rows",
-    },
-  },
-  {
-    type: "slot",
-    slotName: "versionSlot",
-    label: "切换版本",
-    required: true,
-  },
-]);
-const getList = async (req) => {
-  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
-  loading.value = true;
-  proxy.post("/bomInfo/page", sourceList.value.pagination).then((message) => {
-    console.log(message);
-    sourceList.value.data = message.rows;
-    sourceList.value.pagination.total = message.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
-};
-const openModal = () => {
-  dialogVisible.value = true;
-  titleText.value = "添加BOM";
-  modalType.value = "add";
-  formData.data = {
-    productId: "",
-    addType: "1",
-    bomDetailList: [],
-  };
-  fileList.value = [];
-  fileListCopy.value = [];
-  formConfig[0].disabled = false;
-};
-const submitForm = () => {
-  byform.value.handleSubmit((valid) => {
-    if (!formData.data.bomDetailList.length > 0) {
-      return ElMessage({
-        message: "请添加物料/半成品",
-        type: "info",
-      });
-    }
-    if (fileList.value.length > 0) {
-      formData.data.fileList =
-        fileListCopy.value.map((x) => ({
-          id: x.id,
-          fileName: x.fileName,
-        })) || [];
-    } else {
-      return ElMessage({
-        message: "请上传程序",
-        type: "info",
-      });
-    }
-    proxy.$refs.tableForm.validate((vaild) => {
-      if (vaild) {
-        submitLoading.value = true;
-        formData.data.bomDetailList = formData.data.bomDetailList.map((x) => ({
-          productId: x.productId,
-          quantity: x.quantity,
-          cost: x.cost,
-        }));
-        proxy.post(`/bomInfo/${modalType.value}ByJxst`, formData.data).then(
-          (res) => {
-            ElMessage({
-              message: modalType.value == "add" ? "添加成功" : "编辑成功",
-              type: "success",
-            });
-            dialogVisible.value = false;
-            submitLoading.value = false;
-            getList();
-          },
-          (err) => {
-            formData.data.bomDetailList = [];
-            submitLoading.value = false;
-          }
-        );
-      }
-    });
-  });
-};
-const byform1 = ref(null);
-const handleChangeVer = () => {
-  if (formData.data1.versionNumber === "")
-    return ElMessage({
-      message: "请选择版本号",
-      type: "info",
-    });
-  byform1.value.handleSubmit((valid) => {
-    submitLoading.value = true;
-    proxy.post("/bomInfo/editVersion", formData.data1).then(
-      (res) => {
-        ElMessage({
-          message: "切换成功",
-          type: "success",
-        });
-        openVersion.value = false;
-        submitLoading.value = false;
-        getList();
-      },
-      (err) => {
-        submitLoading.value = false;
-      }
-    );
-  });
-};
-
-const getDtl = (row, type, isNew) => {
-  formConfig[0].disabled = true; //禁止修改产品信息
-  modalType.value = type;
-  proxy.post("/bomInfo/detail", { id: row.id }).then((res) => {
-    if (isNew) {
-      titleText.value = "新建版本";
-      formData.data = {
-        addType: "2", //2为新建版本
-        productId: res.productId,
-        bomDetailList: [],
-      };
-    } else {
-      titleText.value = openVersion.value ? "版本详情" : "编辑BOM";
-      res.bomDetailList = res.bomDetailVoList;
-      formData.data = res;
-    }
-    dialogVisible.value = true;
-  });
-  proxy
-    .post("/fileInfo/getList", { businessIdList: [row.id] })
-    .then((fileObj) => {
-      fileList.value = fileObj[row.id] || [];
-      fileListCopy.value = [...fileList.value];
-    });
-};
-
-const handleSelect = (row) => {
-  const flag = formData.data.bomDetailList.some((x) => x.productId === row.id);
-  if (flag)
-    return ElMessage({
-      message: "该物料已选择",
-      type: "info",
-    });
-  formData.data.bomDetailList.push({
-    productId: row.id,
-    productCode: row.code,
-    productName: row.name,
-    productUnit: row.unit,
-    quantity: null,
-    cost: null,
-  });
-  return ElMessage({
-    message: "选择成功",
-    type: "success",
-  });
-};
-
-const handleRemove = (index) => {
-  console.log(index, "as");
-  formData.data.bomDetailList.splice(index, 1);
-  return ElMessage({
-    message: "删除成功",
-    type: "success",
-  });
-};
-
-const versionData = ref([]);
-let isShowBtns = ref(true);
-let rowData = ref({});
-const hanldeOpenVer = (row) => {
-  formData.data1 = {
-    productId: "",
-    versionNumber: "",
-  };
-  rowData.value = row;
-  formData.data1.productId = row.productId;
-  proxy
-    .post("/bomInfo/getVersion", { productId: row.productId })
-    .then((res) => {
-      versionData.value = res;
-      formData.data1.versionNumber = res.filter(
-        (x) => x.currentVersion === 1
-      )[0].versionNumber;
-      openVersion.value = true;
-    });
-};
-
-const handleGetDetails = () => {
-  getDtl(rowData.value);
-};
-
-watchEffect(() => {
-  isShowBtns.value = openVersion.value ? false : true;
-  //监听是否是在切换版本中,如是隐藏提交添加弹窗的按钮模块
-});
-
-const changeRowData = (val) => {
-  const data = versionData.value.find((x) => x.versionNumber === val);
-  rowData.value = data ? data : {};
-};
-
-const handleBeforeUpload = async (file) => {
-  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
-  uploadData.value = res.uploadBody;
-  fileListCopy.value = [
-    {
-      id: res.id,
-      fileName: res.fileName,
-      path: res.fileUrl,
-      url: res.fileUrl,
-      uid: file.uid,
-    },
-  ];
-};
-
-const materialUnit = ref([]);
-const getDict = () => {
-  proxy.getDictOne(["material_unit"]).then((res) => {
-    materialUnit.value = res["material_unit"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
-};
-getDict();
-getList();
-</script>
-  
-<style lang="scss" scoped>
-.tenant {
-  padding: 20px;
-}
-</style>

+ 0 - 629
src/views/JXSK/production/workOrder/index.vue

@@ -1,629 +0,0 @@
-<template>
-  <div class="tenant">
-    <!-- <Banner /> -->
-    <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        highlight-current-row
-        :selectConfig="selectConfig"
-        :table-events="{
-          //element talbe事件都能传
-          select: select,
-        }"
-        :action-list="[]"
-        @get-list="getList"
-      >
-        <template #slotName="{ item }">
-          {{ item.createTime }}
-        </template>
-      </byTable>
-    </div>
-    <el-dialog
-      :title="'调整BOM'"
-      v-model="dialogVisible"
-      width="800"
-      v-loading="submitLoading"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
-        <template #slot>
-          <div style="width: 100%">
-            <el-button type="primary" plain @click="openMaterial = true"
-              >添加物料/半成品</el-button
-            >
-            <el-button type="primary" plain> Excel导入</el-button>
-            <el-form
-              ref="tableForm"
-              :model="formData.data"
-              :rules="rules"
-              label-width="0px"
-              style="margin-top: 15px"
-            >
-              <el-table :data="formData.data.workOrderBomList">
-                <el-table-column prop="productCode" label="物料编码" />
-                <el-table-column prop="productName" label="物料名称" />
-                <el-table-column
-                  prop="productUnit"
-                  label="单位"
-                  :formatter="
-                    (row) => dictValueLabel(row.productUnit, materialUnit)
-                  "
-                />
-                <el-table-column prop="quantity" label="数量" width="150">
-                  <template #default="{ row, $index }">
-                    <el-form-item
-                      :prop="'workOrderBomList.' + $index + '.quantity'"
-                      :rules="rules.quantity"
-                      :inline-message="true"
-                    >
-                      <el-input-number
-                        v-model="row.quantity"
-                        :precision="2"
-                        :controls="false"
-                        :min="1"
-                      />
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-                <el-table-column prop="zip" label="操作" width="100">
-                  <template #default="{ $index }">
-                    <el-button type="primary" link @click="handleRemove($index)"
-                      >删除</el-button
-                    >
-                  </template>
-                </el-table-column>
-              </el-table>
-            </el-form>
-          </div>
-        </template>
-      </byForm>
-      <template #footer>
-        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm('byform')"
-          size="large"
-          :loading="submitLoading"
-        >
-          确 定
-        </el-button>
-      </template>
-    </el-dialog>
-
-    <el-dialog
-      title="调整工艺"
-      v-model="dialogVisibleOne"
-      width="800"
-      v-loading="loadingOne"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formConfigOne"
-        :formOption="formOption"
-        v-model="formData.dataOne"
-        :rules="rulesOne"
-        ref="byformOne"
-      >
-        <template #slot>
-          <div style="width: 100%" class="tableDrop">
-            <el-button type="primary" plain @click="clickAdd"
-              >添加工序</el-button
-            >
-            <el-table
-              :data="formData.dataOne.workOrderProductionProcessesList"
-              style="width: 100%; margin-top: 16px"
-              row-key="id"
-            >
-              <el-table-column label="工序名称" width="150">
-                <template #default="{ row, $index }">
-                  <div style="width: 100%">
-                    <el-form-item
-                      :prop="
-                        'workOrderProductionProcessesList.' + $index + '.name'
-                      "
-                      :rules="rulesOne.name"
-                      :inline-message="true"
-                    >
-                      <el-input v-model="row.name" placeholder="请输入" />
-                    </el-form-item>
-                  </div>
-                </template>
-              </el-table-column>
-              <el-table-column label="工艺说明" width="300">
-                <template #default="{ row, $index }">
-                  <div style="width: 100%">
-                    <el-form-item
-                      :prop="
-                        'workOrderProductionProcessesList.' +
-                        $index +
-                        '.remarks'
-                      "
-                      :rules="rulesOne.remarks"
-                      :inline-message="true"
-                    >
-                      <el-input
-                        v-model="row.remarks"
-                        type="textarea"
-                        placeholder="请输入"
-                      />
-                    </el-form-item>
-                  </div>
-                </template>
-              </el-table-column>
-              <el-table-column label="图纸">
-                <template #default="{ row, $index }">
-                  <div style="width: 100%">
-                    <el-form-item
-                      :prop="
-                        'workOrderProductionProcessesList.' + $index + '.name'
-                      "
-                      :rules="rulesOne.name"
-                      :inline-message="true"
-                    >
-                      <el-upload
-                        v-model:fileList="row.fileList"
-                        :show-file-list="false"
-                        class="upload-demo"
-                        action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                        :data="uploadData"
-                        :before-upload="
-                          (file) => handleBeforeUpload(file, $index)
-                        "
-                        accept=".pdf"
-                      >
-                        <el-icon
-                          :size="17"
-                          style="margin-top: 12px; cursor: pointer"
-                        >
-                          <Edit />
-                        </el-icon>
-                      </el-upload>
-                      <div>
-                        <div>
-                          <el-tag
-                            style="margin-left: 10px"
-                            class="ml-2"
-                            type="info"
-                            v-for="(item, index) in row.fileListCopy"
-                            :key="index"
-                            >{{ item.fileName }}</el-tag
-                          >
-                        </div>
-                      </div>
-                    </el-form-item>
-                  </div>
-                </template>
-              </el-table-column>
-
-              <el-table-column
-                align="center"
-                label="操作"
-                width="60"
-                fixed="right"
-              >
-                <template #default="{ $index }">
-                  <el-button type="primary" link @click="clickDelete($index)"
-                    >删除</el-button
-                  >
-                </template>
-              </el-table-column>
-            </el-table>
-          </div>
-        </template>
-      </byForm>
-      <template #footer>
-        <el-button @click="dialogVisibleOne = false" size="large"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          @click="submitFormOne('byform')"
-          size="large"
-          :loading="loadingOne"
-        >
-          确 定
-        </el-button>
-      </template>
-    </el-dialog>
-
-    <el-dialog
-      v-model="openMaterial"
-      title="选择产品"
-      width="70%"
-      append-to-body
-    >
-      <SelectMaterial @handleSelect="handleSelect"></SelectMaterial>
-      <template #footer>
-        <span class="dialog-footer">
-          <el-button @click="openMaterial = false">取消</el-button>
-        </span>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-  
-<script setup>
-/* eslint-disable vue/no-unused-components */
-import { ElMessage, ElMessageBox } from "element-plus";
-import byTable from "@/components/byTable/index";
-import byForm from "@/components/byForm/index";
-import { computed, defineComponent, nextTick, ref } from "vue";
-import useUserStore from "@/store/modules/user";
-import SelectMaterial from "@/components/product/SelectMaterial";
-import Sortable from "sortablejs";
-
-const uploadData = ref({});
-let fileList = ref([]);
-let fileListCopy = ref([]);
-const loading = ref(false);
-const submitLoading = ref(false);
-const loadingOne = ref(false);
-const sourceList = ref({
-  data: [],
-  pagination: {
-    total: 3,
-    pageNum: 1,
-    pageSize: 10,
-  },
-});
-let dialogVisible = ref(false);
-let dialogVisibleOne = ref(false);
-let openMaterial = ref(false);
-let roomDialogVisible = ref(false);
-let modalType = ref("add");
-let rules = ref({
-  quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
-});
-let rulesOne = ref({
-  name: [{ required: true, message: "请输入工序名称", trigger: "blur" }],
-  remarks: [{ required: true, message: "请输入工艺说明", trigger: "blur" }],
-});
-const { proxy } = getCurrentInstance();
-const materialUnit = ref([]);
-const workOrderSource = ref([]);
-const selectConfig = computed(() => [
-  {
-    label: "工单来源",
-    prop: "source",
-    data: workOrderSource.value,
-  },
-]);
-
-const config = computed(() => {
-  return [
-    {
-      attrs: {
-        label: "工单来源",
-        prop: "source",
-      },
-      render(source) {
-        return proxy.dictValueLabel(source, workOrderSource.value);
-      },
-    },
-    {
-      attrs: {
-        label: "产品名称",
-        prop: "productName",
-      },
-    },
-    {
-      attrs: {
-        label: "是否定制",
-        prop: "isCustomized",
-      },
-      render(isCustomized) {
-        return isCustomized == 1 ? "是" : "否";
-      },
-    },
-    {
-      attrs: {
-        label: "工单数量",
-        prop: "quantity",
-      },
-    },
-    {
-      attrs: {
-        label: "已计划数量",
-        prop: "arrangedQuantity",
-      },
-    },
-    {
-      attrs: {
-        label: "完成率",
-        prop: "completionRate",
-      },
-      render(completionRate) {
-        if (completionRate !== undefined && completionRate !== "") {
-          return completionRate + "%";
-        }
-      },
-    },
-    {
-      attrs: {
-        label: "操作",
-        width: "200",
-        align: "right",
-      },
-      // 渲染 el-button,一般用在最后一列。
-      renderHTML(row) {
-        return [
-          row.isCustomized == 1
-            ? {
-                attrs: {
-                  label: "调整BOM",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  getDtl(row);
-                },
-              }
-            : {},
-          row.isCustomized == 1
-            ? {
-                attrs: {
-                  label: "调整工艺",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  getDtlOne(row);
-                },
-              }
-            : {},
-        ];
-      },
-    },
-  ];
-});
-
-let formData = reactive({
-  data: {},
-  dataOne: {},
-  treeData: [],
-});
-const formOption = reactive({
-  inline: true,
-  labelWidth: 100,
-  itemWidth: 100,
-  rules: [],
-});
-const byform = ref(null);
-const byformOne = ref(null);
-
-const treeData = ref([]);
-const formConfig = reactive([
-  {
-    type: "slot",
-    slotName: "slot",
-  },
-]);
-const formConfigOne = reactive([
-  {
-    type: "slot",
-    slotName: "slot",
-    label: "",
-  },
-]);
-const getList = async (req) => {
-  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
-  loading.value = true;
-  proxy
-    .post("/workOrder/pageByJxst", sourceList.value.pagination)
-    .then((message) => {
-      sourceList.value.data = message.rows;
-      sourceList.value.pagination.total = message.total;
-      setTimeout(() => {
-        loading.value = false;
-      }, 200);
-    });
-};
-const openModal = () => {
-  dialogVisible.value = true;
-  modalType.value = "add";
-  formData.data = {};
-};
-
-const submitForm = () => {
-  byform.value.handleSubmit((valid) => {
-    submitLoading.value = true;
-    proxy.post("/workOrderBom/edit", formData.data).then(
-      (res) => {
-        ElMessage({
-          message: "操作成功",
-          type: "success",
-        });
-        dialogVisible.value = false;
-        submitLoading.value = false;
-        getList();
-      },
-      (err) => (submitLoading.value = false)
-    );
-  });
-};
-
-const submitFormOne = () => {
-  byformOne.value.handleSubmit((valid) => {
-    for (
-      let i = 0;
-      i < formData.dataOne.workOrderProductionProcessesList.length;
-      i++
-    ) {
-      const e = formData.dataOne.workOrderProductionProcessesList[i];
-      if (!e.fileListCopy.length > 0) {
-        return ElMessage({
-          message: "请上传图纸",
-          type: "info",
-        });
-      }
-    }
-    for (
-      let i = 0;
-      i < formData.dataOne.workOrderProductionProcessesList.length;
-      i++
-    ) {
-      const e = formData.dataOne.workOrderProductionProcessesList[i];
-      e.fileList = e.fileListCopy;
-    }
-    loadingOne.value = true;
-    proxy.post("/workOrderProductionProcesses/edit", formData.dataOne).then(
-      (res) => {
-        ElMessage({
-          message: "操作成功",
-          type: "success",
-        });
-        dialogVisibleOne.value = false;
-        loadingOne.value = false;
-        getList();
-      },
-      (err) => (loadingOne.value = false)
-    );
-  });
-};
-
-const getDtl = (row) => {
-  modalType.value = "edit";
-  proxy.post("/workOrderBom/list", { workOrderId: row.id }).then((res) => {
-    formData.data = {
-      workOrderBomList: res,
-      workOrderId: row.id,
-    };
-    dialogVisible.value = true;
-  });
-};
-
-const handleRemove = (index) => {
-  formData.data.workOrderBomList.splice(index, 1);
-};
-// 对el-table进行拖拽排序
-const initSort = () => {
-  const tbody = document.querySelector(
-    ".tableDrop .el-table__body-wrapper tbody"
-  );
-  Sortable.create(tbody, {
-    onEnd({ newIndex, oldIndex }) {
-      if (newIndex == oldIndex) return;
-      formData.dataOne.workOrderProductionProcessesList.splice(
-        newIndex,
-        0,
-        formData.dataOne.workOrderProductionProcessesList.splice(oldIndex, 1)[0]
-      );
-      var newArray = formData.dataOne.workOrderProductionProcessesList.slice(0);
-      formData.dataOne.workOrderProductionProcessesList = [];
-      nextTick(() => {
-        formData.dataOne.workOrderProductionProcessesList = newArray;
-      });
-    },
-  });
-};
-const getDtlOne = (row) => {
-  modalType.value = "edit";
-  proxy
-    .post("/workOrderProductionProcesses/list", { workOrderId: row.id })
-    .then((res) => {
-      dialogVisibleOne.value = true;
-      res = res.map((x) => ({
-        ...x,
-        fileList: [
-          {
-            fileName: x.fileName,
-            id: x.oldId,
-          },
-        ],
-        fileListCopy: [
-          {
-            fileName: x.fileName,
-            id: x.oldId,
-          },
-        ],
-      }));
-      formData.dataOne = {
-        workOrderId: row.id,
-        workOrderProductionProcessesList: res,
-      };
-      nextTick(() => {
-        initSort();
-      });
-    });
-};
-
-const getDict = () => {
-  proxy.getDictOne(["material_unit", "work_order_source"]).then((res) => {
-    materialUnit.value = res["material_unit"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    workOrderSource.value = res["work_order_source"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
-};
-getList();
-getDict();
-
-const handleSelect = (row) => {
-  const flag = formData.data.workOrderBomList.some(
-    (x) => x.productId === row.id
-  );
-  if (flag)
-    return ElMessage({
-      message: "该物料已选择",
-      type: "info",
-    });
-  formData.data.workOrderBomList.push({
-    productId: row.id,
-    productCode: row.code,
-    productName: row.name,
-    productUnit: row.unit,
-    quantity: null,
-  });
-  return ElMessage({
-    message: "选择成功",
-    type: "success",
-  });
-};
-
-const clickAdd = () => {
-  formData.dataOne.workOrderProductionProcessesList.push({
-    fileList: [],
-    fileListCopy: [],
-    name: "",
-    remarks: "",
-  });
-};
-const clickDelete = (index) => {
-  formData.dataOne.workOrderProductionProcessesList.splice(index, 1);
-};
-
-const handleBeforeUpload = async (file, index) => {
-  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
-  uploadData.value = res.uploadBody;
-  formData.dataOne.workOrderProductionProcessesList[index].fileListCopy = [
-    {
-      id: res.id,
-      fileName: res.fileName,
-      path: res.fileUrl,
-      url: res.fileUrl,
-      uid: file.uid,
-    },
-  ];
-};
-</script>
-  
-<style lang="scss" scoped>
-.tenant {
-  padding: 20px;
-}
-</style>

+ 0 - 527
src/views/JXSK/warehouseConfig/warehouse/index.vue

@@ -1,527 +0,0 @@
-<template>
-  <div class="tenant">
-    <!-- <Banner /> -->
-    <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        highlight-current-row
-        :selectConfig="selectConfig"
-        :table-events="{
-          //element talbe事件都能传
-          select: select,
-        }"
-        :action-list="[
-          {
-            text: '添加仓库',
-            action: () => openModal('add'),
-          },
-        ]"
-        @get-list="getList"
-      >
-        <template #slotName="{ item }">
-          {{ item.createTime }}
-        </template>
-      </byTable>
-    </div>
-    <el-dialog
-      :title="modalType == 'add' ? '添加仓库' : '编辑'"
-      v-model="dialogVisible"
-      width="800"
-      v-loading="loading"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
-      </byForm>
-      <template #footer>
-        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm('byform')"
-          size="large"
-          :loading="submitLoading"
-        >
-          确 定
-        </el-button>
-      </template>
-    </el-dialog>
-
-    <el-dialog
-      title="库位维护"
-      v-model="dialogVisibleOne"
-      width="800"
-      v-loading="loadingOne"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formConfigOne"
-        :formOption="formOption"
-        v-model="formData.dataOne"
-        :rules="rulesOne"
-        ref="byformOne"
-      >
-        <template #slot>
-          <div style="width: 100%">
-            <el-button type="primary" @click="clickAdd">添 加</el-button>
-            <el-table
-              :data="formData.dataOne.warehouseLocationInfoList"
-              style="width: 100%; margin-top: 16px"
-            >
-              <el-table-column label="库位编码" width="150">
-                <template #default="{ row, $index }">
-                  <div style="width: 100%">
-                    <el-form-item
-                      :prop="'warehouseLocationInfoList.' + $index + '.code'"
-                      :rules="rulesOne.code"
-                      :inline-message="true"
-                    >
-                      <el-input v-model="row.code" placeholder="请输入" />
-                    </el-form-item>
-                  </div>
-                </template>
-              </el-table-column>
-              <el-table-column label="库位名称" width="150">
-                <template #default="{ row, $index }">
-                  <div style="width: 100%">
-                    <el-form-item
-                      :prop="'warehouseLocationInfoList.' + $index + '.name'"
-                      :rules="rulesOne.name"
-                      :inline-message="true"
-                    >
-                      <el-input v-model="row.name" placeholder="请输入" />
-                    </el-form-item>
-                  </div>
-                </template>
-              </el-table-column>
-              <el-table-column label="绑定物品">
-                <template #default="{ row, $index }">
-                  <div style="width: 100%">
-                    <el-form-item
-                      :prop="
-                        'warehouseLocationInfoList.' + $index + '.productIds'
-                      "
-                      :rules="rulesOne.productIds"
-                      :inline-message="true"
-                    >
-                      <el-select
-                        v-model="row.productIds"
-                        placeholder="请选择绑定物品"
-                        style="width: 100%"
-                        multiple
-                      >
-                        <el-option
-                          v-for="item in productList"
-                          :key="item.id"
-                          :label="item.name"
-                          :value="item.id"
-                        />
-                      </el-select>
-                    </el-form-item>
-                  </div>
-                </template>
-              </el-table-column>
-
-              <el-table-column
-                align="center"
-                label="操作"
-                width="80"
-                fixed="right"
-              >
-                <template #default="{ $index }">
-                  <el-button type="primary" link @click="clickDelete($index)"
-                    >删除</el-button
-                  >
-                </template>
-              </el-table-column>
-            </el-table>
-          </div>
-        </template>
-      </byForm>
-      <template #footer>
-        <el-button @click="dialogVisibleOne = false" size="large"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          @click="submitFormOne('byform')"
-          size="large"
-          :loading="loadingOne"
-        >
-          确 定
-        </el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-  
-<script setup>
-/* eslint-disable vue/no-unused-components */
-import { ElMessage, ElMessageBox } from "element-plus";
-import byTable from "@/components/byTable/index";
-import byForm from "@/components/byForm/index";
-import { computed, defineComponent, ref } from "vue";
-import useUserStore from "@/store/modules/user";
-
-const loading = ref(false);
-const loadingOne = ref(false);
-const submitLoading = ref(false);
-const sourceList = ref({
-  data: [],
-  pagination: {
-    total: 3,
-    pageNum: 1,
-    pageSize: 10,
-  },
-});
-let dialogVisible = ref(false);
-let dialogVisibleOne = ref(false);
-let roomDialogVisible = ref(false);
-let modalType = ref("add");
-let rules = ref({
-  type: [
-    { required: true, message: "请选择仓库类型", trigger: ["blur", "change"] },
-  ],
-  name: [{ required: true, message: "请输入仓库名称", trigger: "blur" }],
-});
-let rulesOne = ref({
-  code: [{ required: true, message: "请输入库位编码", trigger: "blur" }],
-  name: [{ required: true, message: "请输入库位名称", trigger: "blur" }],
-  productIds: [{ required: true, message: "请绑定物品", trigger: "change" }],
-});
-const { proxy } = getCurrentInstance();
-const warehouseType = ref([]);
-const productList = ref([]);
-const selectConfig = computed(() => [
-  {
-    label: "仓库类型",
-    prop: "type",
-    data: warehouseType.value,
-  },
-]);
-
-const config = computed(() => {
-  return [
-    {
-      attrs: {
-        label: "仓库类型",
-        prop: "type",
-      },
-      render(type) {
-        return proxy.dictValueLabel(type, warehouseType.value);
-      },
-    },
-    {
-      attrs: {
-        label: "仓库名称",
-        prop: "name",
-      },
-    },
-    {
-      attrs: {
-        label: "仓管员",
-        prop: "keeperName",
-      },
-    },
-    {
-      attrs: {
-        label: "备注",
-        prop: "remark",
-      },
-    },
-    {
-      attrs: {
-        label: "操作",
-        width: "200",
-        align: "right",
-      },
-      // 渲染 el-button,一般用在最后一列。
-      renderHTML(row) {
-        return [
-          {
-            attrs: {
-              label: "库位维护",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              getDtlOne(row);
-            },
-          },
-          {
-            attrs: {
-              label: "修改",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              getDtl(row);
-            },
-          },
-          {
-            attrs: {
-              label: "删除",
-              type: "danger",
-              text: true,
-            },
-            el: "button",
-            click() {
-              // 弹窗提示是否删除
-              ElMessageBox.confirm(
-                "此操作将永久删除该数据, 是否继续?",
-                "提示",
-                {
-                  confirmButtonText: "确定",
-                  cancelButtonText: "取消",
-                  type: "warning",
-                }
-              ).then(() => {
-                // 删除
-                proxy
-                  .post("/warehouse/delete", {
-                    id: row.id,
-                  })
-                  .then((res) => {
-                    ElMessage({
-                      message: "删除成功",
-                      type: "success",
-                    });
-                    getList();
-                  });
-              });
-            },
-          },
-        ];
-      },
-    },
-  ];
-});
-
-let formData = reactive({
-  data: {},
-  dataOne: {},
-  treeData: [],
-});
-const formOption = reactive({
-  inline: true,
-  labelWidth: 100,
-  itemWidth: 100,
-  rules: [],
-});
-const byform = ref(null);
-const byformOne = ref(null);
-
-const treeData = ref([]);
-const formConfig = computed(() => [
-  {
-    type: "select",
-    prop: "type",
-    label: "仓库类型",
-    required: true,
-    data: warehouseType.value,
-  },
-  {
-    type: "input",
-    prop: "name",
-    label: "仓库名称",
-  },
-  {
-    type: "select",
-    prop: "keeperId",
-    label: "仓管员",
-    isLoad: {
-      url: `/tenantUser/list?pageNum=1&pageSize=9999&tenantId=${
-        useUserStore().user.tenantId
-      }`,
-      labelKey: "nickName",
-      labelVal: "userId",
-      method: "get",
-      resUrl: "rows",
-    },
-  },
-  {
-    type: "input",
-    itemType: "textarea",
-    prop: "remark",
-    label: "备注",
-  },
-]);
-const formConfigOne = reactive([
-  {
-    type: "title",
-    title: "仓库信息",
-  },
-  {
-    type: "input",
-    prop: "name",
-    label: "仓库名称",
-    disabled: true,
-  },
-  {
-    type: "select",
-    prop: "keeperId",
-    label: "仓管员",
-    disabled: true,
-    isLoad: {
-      url: `/tenantUser/list?pageNum=1&pageSize=9999&tenantId=${
-        useUserStore().user.tenantId
-      }`,
-      labelKey: "nickName",
-      labelVal: "userId",
-      method: "get",
-      resUrl: "rows",
-    },
-  },
-  {
-    type: "slot",
-    slotName: "slot",
-    label: "库位信息",
-  },
-]);
-const getList = async (req) => {
-  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
-  loading.value = true;
-  proxy.post("/warehouse/page", sourceList.value.pagination).then((message) => {
-    console.log(message);
-    sourceList.value.data = message.rows;
-    sourceList.value.pagination.total = message.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
-};
-const openModal = () => {
-  dialogVisible.value = true;
-  modalType.value = "add";
-  formData.data = {};
-};
-
-const submitForm = () => {
-  byform.value.handleSubmit((valid) => {
-    submitLoading.value = true;
-    proxy.post("/warehouse/" + modalType.value, formData.data).then(
-      (res) => {
-        ElMessage({
-          message: modalType.value == "add" ? "添加成功" : "编辑成功",
-          type: "success",
-        });
-        dialogVisible.value = false;
-        submitLoading.value = false;
-        getList();
-      },
-      (err) => (submitLoading.value = false)
-    );
-  });
-};
-
-const submitFormOne = () => {
-  byformOne.value.handleSubmit((valid) => {
-    if (formData.dataOne.warehouseLocationInfoList.length > 0) {
-      const oldList = formData.dataOne.warehouseLocationInfoList;
-      const list = formData.dataOne.warehouseLocationInfoList;
-      for (let i = 0; i < list.length; i++) {
-        const e = list[i];
-        e.productIds = e.productIds.join(",");
-      }
-      formData.dataOne.warehouseLocationInfoList = list;
-      loadingOne.value = true;
-      proxy.post("/warehouseLocationInfo/edit", formData.dataOne).then(
-        (res) => {
-          ElMessage({
-            message: "操作成功",
-            type: "success",
-          });
-          dialogVisibleOne.value = false;
-          loadingOne.value = false;
-          getList();
-        },
-        (err) => {
-          loadingOne.value = false;
-          formData.dataOne.warehouseLocationInfoList = oldList;
-        }
-      );
-    } else {
-      return ElMessage({
-        message: "请添加库位信息",
-        type: "info",
-      });
-    }
-  });
-};
-
-const getDtl = (row) => {
-  modalType.value = "edit";
-  proxy.post("/warehouse/detail", { id: row.id }).then((res) => {
-    res.type = res.type + "";
-    dialogVisible.value = true;
-    formData.data = res;
-  });
-};
-const getDtlOne = (row) => {
-  proxy
-    .post("/warehouseLocationInfo/list", { warehouseId: row.id })
-    .then((res) => {
-      for (let i = 0; i < res.length; i++) {
-        const e = res[i];
-        if (e.productIds) {
-          e.productIds = e.productIds.split(",");
-        }
-      }
-      formData.dataOne = {
-        warehouseId: row.id,
-        name: row.name,
-        keeperId: row.keeperId,
-        warehouseLocationInfoList: res,
-      };
-      dialogVisibleOne.value = true;
-    });
-};
-
-const getDict = () => {
-  proxy.getDictOne(["warehouse_type"]).then((res) => {
-    warehouseType.value = res["warehouse_type"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
-  proxy
-    .post("/productInfo/page", {
-      pageNum: 1,
-      pageSize: 99999,
-      definition: "",
-    })
-    .then((res) => {
-      productList.value = res.rows;
-    });
-};
-getList();
-getDict();
-
-const clickAdd = () => {
-  formData.dataOne.warehouseLocationInfoList.push({
-    code: "",
-    name: "",
-    productIds: [],
-  });
-};
-const clickDelete = (index) => {
-  formData.dataOne.warehouseLocationInfoList.splice(index, 1);
-};
-</script>
-  
-<style lang="scss" scoped>
-.tenant {
-  padding: 20px;
-}
-.by-form .el-form--inline .el-form-item {
-  padding-right: 0px;
-}
-</style>

+ 0 - 1
src/views/oa/mailList/outside/index.vue

@@ -205,7 +205,6 @@
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
-import FileUpload from "@/components/FileUpload/index";
 import { computed, defineComponent, ref } from "vue";
 import { getToken } from "@/utils/auth";
 import useUserStore from "@/store/modules/user";

+ 41 - 121
src/views/process/processApproval/index.vue

@@ -6,46 +6,21 @@
           {{ route.query.flowName || "流程标题(发起)" }}
         </div>
         <div class="line"></div>
-        <SendSubscribe
-          ref="makeDom"
-          @auxiliaryChange="(e) => getAuxiliaryData(e)"
-          v-if="flowForm.flowKey == 'subscribe_flow'"
-          :queryData="queryData.data"
-        ></SendSubscribe>
-
-        <SendFunds
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'account_request_funds_flow'"
-          :queryData="queryData.data"
-        ></SendFunds>
-        <ReturnGood
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'sales_return_flow'"
-          :queryData="queryData.data"
-        ></ReturnGood>
-        <PurchaseRefund
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'refund_flow'"
-          :queryData="queryData.data"
-        ></PurchaseRefund>
-        <PurchasePayment
-          ref="makeDom"
-          @auxiliaryChange="(e) => getAuxiliaryData(e)"
-          v-else-if="flowForm.flowKey == 'pay_flow'"
-          :queryData="queryData.data"
-        ></PurchasePayment>
-        <template v-else-if="flowForm.flowKey == 'sale_quotation_flow'">
+        <!-- 报价单 -->
+        <template v-if="flowForm.flowKey == 'sale_quotation_flow'">
           <PriceSheetEHSD
             ref="makeDom"
             v-if="flowForm.tenantType === 'EHSD'"
             :queryData="queryData.data"
           ></PriceSheetEHSD>
-          <PriceSheet
-            ref="makeDom"
-            v-else
-            :queryData="queryData.data"
-          ></PriceSheet>
         </template>
+
+        <!-- 样品单 -->
+        <template v-else-if="flowForm.flowKey == 'sample_flow'">
+          <SampleEHSD ref="makeDom" :queryData="queryData.data"></SampleEHSD>
+        </template>
+
+        <!-- 销售合同 -->
         <template v-else-if="flowForm.flowKey == 'contract_flow'">
           <ContractEHSD
             ref="makeDom"
@@ -53,23 +28,17 @@
             :queryData="queryData.data"
             @auxiliaryChange="(e) => getAuxiliaryData(e)"
           ></ContractEHSD>
-          <Contract
-            ref="makeDom"
-            v-else
-            :queryData="queryData.data"
-            @auxiliaryChange="(e) => getAuxiliaryData(e)"
-          ></Contract>
-        </template>
-        <template v-else-if="flowForm.flowKey == 'contract_update_flow'">
-          <ContractAlteration
-            ref="makeDom"
-            :queryData="queryData.data"
-            @auxiliaryChange="(e) => getAuxiliaryData(e)"
-          ></ContractAlteration>
-        </template>
-        <template v-else-if="flowForm.flowKey == 'sample_flow'">
-          <SampleEHSD ref="makeDom" :queryData="queryData.data"></SampleEHSD>
         </template>
+
+        <!-- 申购 -->
+        <SendSubscribe
+          ref="makeDom"
+          @auxiliaryChange="(e) => getAuxiliaryData(e)"
+          v-else-if="flowForm.flowKey == 'subscribe_flow'"
+          :queryData="queryData.data"
+        ></SendSubscribe>
+
+        <!-- 样品单采购、交接单采购 -->
         <template v-else-if="flowForm.flowKey == 'ehsd_purchase_flow'">
           <PurchaseEHSD
             ref="makeDom"
@@ -85,11 +54,20 @@
           ></SendPurchase>
         </template>
 
-        <ServiceContract
+        <!-- 采购付款 -->
+        <PurchasePayment
+          ref="makeDom"
+          @auxiliaryChange="(e) => getAuxiliaryData(e)"
+          v-else-if="flowForm.flowKey == 'pay_flow'"
+          :queryData="queryData.data"
+        ></PurchasePayment>
+
+        <!-- 请款 -->
+        <SendFunds
           ref="makeDom"
-          v-else-if="flowForm.flowKey == 'service_contract_flow'"
+          v-else-if="flowForm.flowKey == 'account_request_funds_flow'"
           :queryData="queryData.data"
-        ></ServiceContract>
+        ></SendFunds>
       </div>
       <div class="bottom" v-if="route.query.processType != 20">
         <div class="commons-title title">处理意见</div>
@@ -226,40 +204,26 @@
 <script setup name="ProcessApproval">
 import useTagsViewStore from "@/store/modules/tagsView.js";
 import { useRouter, useRoute } from "vue-router";
-//决策辅助
-import auxiliary from "./auxiliary";
-import purchaseAuxiliary from "./purchaseAuxiliary";
-
-//申购发起
-import SendSubscribe from "@/components/process/SendSubscribe";
-//采购发起
-import SendPurchase from "@/components/process/SendPurchase";
-//请款发起
-import SendFunds from "@/components/process/SendFunds";
-//退货
-import ReturnGood from "@/components/process/ReturnGood";
 // 消息提示
 import { ElMessage, ElMessageBox } from "element-plus";
-//退款
-import PurchaseRefund from "@/components/process/PurchaseRefund";
-// 付款
-import PurchasePayment from "@/components/process/PurchasePayment";
-// 报价单
-import PriceSheet from "@/components/process/PriceSheet";
+//决策辅助
+import auxiliary from "./auxiliary";
 // 报价单-EHSD
 import PriceSheetEHSD from "@/components/process/EHSD/PriceSheet";
-// 销售合同
-import Contract from "@/components/process/Contract";
-// 销售合同-变更
-import ContractAlteration from "@/components/process/ContractAlteration";
 // 销售合同-EHSD
 import ContractEHSD from "@/components/process/EHSD/Contract";
 // 样品单-EHSD
 import SampleEHSD from "@/components/process/EHSD/Sample";
 // 采购交接单-EHSD
 import PurchaseEHSD from "@/components/process/EHSD/Purchase";
-// 服务合同
-import ServiceContract from "@/components/process/ServiceContract";
+//申购发起
+import SendSubscribe from "@/components/process/SendSubscribe";
+//采购发起
+import SendPurchase from "@/components/process/SendPurchase";
+//请款发起
+import SendFunds from "@/components/process/SendFunds";
+// 采购付款
+import PurchasePayment from "@/components/process/PurchasePayment";
 
 import { ref } from "vue";
 
@@ -338,22 +302,7 @@ const handleSubmit = async (_type) => {
         if (valid) {
           const data = { ...makeDom.value.getFormData() };
           if (flowForm.flowKey == "subscribe_flow") {
-            // data.subscribeDetailList = data.subscribeDetailList.map((x) => ({
-            //   bussinessId: x.bussinessId,
-            //   count: x.count,
-            //   remark: x.remark,
-            // }));
-          } else if (flowForm.flowKey == "purchase_flow") {
-            // data.purchaseDetailList = data.purchaseDetailList.map((x) => ({
-            //   bussinessId: x.bussinessId,
-            //   subscribeDetailId: x.id,
-            //   count: x.count,
-            //   price: x.price,
-            //   amount: x.amount,
-            // }));
           } else if (flowForm.flowKey == "account_request_funds_flow") {
-          } else if (flowForm.flowKey == "sales_return_flow") {
-          } else if (flowForm.flowKey == "refund_flow") {
           } else if (flowForm.flowKey == "sale_quotation_flow") {
             if (flowForm.tenantType === "EHSD") {
               data.ehsdJson = JSON.stringify({
@@ -520,22 +469,10 @@ const skipPage = () => {
       router.replace({
         path: "/ehsd/procurement/subscribe",
       });
-    } else if (flowForm.flowKey == "purchase_flow") {
-      router.replace({
-        path: "/ehsd/procurement/purchase",
-      });
-    } else if (flowForm.flowKey == "sales_return_flow") {
-      router.replace({
-        path: "/ERP/purchaseManage/returnGoods",
-      });
     } else if (flowForm.flowKey == "account_request_funds_flow") {
       router.replace({
         path: "/ehsd/fundManage/funds",
       });
-    } else if (flowForm.flowKey == "refund_flow") {
-      router.replace({
-        path: "/ERP/purchasePayment/invoice",
-      });
     } else if (flowForm.flowKey == "pay_flow") {
       router.replace({
         path: "/ehsd/purchasePayment/payment",
@@ -545,25 +482,13 @@ const skipPage = () => {
         router.replace({
           path: "/ehsd/saleContract/quotation",
         });
-      } else {
-        router.replace({
-          path: "/ERP/saleContract/priceSheet",
-        });
       }
     } else if (flowForm.flowKey == "contract_flow") {
       if (flowForm.tenantType === "EHSD") {
         router.replace({
           path: "/ehsd/saleContract/contract",
         });
-      } else {
-        router.replace({
-          path: "/ERP/saleContract/contract",
-        });
       }
-    } else if (flowForm.flowKey == "contract_update_flow") {
-      router.replace({
-        path: "/ERP/saleContract/contract",
-      });
     } else if (flowForm.flowKey == "sample_flow") {
       router.replace({
         path: "/ehsd/saleContract/sample",
@@ -572,10 +497,6 @@ const skipPage = () => {
       router.replace({
         path: "/ehsd/procurement/purchased",
       });
-    } else if (flowForm.flowKey == "service_contract_flow") {
-      router.replace({
-        path: "/ERP/saleContract/serviceContract",
-      });
     }
   }
 };
@@ -638,7 +559,6 @@ onMounted(async () => {
   flowForm.flowKey = route.query.flowKey;
   flowForm.tenantType = route.query.tenantType;
   flowForm.submitType = route.query.submitType;
-
   getRecords(route.query.id);
 });
 </script>

+ 0 - 65
src/views/process/processApproval/purchaseAuxiliary.vue

@@ -1,65 +0,0 @@
-<template>
-  <div>
-    <el-collapse v-model="activeNames" @change="handleChange">
-      <el-collapse-item title="关联销售合同" name="1">
-        <div class="item">
-          <div>合同编号:</div>
-          <div>下单日期:</div>
-        </div>
-      </el-collapse-item>
-    </el-collapse>
-    <el-collapse
-      v-model="activeNamesOne"
-      @change="handleChange"
-      style="margin-top: 10px"
-    >
-      <el-collapse-item title="供应商最近采购" name="1">
-        <div class="item">
-          <div>合同编号:</div>
-          <div>下单日期:</div>
-          <div>合同金额:</div>
-        </div>
-      </el-collapse-item>
-    </el-collapse>
-    <el-collapse
-      v-model="activeNamesTwo"
-      @change="handleChange"
-      style="margin-top: 10px"
-    >
-      <el-collapse-item title="产品价格" name="1">
-        <div class="item">
-          <div>产品名称:</div>
-          <div>最近价格:</div>
-          <div>历史最高:</div>
-          <div>历史最低:</div>
-        </div>
-      </el-collapse-item>
-    </el-collapse>
-  </div>
-</template>
-
-<script setup>
-const activeNames = ref("1");
-const activeNamesOne = ref("1");
-const activeNamesTwo = ref("1");
-
-const handleChange = () => {};
-</script>
-
-<style lang="scss" scoped>
-.item {
-  margin-bottom: 10px;
-  background-color: #f1f1f1;
-  padding: 5px 10px;
-  div {
-    color: #999999;
-  }
-}
-.el-collapse-item {
-  border: 1px solid #d7d7d7;
-  padding: 0px 10px;
-}
-:deep(.el-collapse-item__content) {
-  padding-bottom: 5px;
-}
-</style>

+ 0 - 1
src/views/production/project/processes/index.vue

@@ -98,7 +98,6 @@
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
-import FileUpload from "@/components/FileUpload/index";
 import { computed, defineComponent, ref } from "vue";
 import { getToken } from "@/utils/auth";
 

+ 0 - 1
src/views/purchaseManage/purchaseManage/arrival/index.vue

@@ -158,7 +158,6 @@
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
-import FileUpload from "@/components/FileUpload/index";
 import { computed, defineComponent, ref, watch } from "vue";
 import { getToken } from "@/utils/auth";
 

+ 0 - 1
src/views/purchaseManage/purchaseManage/purchase/index.vue

@@ -141,7 +141,6 @@
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
-import FileUpload from "@/components/FileUpload/index";
 import { computed, defineComponent, ref } from "vue";
 import { getToken } from "@/utils/auth";
 

+ 0 - 1
src/views/purchaseManage/purchaseManage/subscribe/index.vue

@@ -139,7 +139,6 @@
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
-import FileUpload from "@/components/FileUpload/index";
 import { computed, defineComponent, ref } from "vue";
 import { getToken } from "@/utils/auth";
 

+ 0 - 1
src/views/purchaseManage/supplier/supplyPrice/index.vue

@@ -138,7 +138,6 @@
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
-import FileUpload from "@/components/FileUpload/index";
 import { computed, defineComponent, ref } from "vue";
 import { getToken } from "@/utils/auth";
 import SelectGoods from "@/components/product/SelectGoods";

+ 0 - 1
src/views/salesMange/shipmentMange/packing/index.vue

@@ -461,7 +461,6 @@
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
-import FileUpload from "@/components/FileUpload/index";
 import { computed, defineComponent, ref } from "vue";
 import { getToken } from "@/utils/auth";