Ver Fonte

议价申请及部分需求

cz há 1 ano atrás
pai
commit
4c2b8a7808

+ 4 - 0
src/components/process/SF/Contract.vue

@@ -1813,6 +1813,9 @@ const getFileData = () => {
 };
 const getPriceSheetData = (id) => {
   proxy.post("/extQuotation/detail", { id }).then(async (res) => {
+    if (formData.data.deptId) {
+      res.deptId = formData.data.deptId;
+    }
     formData.data = res;
     formData.data = {
       contractType: route.query.contractType,
@@ -1820,6 +1823,7 @@ const getPriceSheetData = (id) => {
       quotationId: res.id,
       companyId: res.companyId,
       ofCompanyId: res.ofCompanyId,
+      deptId: res.deptId,
       buyCorporationId: res.buyCorporationId,
       buyAddress: res.buyAddress,
       buyPostalCode: res.buyPostalCode,

+ 1167 - 0
src/components/process/SF/DiscussPrice.vue

@@ -0,0 +1,1167 @@
+<template>
+  <div style="width: 100%; padding: 0px 15px">
+    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom">
+      <template #commodity>
+        <div style="width: 100%;padding-left:25px">
+
+          <el-collapse v-model="activeNames">
+            <el-card style="margin-bottom:15px" v-for="(product,index) in formData.data.quotationProductList" :key="index">
+              <el-collapse-item :name="index">
+                <template #title>
+                  <el-row style="width:100%">
+                    <el-col :span="6">
+                      <div style="font-size:14px;font-weight:700;padding-left:15px;"
+                           :style="{background:product.isShowYiJia?'red':'',color:product.isShowYiJia?'#fff':''}">
+                        产品编码:{{product.productCode || '定制产品'}}
+                      </div>
+                    </el-col>
+                    <el-col :span="14" style="display:flex;justify-content:space-around">
+                      <span>数量:{{product.quantity}}</span>
+                      <span> 业务成本单价:{{moneyFormat(product.businessCostPrice,2)}}</span>
+                      <span> 最低价:{{moneyFormat(product.minPrice,2)}}</span>
+                      <span> 最高价:{{moneyFormat(product.maxPrice,2)}}</span>
+                    </el-col>
+                    <el-col :span="4">
+                      <el-form-item label="单价" :prop="'quotationProductList.' + index + '.price'" :rules="rules.price" :inline-message="true"
+                                    class="margin-b-0 wid100" @click.stop>
+                        <el-input-number onmousewheel="return false;" v-model="product.price" placeholder="请输入" style="width: 100%" :precision="2"
+                                         :controls="false" :min="0" @change="changeForeignQuantity()" />
+
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                </template>
+                <el-form disabled label-width="100px">
+                  <div style="width:100%">
+                    <div style="margin:10px 0">
+                      <TitleInfo :content="'主材'"></TitleInfo>
+                    </div>
+                    <div style="width: 100%;padding-left:15px">
+                      <el-row>
+                        <el-col :span="12">
+                          <el-form-item :prop="'quotationProductList.' +index + '.rawMaterialId'" :rules="rules.rawMaterialId" :inline-message="true"
+                                        label="原材料" class="wid100">
+                            <el-select v-model="product.rawMaterialId" placeholder="请选择" style="width:100%">
+                              <el-option v-for="item in rawMaterialData" :key="item.value" :label="item.label" :value="item.value" />
+                            </el-select>
+                          </el-form-item>
+                        </el-col>
+                        <el-col :span="12">
+                          <el-form-item label="颜色" class="margin-b-0 wid100">
+                            <el-row style="width: 100%">
+                              <el-col :span="12">
+                                <el-form-item prop="productColor" label-width="0px" class="margin-b-0 wid100">
+                                  <el-input v-model="product.productColor" placeholder="颜色" />
+                                </el-form-item>
+                              </el-col>
+                              <el-col :span="12">
+                                <el-form-item prop="colorCardCode" label-width="0px" class="margin-b-0 wid100">
+                                  <el-input v-model="product.colorCardCode" placeholder="色卡号" />
+                                </el-form-item>
+                              </el-col>
+                            </el-row>
+                          </el-form-item>
+                        </el-col>
+                      </el-row>
+                      <el-row>
+                        <el-col :span="12">
+                          <el-form-item label="尺寸" class="margin-b-0 wid100" required>
+                            <el-row style="width:100%">
+                              <el-col :span="8">
+                                <el-form-item :prop="'quotationProductList.' +index + '.productLength'" :rules="rules.productLength"
+                                              :inline-message="true" label-width="0px" class="margin-b-0 wid100">
+                                  <el-input-number v-model="product.productLength" placeholder="长 (cm)" style="width: 100%" :precision="2"
+                                                   :controls="false" :min="0" onmousewheel="return false;" />
+                                </el-form-item>
+                              </el-col>
+                              <el-col :span="8">
+                                <el-form-item :prop="'quotationProductList.' +index + '.productWidth'" :rules="rules.productWidth"
+                                              :inline-message="true" label-width="0px" class="margin-b-0 wid100">
+                                  <el-input-number v-model="product.productWidth" placeholder="宽 (cm)" style="width: 100%" :precision="2"
+                                                   :controls="false" :min="0" onmousewheel="return false;" />
+                                </el-form-item>
+                              </el-col>
+                              <el-col :span="8">
+                                <el-form-item :prop="'quotationProductList.' +index + '.productHeight'" :rules="rules.productHeight"
+                                              :inline-message="true" label-width="0px" class="margin-b-0 wid100">
+                                  <el-input-number v-model="product.productHeight" placeholder="高 (cm)" style="width: 100%" :precision="2"
+                                                   :controls="false" :min="0" onmousewheel="return false;" />
+                                </el-form-item>
+                              </el-col>
+                            </el-row>
+                          </el-form-item>
+                        </el-col>
+                        <el-col :span="12">
+                          <el-form-item label="净重(kg)" prop="netWeight" class="margin-b-0 wid100">
+                            <el-input-number v-model="product.netWeight" placeholder="请输入" style="width: 100%" :precision="2" :controls="false"
+                                             :min="0" onmousewheel="return false;" />
+                          </el-form-item>
+                        </el-col>
+
+                      </el-row>
+                    </div>
+
+                    <div style="margin:10px 0">
+                      <TitleInfo :content="'辅材'"></TitleInfo>
+                    </div>
+                    <div style="width: 100%;padding-left:15px">
+                      <el-table :data="product.quotationProductBomList" style="width: 100%; margin-top: 16px">
+                        <el-table-column prop="productName" label="物料名称" />
+                        <el-table-column prop="productCode" label="物料编码" />
+                        <el-table-column label="数量" width="150">
+                          <template #default="{ row, $index }">
+                            <div style="width: 100%">
+                              <el-form-item :prop="'quotationProductList.' + index + '.quotationProductBomList.' + $index + '.quantity'"
+                                            :rules="rules.quantity" :inline-message="true" class="margin-b-0 wid100">
+                                <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder=" " style="width: 100%"
+                                                 :precision="0" :controls="false" :min="1" />
+                              </el-form-item>
+                            </div>
+                          </template>
+                        </el-table-column>
+                      </el-table>
+                    </div>
+
+                    <div style="margin:10px 0">
+                      <TitleInfo :content="'附加工艺要求'"></TitleInfo>
+                    </div>
+
+                    <div style="width:100%;padding-left:15px">
+                      <div class="small-title">
+                        ① 工艺线路
+                      </div>
+                      <el-row style="width:100%">
+                        <el-col :span="12">
+                          <el-form-item label="生产工艺" class="wid100" :prop="'quotationProductList.' + index + '.technologyId'"
+                                        :rules="rules.technologyId" :inline-message="true">
+                            <el-select v-model="product.technologyId" placeholder="请选择" style="width:100%">
+                              <el-option v-for="item in technologyData" :key="item.id" :label="item.name" :value="item.id" />
+                            </el-select>
+                          </el-form-item>
+                        </el-col>
+                      </el-row>
+                      <div class="small-title">
+                        ② LOGO
+                      </div>
+                      <el-row style="width:100%">
+                        <el-col :span="12">
+                          <el-form-item label="LOGO尺寸" class="wid100">
+                            <el-row style="width:100%">
+                              <el-col :span="12">
+                                <el-form-item label-width="0px" class="margin-b-0 wid100" :prop="'quotationProductList.' +index + '.logoLength'"
+                                              :rules="rules.logoLength" :inline-message="true">
+                                  <el-input-number v-model="product.logoLength" placeholder="长 (cm)" style="width: 100%" :precision="2"
+                                                   :controls="false" :min="0" onmousewheel="return false;" />
+                                </el-form-item>
+                              </el-col>
+                              <el-col :span="12">
+                                <el-form-item label-width="0px" class="margin-b-0 wid100" :prop="'quotationProductList.' +index + '.logoWidth'"
+                                              :rules="rules.logoWidth" :inline-message="true">
+                                  <el-input-number v-model="product.logoWidth" placeholder="宽 (cm)" style="width: 100%" :precision="2"
+                                                   :controls="false" :min="0" onmousewheel="return false;" />
+                                </el-form-item>
+                              </el-col>
+                              <!-- <el-col :span="8">
+                            <el-form-item label-width="0px" class="margin-b-0 wid100" :prop="'quotationProductList.' +index + '.logoHeight'"
+                                          :rules="rules.logoHeight" :inline-message="true">
+                              <el-input-number v-model="product.logoHeight" placeholder="高 (cm)" style="width: 100%" :precision="2" :controls="false"
+                                               :min="0" onmousewheel="return false;" />
+                            </el-form-item>
+                          </el-col> -->
+                            </el-row>
+                          </el-form-item>
+                        </el-col>
+                        <el-col :span="12">
+                          <el-form-item label="几色印刷" class="wid100">
+                            <el-input-number v-model="product.colorCount" style="width: 100%" :precision="0" :controls="false" :min="1"
+                                             onmousewheel="return false;" />
+                          </el-form-item>
+                        </el-col>
+                      </el-row>
+                      <div class="small-title">
+                        ③ 折叠
+                      </div>
+                      <el-row style="width:100%">
+                        <el-col :span="12">
+                          <el-form-item label="是否折叠" class="wid100">
+                            <el-select v-model="product.isFold" style="width:100%">
+                              <el-option :label="'否'" :value="0" />
+                              <el-option :label="'是'" :value="1" />
+                            </el-select>
+                          </el-form-item>
+                        </el-col>
+                        <el-col :span="12">
+                          <el-form-item label="折叠数" class="wid100" :prop="'quotationProductList.' +index + '.foldWay'" v-if="product.isFold==1"
+                                        :rules="product.isFold==1?rules.foldWay:''">
+                            <el-select v-model="product.foldWay" style="width:100%">
+                              <el-option v-for="item in foldWayData" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
+                            </el-select>
+                          </el-form-item>
+                        </el-col>
+                      </el-row>
+                      <div class="small-title">
+                        ④ 包装要求
+                      </div>
+                      <el-row style="width:100%">
+                        <el-col :span="12">
+                          <el-form-item label="包装要求" class="wid100">
+                            <el-select v-model="product.packAsk" style="width:100%" multiple placeholder=" ">
+                              <el-option v-for="item in packAskData" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
+                            </el-select>
+                          </el-form-item>
+                        </el-col>
+                      </el-row>
+                      <div class="small-title">
+                        ⑤ 是否定制
+                      </div>
+                      <el-row style="width:100%">
+                        <el-col :span="12">
+                          <el-form-item prop="isCustomized" label="是否定制" class="wid100">
+                            <el-select v-model="product.isCustomized" style="width:100%">
+                              <el-option :label="'否'" :value="0" />
+                              <el-option :label="'是'" :value="1" />
+                            </el-select>
+                          </el-form-item>
+                        </el-col>
+                      </el-row>
+                      <el-row style="width:100%">
+                        <el-form-item label="定制内容" class="wid100" v-if="product.isCustomized==1">
+                          <table style="width:100%" border class="table">
+                            <tr>
+                              <td style="width:20%">
+                              </td>
+                              <td style="width:40%">附件</td>
+                              <td style="width:40%">备注</td>
+                            </tr>
+                            <tr v-for="(row,sonIndex) in product.quotationProductCustomInfoList" :key="sonIndex">
+                              <td>
+                                <el-checkbox v-model="row.isCheckBox" label="" /> <span style="position:relative;top:-2px">
+                                  {{getLabelOne(row.type)}}</span>
+                              </td>
+                              <td>
+                                <div v-for="file in row.fileList" :key="file.id" class="el-click" @click="openImg(file.fileUrl)">
+                                  {{file.fileName}}
+                                </div>
+                              </td>
+                              <td>
+                                <el-form-item :prop="'quotationProductList.' + index + '.quotationProductCustomInfoList.' + sonIndex + '.remark'"
+                                              :rules="row.isCheckBox?rules.remark:''" :inline-message="true" class="margin-b-0 wid100">
+                                  <el-input v-model="row.remark" />
+                                </el-form-item>
+                              </td>
+                            </tr>
+                          </table>
+                        </el-form-item>
+                      </el-row>
+                    </div>
+                  </div>
+                </el-form>
+              </el-collapse-item>
+            </el-card>
+          </el-collapse>
+        </div>
+      </template>
+    </byForm>
+
+    <el-dialog v-if="openProductCompany" v-model="openProductCompany" title="产品库" width="90%" append-to-body>
+      <SelectProduct @selectProduct="selectProduct"></SelectProduct>
+    </el-dialog>
+
+    <el-dialog :title="'物料选择'" v-model="openSelectMaterial" width="90%" destroy-on-close>
+      <SelectMaterial @selectMaterial="selectMaterial"></SelectMaterial>
+      <template #footer>
+        <el-button @click="openSelectMaterial = false" size="defualt" v-debounce>关 闭</el-button>
+      </template>
+    </el-dialog>
+    <!-- <el-dialog v-if="copyContract" v-model="copyContract" :title="copyType === 1 ? '报价选择' : '样品单选择'" width="90%" append-to-body>
+      <SelectContract @select="selectContract" v-if="copyType === 1"></SelectContract>
+      <SelectSample @select="selectContract" v-if="copyType === 2"></SelectSample>
+    </el-dialog> -->
+  </div>
+</template>
+
+<script setup>
+import byForm from "@/components/byForm/index";
+import SelectCompanyProduct from "@/components/product/SelectCompanyProduct.vue";
+import SelectProduct from "@/components/product/SelectProduct.vue";
+import SelectMaterial from "@/components/product/SelectMaterial.vue";
+// import SelectCustomerProduct from "@/components/product/SelectCustomerProduct.vue";
+import selectCity from "@/components/selectCity/index.vue";
+import { useRoute } from "vue-router";
+import SelectContract from "@/components/contractCom/selectContract.vue";
+import SelectSample from "@/components/contractCom/selectSample.vue";
+// import * as echarts from "echarts";
+// import $bus from "@/bus/index.js";
+const route = useRoute();
+const { proxy } = getCurrentInstance();
+// 接收父组件的传值
+const props = defineProps({
+  queryData: Object,
+});
+const packAskData = computed(() => proxy.useUserStore().allDict["pack_ask"]);
+const foldWayData = computed(() => proxy.useUserStore().allDict["fold_way"]);
+const currencyData = computed(
+  () => proxy.useUserStore().allDict["account_currency"]
+);
+const fundsPaymentMethod = computed(
+  () => proxy.useUserStore().allDict["funds_payment_method"]
+);
+const shippingMethod = computed(
+  () => proxy.useUserStore().allDict["shipping_method"]
+);
+const treeData = ref([]);
+const accountList = ref([]);
+const customerList = ref([]);
+const corporationList = ref([]);
+const customerUserList = ref([]);
+const countryData = ref([]);
+const provinceData = ref([]);
+const cityData = ref([]);
+const openProductCompany = ref(false);
+const copyType = ref(1);
+const copyContract = ref(false);
+const indexValue = ref(-1);
+const openSelectMaterial = ref(false);
+const formData = reactive({
+  data: {
+    contractType: "2",
+    rate: 1,
+    quotationProductList: [],
+  },
+});
+const uploadData = ref({});
+const formDom = 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,
+  disabled: false,
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "商品信息",
+    },
+    {
+      type: "slot",
+      slotName: "commodity",
+      label: "",
+    },
+    {
+      type: "title1",
+      title: "报价总金额",
+    },
+    {
+      type: "input",
+      prop: "amount",
+      label: "报价总金额",
+      itemWidth: 25,
+      disabled: true,
+    },
+    {
+      type: "title1",
+      title: "备注",
+      isShow: isShowYiJia.value,
+    },
+    {
+      type: "input",
+      itemType: "textarea",
+      prop: "discussRemark",
+      label: "备注",
+      itemWidth: 100,
+      isShow: isShowYiJia.value,
+    },
+    {
+      type: "title1",
+      title: "附件上传",
+      isShow: isShowYiJia.value,
+    },
+    {
+      type: "upload",
+      listType: "text",
+      accept: "",
+      limit: 3,
+      prop: "discussFileList",
+      label: "附件上传",
+      isShow: isShowYiJia.value,
+    },
+  ];
+});
+const rules = ref({
+  contractType: [
+    { required: true, message: "请选择报价类型", trigger: "change" },
+  ],
+  sellCorporationId: [
+    { 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" },
+  ],
+  quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
+  // price: [{ 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" },
+  ],
+  transportMethod: [
+    { required: true, message: "请选择运输方式", trigger: "change" },
+  ],
+  remark: [{ required: true, message: "请输入付款条件", trigger: "blur" }],
+  rate: [{ required: true, message: "请输入汇率", trigger: "blur" }],
+  shroffAccountId: [
+    { required: true, message: "请选择收款账号", trigger: "change" },
+  ],
+  // price: [{ required: true, message: "请输入单价", trigger: "blur" }],
+});
+const getDict = () => {
+  proxy
+    .post("/customer/selPage", {
+      pageNum: 1,
+      pageSize: 50,
+    })
+    .then((res) => {
+      customerList.value = res.rows.map((x) => ({
+        ...x,
+        label: x.name,
+        value: x.id,
+      }));
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      tenantId: proxy.useUserStore().user.tenantId,
+      type: 0,
+    })
+    .then((res) => {
+      treeData.value = proxy.handleTree(res.data, "deptId");
+    });
+
+  // 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,
+  //       };
+  //     });
+  //   });
+};
+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;
+    }
+  });
+};
+// getDict();
+// getCityData("0");
+const rawMaterialData = ref([]);
+const technologyData = ref([]);
+const getRawMaterialData = () => {
+  proxy.post("/productInfo/page", { productClassifyId: 100 }).then((res) => {
+    rawMaterialData.value = res.rows.map((x) => ({
+      ...x,
+      label:
+        x.name +
+        "," +
+        x.customCode +
+        "," +
+        `${x["length"]}*${x.width}*${x.height}(cm)` +
+        "," +
+        x.color,
+      value: x.id,
+    }));
+  });
+  proxy.post("/technology/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    technologyData.value = res.rows;
+  });
+};
+getRawMaterialData();
+
+const sellCorporationIdChange = (val) => {
+  if (val) {
+    proxy.post("/corporation/detail", { id: val }).then((res) => {
+      if (formData.data.contractType == "2") {
+        formData.data.sellCountryName = res.countryName;
+        formData.data.sellProvinceName = res.provinceName;
+        formData.data.sellCityName = res.cityName;
+        formData.data.sellAddress = res.address;
+      } else {
+        formData.data.sellCountryName = res.countryEnStr;
+        formData.data.sellProvinceName = res.provinceEnStr;
+        formData.data.sellCityName = res.cityEnStr;
+        formData.data.sellAddress = res.addressEn;
+      }
+    });
+  }
+};
+
+const changeCustomer = (val) => {
+  formData.data.quotationProductList = [];
+  if (val) {
+    proxy.post("/customer/detail", { id: val }).then(
+      (res) => {
+        formData.data.buyCorporationName = res.name;
+        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.beneficiaryName = res.beneficiaryName;
+        // formData.data.beneficiaryBank = res.beneficiaryBank;
+        // formData.data.beneficiaryBankAddress = res.beneficiaryBankAddress;
+        // formData.data.beneficiaryAccountNumber = res.beneficiaryAccountNumber;
+        // formData.data.swiftCode = res.swiftCode;
+        // formData.data.beneficiaryAddress = res.beneficiaryAddress;
+
+        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) => {
+        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) => {
+  if (item.contactJson) {
+    let data = JSON.parse(item.contactJson);
+    formData.data.buyContactNumber = data[0].contactNo;
+  }
+};
+
+const selectProduct = (goods) => {
+  if (goods && goods.id) {
+    let fileUrl = "";
+    if (goods.fileList && goods.fileList.length > 0) {
+      fileUrl = goods.fileList[0].fileUrl;
+    }
+    formData.data.quotationProductList.push({
+      fileUrl: fileUrl,
+      productId: goods.id,
+      productCnName: goods.name,
+      productCode: goods.customCode,
+      productLength: goods["length"],
+      productWidth: goods.width,
+      productHeight: goods.height,
+      prodFilePath: goods.prodFilePath,
+      quantity: null,
+      price: null,
+      amount: "",
+      fileList: [],
+      listOne: [],
+    });
+    proxy.msgTip("添加成功", 1);
+  } else {
+    return proxy.msgTip("选择错误", 2);
+  }
+};
+
+const handleClickSelectMaterial = (index) => {
+  indexValue.value = index;
+  openSelectMaterial.value = true;
+};
+
+const selectMaterial = (goods) => {
+  console.log(indexValue.value, formData.data.quotationProductList, "ss");
+  let flag = formData.data.quotationProductList[indexValue.value].listOne.some(
+    (x) => x.productId == goods.id
+  );
+  if (!flag) {
+    let fileUrl = "";
+    if (goods.fileList && goods.fileList.length > 0) {
+      fileUrl = goods.fileList[0].fileUrl;
+    }
+    formData.data.quotationProductList[indexValue.value].listOne.push({
+      fileUrl: fileUrl,
+      productId: goods.id,
+      productCnName: goods.name,
+      productCode: goods.customCode,
+      productLength: goods["length"],
+      productWidth: goods.width,
+      productHeight: goods.height,
+      quantity: null,
+      price: null,
+      amount: "",
+      fileList: [],
+    });
+    proxy.msgTip("选择成功");
+  } else {
+    proxy.msgTip("该物料已选择", 2);
+  }
+};
+
+const changeProductPrice = () => {
+  let productIds = formData.data.quotationProductList.map((x) => x.productId);
+  if (productIds && productIds.length > 0) {
+    proxy
+      .post("/contract/getProductPriceInfo", {
+        productIds: productIds,
+        customerId: formData.data.buyCorporationId
+          ? formData.data.buyCorporationId
+          : "",
+      })
+      .then((res) => {
+        for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+          const iele = formData.data.quotationProductList[i];
+          for (const key in res) {
+            if (key == iele.productId) {
+              iele.salePrice = res[key].price;
+              iele.currency = res[key].currency;
+              iele.saleCostPrice = res[key].costPrice;
+              iele.quotationProductList = res[key].quotationProductList
+                .map((x) => ({
+                  createTime: x.createTime,
+                  price: x.price,
+                  currency: x.currency,
+                }))
+                .filter((y, index) => index < 3);
+              iele.contractProductListOne = res[key].quotationProductList.map(
+                (x) => ({
+                  createTime: x.createTime,
+                  price: x.price,
+                  currency: x.currency,
+                })
+              );
+              iele.customerContractProductList = res[
+                key
+              ].customerContractProductList.map((x) => ({
+                createTime: x.createTime,
+                price: x.price,
+                currency: x.currency,
+              }));
+            }
+          }
+        }
+      });
+  }
+};
+const onPicture = (path) => {
+  window.open(path, "_blank");
+};
+const handleRemove = (index) => {
+  formData.data.quotationProductList.splice(index, 1);
+  totalAmount();
+};
+const calculationAmount = (att = "") => {
+  nextTick(() => {
+    if (
+      formData.data.quotationProductList &&
+      formData.data.quotationProductList.length > 0
+    ) {
+      for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+        let money = 0;
+        money = parseFloat(
+          Number(formData.data.quotationProductList[i].quantity) *
+            Number(formData.data.quotationProductList[i].price)
+        ).toFixed(2);
+        formData.data.quotationProductList[i].amount = money;
+      }
+    }
+    nextTick(() => {
+      totalAmount();
+    });
+  });
+};
+
+const totalAmount = () => {
+  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 = parseFloat(
+          Number(money) + Number(formData.data.quotationProductList[i].amount)
+        ).toFixed(2);
+      }
+    }
+  }
+  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 = parseFloat(
+          Number(money) + Number(formData.data.quotationPayList[i].amount)
+        ).toFixed(2);
+      }
+    }
+  }
+  formData.data.amount = money;
+};
+const clickAdd = () => {
+  if (
+    formData.data.quotationPayList &&
+    formData.data.quotationPayList.length > 0
+  ) {
+    formData.data.quotationPayList.push({
+      payName: "",
+      amount: null,
+      remark: "",
+    });
+  } else {
+    formData.data.quotationPayList = [
+      { payName: "", amount: null, remark: "" },
+    ];
+  }
+};
+const handleDelete = (index) => {
+  formData.data.quotationPayList.splice(index, 1);
+  totalAmount();
+};
+
+const handleDeleteMaterial = (index, sonIndex) => {
+  formData.data.quotationProductList[index].listOne.splice(sonIndex, 1);
+};
+
+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 handleBeforeUpload = async (file, index) => {
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  uploadData.value = res.uploadBody;
+  formData.data.quotationProductList[index].fileList = [
+    {
+      id: res.id,
+      fileName: res.fileName,
+      fileUrl: res.fileUrl,
+      uploadState: false,
+    },
+  ];
+  formData.data.quotationProductList[index].imageUrl = res.fileUrl;
+  return true;
+};
+
+const handleSuccess = (index) => {
+  formData.data.quotationProductList[index].uploadState = true;
+};
+
+const loadingSearch = ref(false);
+const remoteMethod = (keyword) => {
+  if (keyword && typeof keyword === "string") {
+    loadingSearch.value = true;
+    proxy.post("/customer/selPage", { keyword }).then((res) => {
+      customerList.value = res.rows.map((x) => ({
+        ...x,
+        label: x.name,
+        value: x.id,
+      }));
+      loadingSearch.value = false;
+    });
+  }
+  return;
+};
+
+const handleSubmit = async () => {
+  let flag = await formDom.value.handleSubmit(() => {});
+  if (flag) {
+    return true;
+  } else {
+    setTimeout(() => {
+      const errorDiv = document.getElementsByClassName("is-error");
+      errorDiv[0].scrollIntoView();
+    }, 0);
+  }
+  return flag;
+};
+
+const getFormData = () => {
+  return proxy.deepClone(formData.data);
+};
+// 向父组件暴露
+defineExpose({
+  getFormData,
+  handleSubmit,
+});
+
+const changeShroffAccount = (val) => {
+  if (val) {
+    let data = accountList.value.find((item) => item.value == val);
+    if (formData.data.contractType == "2") {
+      if (data) {
+        formData.data.beneficiaryName = "";
+        formData.data.beneficiaryBank = "";
+        formData.data.beneficiaryBankAddress = "";
+        formData.data.beneficiaryAccountNumber = "";
+        formData.data.swiftCode = "";
+        formData.data.beneficiaryAddress = "";
+        formData.data.accountName = data.name;
+        formData.data.openingBank = data.openingBank;
+        formData.data.accountOpening = data.accountOpening;
+      }
+    } else {
+      if (data) {
+        formData.data.accountName = "";
+        formData.data.openingBank = "";
+        formData.data.accountOpening = "";
+        formData.data.beneficiaryName = data.beneficiaryName;
+        formData.data.beneficiaryBank = data.beneficiaryBank;
+        formData.data.beneficiaryBankAddress = data.beneficiaryBankAddress;
+        formData.data.beneficiaryAccountNumber = data.beneficiaryAccountNumber;
+        formData.data.swiftCode = data.swiftCode;
+        formData.data.beneficiaryAddress = data.beneficiaryAddress;
+      }
+    }
+  }
+};
+const activeNames = ref([]);
+
+let obj = {
+  1: "定制刀模",
+  2: "定制纹路",
+  3: "定制模具",
+};
+const getLabelOne = (type) => {
+  return obj[type];
+};
+const isShowYiJia = ref(false);
+const changeForeignQuantity = () => {
+  let money = 0;
+  let num = 0;
+  if (
+    formData.data.quotationProductList &&
+    formData.data.quotationProductList.length > 0
+  ) {
+    // 单个产品的价格
+    for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+      let iele = formData.data.quotationProductList[i];
+      if (iele.price > iele.maxPrice || iele.price < iele.minPrice) {
+        num += 1;
+        iele.isShowYiJia = true;
+      } else {
+        iele.isShowYiJia = false;
+      }
+      iele.amount = Number(parseFloat(iele.price * iele.quantity).toFixed(2));
+      money += Number(iele.amount);
+    }
+    formData.data.amount = parseFloat(money).toFixed(2);
+  }
+  isShowYiJia.value = num > 0 ? true : false;
+};
+const getAllData = (businessId) => {
+  proxy.post("/saleQuotation/detail", { id: businessId }).then((res) => {
+    formData.data = res;
+    // formData.data.saleQuotationId = res.id;
+    // 复制原本价格
+    for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+      const iele = formData.data.quotationProductList[i];
+      iele.quotationProductId = iele.id;
+      // iele.guidePrice = iele.price;
+      iele.price = iele.discussPrice;
+      iele.maxPrice = Number(
+        parseFloat((iele.amplifyRatio / 100 + 1) * iele.minPrice).toFixed(2)
+      );
+      // iele.price = iele.minPrice;
+      for (let j = 0; j < iele.quotationProductBomList.length; j++) {
+        const jele = iele.quotationProductBomList[j];
+        jele.quotationProductBomId = jele.id;
+      }
+    }
+    if (
+      formData.data.quotationProductList &&
+      formData.data.quotationProductList.length > 0
+    ) {
+      for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+        const iele = formData.data.quotationProductList[i];
+        if (iele.packAsk) {
+          iele.packAsk = iele.packAsk.split(",");
+        } else {
+          iele.packAsk = [];
+        }
+        if (
+          iele.quotationProductBomList &&
+          iele.quotationProductBomList.length > 0
+        ) {
+          iele.quotationProductBomList = iele.quotationProductBomList
+            .filter((x) => x.type == 2)
+            .map((x) => ({
+              ...x,
+              materialName: x.productName,
+              materialCode: x.productCode,
+            }));
+        }
+        if (
+          iele.quotationProductCustomInfoList &&
+          iele.quotationProductCustomInfoList.length > 0
+        ) {
+          for (let j = 0; j < iele.quotationProductCustomInfoList.length; j++) {
+            const jele = iele.quotationProductCustomInfoList[j];
+            if (jele.fileList) {
+              jele.fileList = jele.fileList.map((x) => ({
+                ...x,
+                url: x.fileUrl,
+                name: x.fileName,
+              }));
+            } else {
+              jele.fileList = [];
+            }
+            jele.isCheckBox = jele.isCheck == 1;
+          }
+        }
+      }
+    }
+
+    isShowYiJia.value = false;
+    changeForeignQuantity();
+    proxy
+      .getFileData({
+        businessIdList: [formData.data.id],
+        getAll: true,
+      })
+      .then((res) => {
+        console.log(res, "saa");
+        if (res && res[formData.data.id]) {
+          formData.data.discussFileList = res[formData.data.id]
+            .filter((x) => x.businessType == "10")
+            .map((x) => ({ ...x, name: x.fileName, url: x.fileUrl }));
+        } else {
+          formData.data.discussFileList = [];
+        }
+      });
+  });
+};
+
+onMounted(() => {
+  if (currencyData.value && currencyData.value.length > 0) {
+    formData.data.currency = currencyData.value[0].dictKey;
+  }
+  formOption.disabled = judgeStatus();
+  if (route.query && route.query.businessId && route.query.processType) {
+    let businessId = route.query.businessId;
+    getAllData(businessId);
+  }
+});
+
+watch(
+  () => props.queryData,
+  (val) => {
+    nextTick(() => {
+      formOption.disabled = judgeStatus();
+    });
+    if (val.businessId && val.processType) {
+      getAllData(val.businessId);
+    }
+  },
+  {
+    deep: true,
+    immediate: true,
+  }
+);
+const showPriceInfo = () => {
+  if (props.queryData.processType) {
+    return false;
+  }
+  if (route.query.processType) {
+    return false;
+  } else {
+    return true;
+  }
+};
+const optionTwo = reactive({
+  data: {
+    tooltip: {
+      trigger: "axis",
+    },
+    // legend: {
+    //   data: ["价格"],
+    // },
+    grid: {
+      left: "3%",
+      right: "4%",
+      top: "10%",
+      bottom: "3%",
+      containLabel: true,
+    },
+    // toolbox: {
+    //   feature: {
+    //     saveAsImage: {},
+    //   },
+    // },
+    xAxis: {
+      type: "category",
+      boundaryGap: false,
+      data: [],
+    },
+    yAxis: {
+      type: "value",
+    },
+    series: [
+      {
+        name: "价格",
+        type: "line",
+        data: [],
+      },
+    ],
+  },
+});
+const showEcharts = (row, index) => {
+  let myChart = null;
+  myChart = echarts.init(proxy.$refs[row.productId + index]);
+  window.addEventListener("resize", () => {
+    myChart.resize();
+  });
+  if (row.contractProductListOne && row.contractProductListOne.length > 0) {
+    optionTwo.data.xAxis.data = row.contractProductListOne.map((item) => {
+      return item.createTime.slice(0, 10);
+    });
+    optionTwo.data.series[0].data = row.contractProductListOne.map((item) => {
+      return item.price;
+    });
+  } else {
+    optionTwo.data.xAxis.data = [];
+    optionTwo.data.series[0].data = [];
+  }
+  myChart.setOption(optionTwo.data);
+  myChart.resize();
+};
+
+const clickCopy = (type) => {
+  copyType.value = type;
+  copyContract.value = true;
+};
+</script>
+
+<style lang="scss" scoped>
+.table {
+  border-collapse: collapse;
+  border-spacing: 0;
+
+  td {
+    text-align: center;
+    padding: 2px 4px;
+    // padding: 5px 10px;
+  }
+}
+.small-title {
+  padding-left: 15px;
+  margin-bottom: 10px;
+  color: #3366ff;
+  font-size: 14px;
+}
+:deep(.el-checkbox) {
+  margin-right: 0px;
+}
+// :deep(.el-collapse-item) {
+//   margin-bottom: 10px;
+// }
+:deep(.el-collapse-item__header) {
+  background-color: #eee;
+}
+</style>

+ 2 - 2
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -780,12 +780,12 @@ const formConfig = computed(() => {
       accept: "",
       limit: 1,
       prop: "prodFileList",
-      label: "生产文件",
+      label: "生产plt文件",
     },
     // {
     //   type: "slot",
     //   slotName: "productionFile",
-    //   label: "生产文件",
+    //   label: "生产plt文件",
     //   itemWidth: 100,
     // },
     {

+ 2 - 2
src/views/EHSD/productLibrary/waitCreateProduct/index.vue

@@ -639,12 +639,12 @@ const formConfig = computed(() => {
       accept: "",
       limit: 1,
       prop: "prodFileList",
-      label: "生产文件",
+      label: "生产plt文件",
     },
     // {
     //   type: "slot",
     //   slotName: "productionFile",
-    //   label: "生产文件",
+    //   label: "生产plt文件",
     //   itemWidth: 100,
     // },
     {

+ 9 - 8
src/views/EHSD/saleContract/PriceSheetDetail.vue

@@ -153,26 +153,27 @@
               <el-collapse-item :name="index">
                 <template #title>
                   <el-row style="width:100%">
-                    <el-col :span="8">
-                      <div style="font-size:14px;font-weight:700;padding-left:25px;">
+                    <el-col :span="6">
+                      <div style="font-size:14px;font-weight:700;padding-left:15px;">
                         产品编码:{{product.productCode || '定制产品'}}
                       </div>
                     </el-col>
-                    <el-col :span="4">
-                      <el-form-item label="数量" class="margin-b-0" :prop="'quotationProductList.' +index + '.quantity'" :rules="rules.quantity"
+                    <el-col :span="6">
+                      <!-- <el-form-item label="数量" class="margin-b-0" :prop="'quotationProductList.' +index + '.quantity'" :rules="rules.quantity"
                                     :inline-message="true" @click.stop>
                         <el-input-number v-model="product.quantity" placeholder="请输入" style="width: 100%" :precision="0" :controls="false" :min="1"
                                          onmousewheel="return false;" />
-                      </el-form-item>
+                      </el-form-item> -->
+                      单价:<span>{{product.quantity}}</span>
                     </el-col>
-                    <el-col :span="4" style="padding-left:15px">
+                    <el-col :span="6" style="padding-left:15px">
                       <!-- <el-form-item label="单价" class="margin-b-0" @click.stop>
                         <el-input-number v-model="product.price" placeholder="" style="width: 100%" :precision="2" :controls="false" :min="1"
                                          onmousewheel="return false;" disabled />
                       </el-form-item> -->
-                      单价:<span>{{product.prodPrice}}</span>
+                      单价:<span>{{product.price}}</span>
                     </el-col>
-                    <el-col :span="4" style="padding-left:15px">
+                    <el-col :span="6" style="padding-left:15px">
                       <!-- <el-form-item label="总价" class="margin-b-0" @click.stop>
                         <el-input-number v-model="product.amount" placeholder="" style="width: 100%" :precision="2" :controls="false" :min="1"
                                          onmousewheel="return false;" disabled />

+ 4 - 0
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -330,6 +330,10 @@ const produceStatusData = ref([
     label: "已出库",
     value: "10",
   },
+  {
+    label: "作废",
+    value: "99",
+  },
 ]);
 const status = ref([
   {

Diff do ficheiro suprimidas por serem muito extensas
+ 725 - 131
src/views/EHSD/saleContract/priceSheetEHSD/index.vue


+ 311 - 89
src/views/MES/processScheduling/index.vue

@@ -3,7 +3,7 @@
     <div class="pageIndexClass">
       <div style="background:#fff;padding:10px 10px 0 10px">
         <el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-change="handleTabChange">
-          <el-tab-pane label="全部" name="all">
+          <el-tab-pane label="总览" name="all">
           </el-tab-pane>
           <el-tab-pane v-for="item in processesData" :label="item.name" :name="item.id" :key="item.id">
           </el-tab-pane>
@@ -11,7 +11,7 @@
       </div>
 
       <div style="display:flex" v-if="activeName=='all'">
-        <div style="width:calc(60% - 10px);margin-right:10px">
+        <div style="width:calc(100vw - 530px);margin-right:10px">
           <byTable :source="sourceList.data" :otherHeight="65" :pagination="sourceList.pagination" :config="config" :loading="loading"
                    highlight-current-row :selectConfig="selectConfig" :action-list="[ 
               
@@ -21,12 +21,6 @@
        'select-all':selectRow
         }" @get-list="getList">
 
-            <template #orderCode="{ item }">
-              <div style="width: 100%" class="el-click" @click="lookDetails(item)">
-                {{item.orderCode}}
-              </div>
-            </template>
-
             <template #pic="{ item }">
               <div v-if="item.fileList &&item.fileList.length > 0">
                 <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
@@ -51,6 +45,9 @@
 
             <template #productInfo="{item}">
               <div style="width: 100%;line-height:22px">
+                <div>
+                  订单号: <span class="el-click" @click="lookDetails(item)">{{item.orderCode}}</span>
+                </div>
                 <div> 编码:{{item.productCode}}</div>
                 <div>
                   名称:{{item.productName}}
@@ -60,10 +57,19 @@
                   <span>{{ item.productWidth }}</span>*
                   <span>{{ item.productHeight }}</span>
                 </div>
-
                 <div>
                   颜色: {{item.productColor}}
                 </div>
+                <!-- <div>
+                  下单时间: {{item.orderCreateTime}}
+                </div> -->
+                <div>
+                  数量: {{item.quantity}}
+                </div>
+                <div v-if="item.deliveryPeriod">
+                  交期: {{item.deliveryPeriod.slice(0,10)}}
+                </div>
+
               </div>
             </template>
 
@@ -116,7 +122,7 @@
             </template>
           </byTable>
         </div>
-        <div style="width:40%">
+        <div style="width:520px">
           <div class="schedule-right">
             <div class="schedule-top">
               <el-row>
@@ -142,7 +148,7 @@
                         <div style="display:flex;justify-content:space-between;align-items:center;margin:3px 0;height:22px"
                              v-if="isShowDayData(data.day,process)" :class="{'bk-class':isShowDayData(data.day,process).quantity>process.capacity}">
                           <span> {{process.name}}</span>
-                          <span style="display:inline-block;min-width:45px;text-align:right;">
+                          <span style="display:inline-block;min-width:32px;text-align:right;">
                             {{isShowDayData(data.day,process).quantity}}
                           </span>
                         </div>
@@ -161,7 +167,7 @@
 
       <div v-if="activeName!='all'">
         <byTable :source="sourceListOne.data" :otherHeight="65" :pagination="sourceListOne.pagination" :config="configOne" :loading="loading"
-                 highlight-current-row :selectConfig="[]" :action-list="[{
+                 highlight-current-row :selectConfig="selectConfigOne" :action-list="[{
                 text: '排程',
                 action: () => addScheduling('add'),
                 disabled: false,
@@ -171,12 +177,6 @@
        'select-all':selectRow
         }" @get-list="getTableList">
 
-          <template #orderCode="{ item }">
-            <div style="width: 100%" class="el-click" @click="lookDetails(item)">
-              {{item.orderCode}}
-            </div>
-          </template>
-
           <template #pic="{ item }">
             <div v-if="item.fileList &&item.fileList.length > 0">
               <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
@@ -243,7 +243,8 @@
               <el-table-column label="排程日期">
                 <template #default="{ row, $index }">
                   <el-form-item :prop="'list.' + $index + '.schedulingDate'" :rules="rules.schedulingDate" :inline-message="true" class="margin-b-0">
-                    <el-date-picker v-model="row.schedulingDate" type="date" placeholder="请选择" :value-format="'YYYY-MM-DD'" />
+                    <el-date-picker v-model="row.schedulingDate" type="date" placeholder="请选择" :value-format="'YYYY-MM-DD'"
+                                    :disabled-date="disabledFn" />
                   </el-form-item>
                 </template>
               </el-table-column>
@@ -294,7 +295,8 @@
               <el-table-column label="排程日期">
                 <template #default="{ row, $index }">
                   <el-form-item :prop="'list.' + $index + '.schedulingDate'" :rules="rules.schedulingDate" :inline-message="true" class="margin-b-0">
-                    <el-date-picker v-model="row.schedulingDate" type="date" placeholder="请选择" :value-format="'YYYY-MM-DD'" />
+                    <el-date-picker v-model="row.schedulingDate" type="date" placeholder="请选择" :value-format="'YYYY-MM-DD'"
+                                    :disabled-date="disabledFn" />
                   </el-form-item>
                 </template>
               </el-table-column>
@@ -322,8 +324,100 @@
       </template>
     </el-dialog>
 
+    <el-dialog title="记录查看" v-model="recordDialog" width="70%" destroy-on-close v-if="recordDialog">
+      <el-tabs v-model="activeNameOne" type="card" class="demo-tabs">
+        <el-tab-pane label="采购记录" name="1">
+        </el-tab-pane>
+        <el-tab-pane label="到货登记记录" name="3">
+        </el-tab-pane>
+        <el-tab-pane label="出入库流水记录" name="2">
+        </el-tab-pane>
+      </el-tabs>
+      <byForm :formConfig="recordFormConfig" :formOption="recordFormOption" v-model="formData.recordData">
+        <template #detail1 v-if="activeNameOne=='1'">
+          <div style="width:100%">
+            <el-table :data="formData.recordData.purchaseProductList">
+              <el-table-column label="商品图片" width="80">
+                <template #default="{ row }">
+                  <div v-if="row.fileUrl">
+                    <img :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="productCode" label="商品编码" width="200" />
+              <el-table-column prop="productName" label="商品名称" min-width="130" />
+              <el-table-column label="尺寸 (cm)" width="140">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="颜色" prop="productColor" width="170" />
+              <el-table-column label="采购数量" prop="quantity" width="100" />
+            </el-table>
+          </div>
+        </template>
+        <template #detail3 v-if="activeNameOne=='3'">
+          <div style="width:100%">
+            <el-table :data="formData.recordData.arrivalDetailList">
+              <el-table-column label="到货日期" prop="arrivalTime" width="110" :formatter="(row)=>row.arrivalTime.slice(0,10)" />
+              <el-table-column label="商品图片" width="80">
+                <template #default="{ row }">
+                  <div v-if="row.fileUrl">
+                    <img :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="productCode" label="商品编码" width="200" />
+              <el-table-column prop="productName" label="商品名称" min-width="130" />
+              <el-table-column label="尺寸 (cm)" width="140">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="颜色" prop="productColor" width="170" />
+              <!-- <el-table-column label="采购数量" prop="purchaseQuantity" width="100" /> -->
+              <el-table-column label="到货数量" prop="quantity" width="100" />
+            </el-table>
+          </div>
+        </template>
+
+        <template #detail2 v-if="activeNameOne=='2'">
+          <div style="width:100%">
+            <el-table :data="formData.recordData.stockJournalDetailsList">
+              <el-table-column label="类型" width="100" :formatter="(row) => row.opType=='1'?'入库':'出库'" />
+              <el-table-column label="商品图片" width="80">
+                <template #default="{ row }">
+                  <div v-if="row.fileUrl">
+                    <img :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="productCode" label="商品编码" width="200" />
+              <el-table-column prop="productName" label="商品名称" min-width="130" />
+              <el-table-column label="尺寸 (cm)" width="140">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="颜色" prop="productColor" width="170" />
+              <el-table-column label="数量" prop="quantity" width="100" />
+            </el-table>
+          </div>
+        </template>
+      </byForm>
+      <!-- <template #footer>
+        <el-button @click="recordDialog = false" size="defualt" v-debounce>关闭</el-button>
+      </template> -->
+    </el-dialog>
+
     <el-dialog :title="'选择生产任务'" v-model="openSelectTask" width="90%" destroy-on-close>
-      <SelectProductionTask @selectTask="selectTask"></SelectProductionTask>
+      <SelectProductionTask @selectTask="selectTask" :processesId="activeName"></SelectProductionTask>
       <template #footer>
         <el-button @click="bomDialog = false" size="defualt" v-debounce>取 消</el-button>
       </template>
@@ -339,6 +433,7 @@ import QRCode from "qrcodejs2-fix";
 import moment from "moment";
 import { ArrowLeftBold, ArrowRightBold } from "@element-plus/icons-vue";
 import SelectProductionTask from "@/views/MES/productionTask/selectProductionTask.vue";
+import { computed } from "vue";
 
 const { proxy } = getCurrentInstance();
 const contractTag = computed(
@@ -378,8 +473,12 @@ const sourceListOne = ref({
     pageNum: 1,
     pageSize: 10,
     keyword: "",
+    schedulingDate: "",
   },
 });
+sourceListOne.value.pagination.schedulingDate = moment().format(
+  "yyyy-MM-DD HH:mm:ss"
+);
 const treeData = ref([]);
 const dialogVisible = ref(false);
 const remarkDialog = ref(false);
@@ -406,6 +505,10 @@ const statusData = ref([
     label: "已出库",
     value: "10",
   },
+  {
+    label: "作废",
+    value: "99",
+  },
 ]);
 
 const isOverdueData = ref([
@@ -477,6 +580,7 @@ const selectConfig = computed(() => [
   //   propOne: "endTime",
   // },
 ]);
+
 const config = ref([
   // {
   //   type: "selection",
@@ -555,17 +659,17 @@ const config = ref([
     attrs: {
       label: "产品信息",
       slot: "productInfo",
-      width: 200,
+      width: 230,
       fixed: "left",
     },
   },
-  {
-    attrs: {
-      label: "订单号",
-      slot: "orderCode",
-      width: 130,
-    },
-  },
+  // {
+  //   attrs: {
+  //     label: "订单号",
+  //     slot: "orderCode",
+  //     width: 130,
+  //   },
+  // },
   // {
   //   attrs: {
   //     label: "产品图片",
@@ -609,13 +713,13 @@ const config = ref([
   //     width: 80,
   //   },
   // },
-  {
-    attrs: {
-      label: "生产件数",
-      prop: "quantity",
-      width: 100,
-    },
-  },
+  // {
+  //   attrs: {
+  //     label: "生产件数",
+  //     prop: "quantity",
+  //     width: 100,
+  //   },
+  // },
 
   // {
   //   attrs: {
@@ -648,26 +752,26 @@ const config = ref([
   //     "min-width": 220,
   //   },
   // },
-  {
-    attrs: {
-      label: "下单时间",
-      prop: "orderCreateTime",
-      width: 160,
-    },
-  },
-  {
-    attrs: {
-      label: "交期",
-      prop: "deliveryPeriod",
-      width: 100,
-    },
-    render(val) {
-      if (val) {
-        return val.slice(0, 10);
-      }
-      return "";
-    },
-  },
+  // {
+  //   attrs: {
+  //     label: "下单时间",
+  //     prop: "orderCreateTime",
+  //     width: 160,
+  //   },
+  // },
+  // {
+  //   attrs: {
+  //     label: "交期",
+  //     prop: "deliveryPeriod",
+  //     width: 100,
+  //   },
+  //   render(val) {
+  //     if (val) {
+  //       return val.slice(0, 10);
+  //     }
+  //     return "";
+  //   },
+  // },
   // {
   //   attrs: {
   //     label: "投产时间",
@@ -699,6 +803,20 @@ const config = ref([
   // },
 ]);
 
+const selectConfigOne = computed(() => [
+  {
+    type: "time",
+    label: "排程日期",
+    placeholder: "排程日期",
+    prop: "schedulingDate",
+    placeholderOne: "",
+    propOne: "",
+    fn: () => {
+      getTableList();
+    },
+  },
+]);
+
 const configOne = ref([
   {
     attrs: {
@@ -876,6 +994,18 @@ const configOne = ref([
             addScheduling("edit", row);
           },
         },
+        {
+          attrs: {
+            label: "删除",
+            type: "danger",
+            text: true,
+          },
+          el: "button",
+          click() {
+            formData.data.id = row.id;
+            deleteRecordOne();
+          },
+        },
       ];
     },
   },
@@ -1475,37 +1605,7 @@ const openRemark = (row) => {
   };
   remarkDialog.value = true;
 };
-const recordDialog = ref(false);
-const recordFormOption = reactive({
-  inline: true,
-  labelWidth: 40,
-  itemWidth: 100,
-});
-const recordFormConfig = computed(() => {
-  return [
-    {
-      type: "title1",
-      title: "采购记录",
-    },
-    {
-      type: "slot",
-      slotName: "detail1",
-      label: " ",
-    },
-    {
-      type: "title1",
-      title: "出入库流水记录",
-    },
-    {
-      type: "slot",
-      slotName: "detail2",
-      label: " ",
-    },
-  ];
-});
-const lookDetails = (item) => {
-  recordDialog.value = true;
-};
+
 const today = ref(moment().format("yyyy-MM-DD"));
 const dateList = ref({});
 const month = ref(moment().format("yyyy年MM月"));
@@ -1612,6 +1712,128 @@ const isShowDayData = (day, process) => {
     return false;
   }
 };
+
+const currentDate = computed(() =>
+  formData.data.list.map((x) => x.schedulingDate)
+);
+const disabledFn = (date) => {
+  // 当前日期
+  let current = moment(date).format("yyyy-MM-DD");
+  // 禁用已选日期和比当前日期小的
+  return (
+    moment(current).add(1, "day").isBefore(moment()) ||
+    currentDate.value.includes(current)
+  );
+};
+
+const recordDialog = ref(false);
+const recordFormOption = reactive({
+  inline: true,
+  labelWidth: 40,
+  itemWidth: 100,
+});
+const recordFormConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "采购记录",
+      isShow: activeNameOne.value == "1",
+    },
+    {
+      type: "slot",
+      slotName: "detail1",
+      label: " ",
+      isShow: activeNameOne.value == "1",
+    },
+    {
+      type: "title1",
+      title: "到货登记记录",
+      isShow: activeNameOne.value == "3",
+    },
+    {
+      type: "slot",
+      slotName: "detail3",
+      label: " ",
+      isShow: activeNameOne.value == "3",
+    },
+    {
+      type: "title1",
+      title: "出入库流水记录",
+      isShow: activeNameOne.value == "2",
+    },
+    {
+      type: "slot",
+      slotName: "detail2",
+      label: " ",
+      isShow: activeNameOne.value == "2",
+    },
+  ];
+});
+const activeNameOne = ref("1");
+const lookDetails = (item) => {
+  activeNameOne.value = "1";
+  recordDialog.value = true;
+  proxy
+    .post("/produceOrder/detail", {
+      id: item.produceOrderId,
+    })
+    .then((res) => {
+      formData.recordData = res;
+      if (
+        formData.recordData.purchaseProductList &&
+        formData.recordData.purchaseProductList.length > 0
+      ) {
+        let productIds = formData.recordData.purchaseProductList.map(
+          (x) => x.productId
+        );
+        proxy.getFileData({
+          businessIdList: productIds,
+          data: formData.recordData.purchaseProductList,
+          att: "productId",
+          businessType: "0",
+          fileAtt: "fileList",
+          filePathAtt: "fileUrl",
+        });
+      }
+      if (
+        formData.recordData.stockJournalDetailsList &&
+        formData.recordData.stockJournalDetailsList.length > 0
+      ) {
+        setTimeout(() => {
+          let productIds = formData.recordData.stockJournalDetailsList.map(
+            (x) => x.productId
+          );
+          proxy.getFileData({
+            businessIdList: productIds,
+            data: formData.recordData.stockJournalDetailsList,
+            att: "productId",
+            businessType: "0",
+            fileAtt: "fileList",
+            filePathAtt: "fileUrl",
+          });
+        }, 600);
+      }
+
+      if (
+        formData.recordData.arrivalDetailList &&
+        formData.recordData.arrivalDetailList.length > 0
+      ) {
+        setTimeout(() => {
+          let productIds = formData.recordData.arrivalDetailList.map(
+            (x) => x.productId
+          );
+          proxy.getFileData({
+            businessIdList: productIds,
+            data: formData.recordData.arrivalDetailList,
+            att: "productId",
+            businessType: "0",
+            fileAtt: "fileList",
+            filePathAtt: "fileUrl",
+          });
+        }, 1200);
+      }
+    });
+};
 </script>
 
 <style lang="scss" scoped>
@@ -1726,12 +1948,12 @@ const isShowDayData = (day, process) => {
 .btn {
   line-height: 18px;
   cursor: pointer;
-  background: #b1c8df;
+  background: #1b374c;
   color: #fff;
   // border-radius: 100px;
 }
 .bk-class {
-  background: red;
+  background: #1b374c;
   color: #fff;
   border-radius: 2px;
   // padding: 4px;

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

@@ -304,6 +304,10 @@ const statusData = ref([
     label: "已出库",
     value: "10",
   },
+  {
+    label: "作废",
+    value: "99",
+  },
 ]);
 
 const isOverdueData = ref([

+ 101 - 26
src/views/MES/productionTask/index.vue

@@ -48,6 +48,13 @@
         </div>
       </template>
 
+      <template #produceStatus="{item}">
+        <div style="width: 100%">
+          <span class="red" v-if="item.produceStatus=='99'"> 作废 </span>
+          <span v-else> {{dictValueLabel(item.produceStatus, statusData)}} </span>
+        </div>
+      </template>
+
       <template #progress="{item}">
         <div style="width: 100%">
           <el-progress type="circle" :percentage="(Number(item.finishQuantity) / Number(item.quantity))*100" width="60"
@@ -289,6 +296,8 @@
       <el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-change="handleTabChange">
         <el-tab-pane label="采购记录" name="1">
         </el-tab-pane>
+        <el-tab-pane label="到货登记记录" name="3">
+        </el-tab-pane>
         <el-tab-pane label="出入库流水记录" name="2">
         </el-tab-pane>
       </el-tabs>
@@ -303,7 +312,7 @@
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column prop="productCode" label="商品编码" width="160" />
+              <el-table-column prop="productCode" label="商品编码" width="200" />
               <el-table-column prop="productName" label="商品名称" min-width="130" />
               <el-table-column label="尺寸 (cm)" width="140">
                 <template #default="{ row, $index }">
@@ -312,11 +321,38 @@
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column label="颜色" prop="productColor" width="160" />
+              <el-table-column label="颜色" prop="productColor" width="170" />
               <el-table-column label="采购数量" prop="quantity" width="100" />
             </el-table>
           </div>
         </template>
+        <template #detail3 v-if="activeName=='3'">
+          <div style="width:100%">
+            <el-table :data="formData.recordData.arrivalDetailList">
+              <el-table-column label="到货日期" prop="arrivalTime" width="110" :formatter="(row)=>row.arrivalTime.slice(0,10)" />
+              <el-table-column label="商品图片" width="80">
+                <template #default="{ row }">
+                  <div v-if="row.fileUrl">
+                    <img :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="productCode" label="商品编码" width="200" />
+              <el-table-column prop="productName" label="商品名称" min-width="130" />
+              <el-table-column label="尺寸 (cm)" width="140">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="颜色" prop="productColor" width="170" />
+              <!-- <el-table-column label="采购数量" prop="purchaseQuantity" width="100" /> -->
+              <el-table-column label="到货数量" prop="quantity" width="100" />
+            </el-table>
+          </div>
+        </template>
+
         <template #detail2 v-if="activeName=='2'">
           <div style="width:100%">
             <el-table :data="formData.recordData.stockJournalDetailsList">
@@ -328,7 +364,7 @@
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column prop="productCode" label="商品编码" width="160" />
+              <el-table-column prop="productCode" label="商品编码" width="200" />
               <el-table-column prop="productName" label="商品名称" min-width="130" />
               <el-table-column label="尺寸 (cm)" width="140">
                 <template #default="{ row, $index }">
@@ -337,7 +373,7 @@
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column label="颜色" prop="productColor" width="160" />
+              <el-table-column label="颜色" prop="productColor" width="170" />
               <el-table-column label="数量" prop="quantity" width="100" />
             </el-table>
           </div>
@@ -405,6 +441,10 @@ const statusData = ref([
     label: "已出库",
     value: "10",
   },
+  {
+    label: "作废",
+    value: "99",
+  },
 ]);
 
 const isOverdueData = ref([
@@ -520,6 +560,18 @@ const config = ref([
   },
   {
     attrs: {
+      label: "生产状态",
+      // prop: "produceStatus",
+      slot: "produceStatus",
+      width: 100,
+      fixed: "left",
+    },
+    render(val) {
+      return proxy.dictValueLabel(val, statusData.value);
+    },
+  },
+  {
+    attrs: {
       label: "业务公司",
       prop: "contractCompanyName",
       width: 110,
@@ -530,7 +582,7 @@ const config = ref([
       label: "是否逾期",
       slot: "isOverdue",
       width: 80,
-      fixed: "left",
+      // fixed: "left",
     },
   },
   {
@@ -636,16 +688,7 @@ const config = ref([
       width: 100,
     },
   },
-  {
-    attrs: {
-      label: "生产状态",
-      prop: "produceStatus",
-      width: 100,
-    },
-    render(val) {
-      return proxy.dictValueLabel(val, statusData.value);
-    },
-  },
+
   {
     attrs: {
       label: "生产指示",
@@ -1048,6 +1091,17 @@ const recordFormConfig = computed(() => {
     },
     {
       type: "title1",
+      title: "到货登记记录",
+      isShow: activeName.value == "3",
+    },
+    {
+      type: "slot",
+      slotName: "detail3",
+      label: " ",
+      isShow: activeName.value == "3",
+    },
+    {
+      type: "title1",
       title: "出入库流水记录",
       isShow: activeName.value == "2",
     },
@@ -1089,17 +1143,38 @@ const lookDetails = (item) => {
         formData.recordData.stockJournalDetailsList &&
         formData.recordData.stockJournalDetailsList.length > 0
       ) {
-        let productIds = formData.recordData.stockJournalDetailsList.map(
-          (x) => x.productId
-        );
-        proxy.getFileData({
-          businessIdList: productIds,
-          data: formData.recordData.stockJournalDetailsList,
-          att: "productId",
-          businessType: "0",
-          fileAtt: "fileList",
-          filePathAtt: "fileUrl",
-        });
+        setTimeout(() => {
+          let productIds = formData.recordData.stockJournalDetailsList.map(
+            (x) => x.productId
+          );
+          proxy.getFileData({
+            businessIdList: productIds,
+            data: formData.recordData.stockJournalDetailsList,
+            att: "productId",
+            businessType: "0",
+            fileAtt: "fileList",
+            filePathAtt: "fileUrl",
+          });
+        }, 600);
+      }
+
+      if (
+        formData.recordData.arrivalDetailList &&
+        formData.recordData.arrivalDetailList.length > 0
+      ) {
+        setTimeout(() => {
+          let productIds = formData.recordData.arrivalDetailList.map(
+            (x) => x.productId
+          );
+          proxy.getFileData({
+            businessIdList: productIds,
+            data: formData.recordData.arrivalDetailList,
+            att: "productId",
+            businessType: "0",
+            fileAtt: "fileList",
+            filePathAtt: "fileUrl",
+          });
+        }, 1200);
       }
     });
 };

+ 11 - 1
src/views/MES/productionTask/selectProductionTask.vue

@@ -326,6 +326,12 @@ import QRCode from "qrcodejs2-fix";
 import moment from "moment";
 
 const { proxy } = getCurrentInstance();
+const props = defineProps({
+  processesId: {
+    type: String,
+    default: "",
+  },
+});
 const contractTag = computed(
   () => proxy.useUserStore().allDict["contract_prod_tag"]
 );
@@ -345,12 +351,12 @@ const sourceList = ref({
     beginTime: "",
     endTime: "",
     isOverdue: "",
+    processesId: props.processesId,
   },
 });
 const treeData = ref([]);
 const dialogVisible = ref(false);
 const remarkDialog = ref(false);
-
 const modalType = ref("add");
 const statusData = ref([
   {
@@ -373,6 +379,10 @@ const statusData = ref([
     label: "已出库",
     value: "10",
   },
+  {
+    label: "作废",
+    value: "99",
+  },
 ]);
 
 const isOverdueData = ref([

+ 4 - 0
src/views/MES/productionWorkOrder/index.vue

@@ -105,6 +105,10 @@ const statusData = ref([
     label: "已出库",
     value: "10",
   },
+  {
+    label: "作废",
+    value: "99",
+  },
 ]);
 const selectConfig = computed(() => [
   {

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

@@ -12,6 +12,10 @@
           <PriceSheet ref="makeDom" :queryData="queryData.data"></PriceSheet>
         </template>
 
+        <template v-if="flowForm.flowKey == 'discuss_price_flow'">
+          <DiscussPrice ref="makeDom" :queryData="queryData.data"></DiscussPrice>
+        </template>
+
         <!-- 销售合同 -->
         <Contract ref="makeDom" :queryData="queryData.data" v-else-if="flowForm.flowKey == 'contract_flow' || flowForm.flowKey == 'sample_flow'">
         </Contract>
@@ -147,6 +151,7 @@ import useTagsViewStore from "@/store/modules/tagsView.js";
 import { useRouter, useRoute } from "vue-router";
 
 import PriceSheet from "@/components/process/SF/PriceSheet";
+import DiscussPrice from "@/components/process/SF/DiscussPrice";
 import Contract from "@/components/process/SF/Contract";
 import ContractChange from "@/components/process/SF/ContractChange";
 

+ 17 - 8
src/views/product/material/index.vue

@@ -403,14 +403,7 @@ const formConfig = computed(() => {
       itemWidth: 100,
       disabled: false,
       fn: (val) => {
-        let current = findNodeById(treeData.value, val);
-        if (current) {
-          if (current.id == 100) {
-            isShowLabel.value = true;
-          } else {
-            isShowLabel.value = current.parentIdSet.includes("100");
-          }
-        }
+        changeProductClassifyId(val);
       },
     },
     {
@@ -636,10 +629,26 @@ const getTreeList = () => {
     });
 };
 
+const changeProductClassifyId = (val) => {
+  let current = findNodeById(treeData.value, val);
+  if (current) {
+    if (current.id == 100) {
+      isShowLabel.value = true;
+    } else {
+      if (current.parentIdSet) {
+        isShowLabel.value = current.parentIdSet.includes("100");
+      } else {
+        isShowLabel.value = false;
+      }
+    }
+  }
+};
+
 const getDtl = (row) => {
   modalType.value = "edit";
   proxy.post("/productInfo/detail", { id: row.id }).then((res) => {
     formData.data = res;
+    changeProductClassifyId(res.productClassifyId);
     formData.data.fileList = row.fileList.map((x) => ({
       ...x,
       url: x.fileUrl,

+ 61 - 17
src/views/production/project/machineSetup/index.vue

@@ -11,20 +11,22 @@
         </div>
       </div>
       <div class="right">
-        <div style="padding-left:20px" v-if="printList && printList.length>0">
-          <div v-if="prodFileList && prodFileList.length>0" style="font-size:18px">
-            plt文件:<span class="el-click" @click="openImg(prodFileList[0].fileUrl)"> {{prodFileList[0].fileName}} </span>
+        <div v-if="printList && printList.length>0">
+          <div v-if="prodFileList && prodFileList.length>0"
+               style="font-size:26px;margin-bottom:20px;padding:40px 20px;border-radius:6px;border:1px dashed #dcdfe6;text-align:center;color:#606266">
+            <span @click="downloadFile(prodFileList[0].fileUrl,prodFileList[0].fileName)" style="cursor:pointer"> plt文件(点击下载)
+              {{prodFileList[0].fileName}} </span>
           </div>
-          <el-button type="primary" v-print="printObj" size="defualt">打印任务单</el-button>
+          <!-- <el-button type="primary" v-print="printObj" size="defualt">打印任务单</el-button> -->
         </div>
         <div id="pdfDom" style="width:100%">
           <div v-for="item in printList" :key="item.id" style="margin-bottom:20px">
-            <div style="font-size:32px;font-weight:700;color:#000;text-align:center">
+            <!-- <div style="font-size:32px;font-weight:700;color:#000;text-align:center">
               生产任务单
             </div>
             <div style="float:right;margin: 20px 0px 5px 0;">
               {{printTime}}
-            </div>
+            </div> -->
             <table class="table" border>
               <tr>
                 <td style="width:25%">
@@ -278,11 +280,16 @@ const formOption = reactive({
   inline: true,
   labelWidth: 110,
   itemWidth: 100,
+  labelPosition: "top",
 });
 const formDom = ref(null);
 const formConfig = computed(() => {
   return [
     {
+      type: "title1",
+      title: "机台设置",
+    },
+    {
       type: "input",
       prop: "userUuid",
       label: "设备唯一标识",
@@ -305,10 +312,10 @@ const formConfig = computed(() => {
           dictKey: "1",
           dictValue: "批量单",
         },
-        {
-          dictKey: "2",
-          dictValue: "散单",
-        },
+        // {
+        //   dictKey: "2",
+        //   dictValue: "散单",
+        // },
       ],
       itemWidth: 100,
       fn: (val) => {
@@ -373,7 +380,7 @@ const getList = async (req) => {
       }));
     });
 };
-
+getList();
 const openModal = () => {
   dialogVisible.value = true;
   modalType.value = "add";
@@ -419,16 +426,28 @@ const getDtl = (row) => {
   let userUuid = window.localStorage.getItem("_deviceId");
   if (userUuid) {
     proxy.post("/tdaDevice/detail", { userUuid: userUuid }).then((res) => {
-      formData.data = res;
-      if (formData.data.prodTaskId) {
-        getPrintData(formData.data.prodTaskId);
+      if (res) {
+        formData.data = res;
+        if (formData.data.prodTaskId) {
+          getPrintData(formData.data.prodTaskId);
+
+          let flag = taskData.value.some(
+            (x) => x.value == formData.data.prodTaskId
+          );
+          if (!flag) {
+            taskData.value.push({
+              label:
+                formData.data.orderCode +
+                `,${formData.data.productCode}(${formData.data.productName})`,
+              value: formData.data.prodTaskId,
+            });
+          }
+        }
       }
     });
   }
 };
 
-getList();
-
 const printList = ref([]);
 const printTime = ref("");
 const prodFileList = ref([]);
@@ -510,6 +529,31 @@ const printObj = ref({
     "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
   extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
 });
+
+function downloadFile(fileUrl, fileName) {
+  fetch(fileUrl)
+    .then((response) => response.blob())
+    .then((blob) => {
+      const url = window.URL.createObjectURL(blob);
+      const a = document.createElement("a");
+      a.href = url;
+      a.download = fileName;
+      a.style.display = "none";
+      document.body.appendChild(a);
+      a.click();
+      window.URL.revokeObjectURL(url);
+      document.body.removeChild(a);
+    })
+    .catch((error) => {
+      console.error("下载文件时发生错误:", error);
+    });
+}
+
+const handleDownloadFile = (fileUrl, fileName) => {
+  proxy.postTwo(fileUrl).then((res) => {
+    console.log(res, "asas");
+  });
+};
 </script>
 
 <style lang="scss" scoped>
@@ -524,7 +568,7 @@ const printObj = ref({
     overflow: auto;
     // border-right: 1px solid #eee;
     margin-right: 10px;
-    padding: 15px 15px 4px 4px;
+    padding: 30px;
     background: #fff;
   }
   .right {

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff