Browse Source

报价单

cz 1 year ago
parent
commit
e9ce5505c2

+ 1 - 0
src/assets/styles/element-ui.scss

@@ -127,6 +127,7 @@
 
 .margin-b-0.el-form-item {
   margin-bottom: 0px !important;
+  width: 100% !important;
 }
 
 .wid100.el-form-item {

+ 10 - 7
src/components/byTable/index.vue

@@ -60,7 +60,7 @@
             <span style="font-size:14px;height:32px;margin-right:15px">{{i.label || ''}}</span>
             <el-date-picker v-model="pagination[i.prop]" type="date" size="small" :placeholder="i.placeholder" style="width:120px"
                             value-format="YYYY-MM-DD" @change="searchItemSelctOne(i,pagination[i.prop],pagination[i.propOne])" />
-            <span style="margin-right:15px">-</span>
+            <span style="margin-right:25px">-</span>
             <el-date-picker v-model="pagination[i.propOne]" type="date" size="small" :placeholder="i.placeholderOne" style="width:120px"
                             value-format="YYYY-MM-DD" @change="searchItemSelctOne(i,pagination[i.prop],pagination[i.propOne])" />
           </div>
@@ -86,7 +86,7 @@
                   @keyup.enter="searchFn">
         </el-input>
         <el-button type="primary" style="margin-left: 10px" size="default" @click="searchFn">{{ $t("common.search") }}</el-button>
-        <div class="more-icon" @click="retrievalModalFn" v-if="$attrs.onMoreSearch">
+        <div class="more-icon" @click="retrievalModalFn" v-if="onMoreSearch">
           <i class="iconfont icon-iconx_saixuan"></i>
         </div>
       </div>
@@ -156,6 +156,10 @@ export default defineComponent({
       type: Boolean,
       default: false,
     },
+    onMoreSearch: {
+      type: Boolean,
+      default: false,
+    },
     hideAll: {
       type: Boolean,
       default: false,
@@ -438,21 +442,20 @@ export default defineComponent({
     };
 
     const searchItemSelctOne = (item, prop, propOne) => {
-      console.log(prop, propOne, "sssss");
       if (prop && propOne) {
         proxy.$emit(
           "getList",
           Object.assign(props.filterParams, {
-            [item.prop]: prop,
-            [item.propOne]: propOne,
+            [item.prop]: prop + " 00:00:00",
+            [item.propOne]: propOne + " 23:59:59",
           })
         );
       } else if (prop == null && propOne == null) {
         proxy.$emit(
           "getList",
           Object.assign(props.filterParams, {
-            [item.prop]: prop,
-            [item.propOne]: propOne,
+            [item.prop]: "",
+            [item.propOne]: "",
           })
         );
       }

+ 7 - 5
src/components/headerBar/header-bar.vue

@@ -97,11 +97,11 @@
         </div>
       </ul>
       <div class="fr">
-        <div style="float:right;height: 50px;line-height: 50px;padding-right:20px;color:#fff;font-size:14px;cursor: pointer;"
+        <div style="float:right;height: 50px;line-height: 50px;margin-right:20px;color:#fff;font-size:14px;cursor: pointer;"
              @click="plugsDialog=true ">
           插件下载
         </div>
-        <div style="float:right;height: 50px;padding-right:20px">
+        <div style="float:right;height: 50px;margin-right:20px">
           <el-badge :value="jobData.sumCount" :max="99" style="cursor: pointer;margin-top:15px;" v-if="jobData.sumCount" @click="handleOpenDrawer">
             <el-icon :size="20" color="#fff">
               <Opportunity />
@@ -349,9 +349,11 @@ getLogo();
 
 const openMenuBox = () => {
   isChildMenu.value = !isChildMenu.value;
-  nextTick(() => {
-    initSort();
-  });
+  if (isChildMenu.value) {
+    nextTick(() => {
+      initSort();
+    });
+  }
 };
 
 const getCollectData = () => {

+ 3 - 2
src/components/process/SF/Contract.vue

@@ -74,7 +74,8 @@
             <el-row style="width: 100%">
               <el-col :span="6">
                 <el-form-item label="" prop="countryId" class="margin-b-0">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" style="width:100%" filterable
+                             @change="(val) => getCityData(val, '20', true)">
                     <el-option v-for="item in countryData" :label="item.name" :value="item.id">
                     </el-option>
                   </el-select>
@@ -126,7 +127,7 @@
 
       <template #commodity>
         <div style="width: 100%">
-          <el-button type="primary" @click="openProductCompany = true" plain style="margin-bottom: 16px" v-if="!judgeStatus()">标准产品库</el-button>
+          <el-button type="primary" @click="openProductCompany = true" plain style="margin-bottom: 16px" v-if="!judgeStatus()">产品库</el-button>
           <el-table :data="formData.data.contractProductList" style="width: 100%; ">
             <el-table-column label="商品图片" width="80">
               <template #default="{ row }">

+ 333 - 288
src/components/process/SF/PriceSheet.vue

@@ -1,13 +1,7 @@
 <template>
   <div style="width: 100%; padding: 0px 15px">
     <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom">
-      <template #btn>
-        <div>
-          <el-button type="primary" v-if="
-              [30].includes(route.query.processType) || !route.query.processType
-            " @click="clickCopy(1)">复制合同</el-button>
-        </div>
-      </template>
+
       <template #seller>
         <div style="width: 100%">
           <el-form-item prop="sellCorporationId" label="卖方信息" class="wid100">
@@ -73,22 +67,23 @@
           <el-form-item label="地址" class="wid100" required>
             <el-row style="width: 100%">
               <el-col :span="6">
-                <el-form-item label="" prop="countryId" class="margin-b-0">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
+                <el-form-item label="" prop="countryId" class="margin-b-0 wid100">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" style="width:100%" 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" class="margin-b-0">
+                <el-form-item label="" prop="provinceName" class="margin-b-0 wid100">
                   <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" class="margin-b-0">
+                <el-form-item label="" prop="cityName" class="margin-b-0 wid100">
                   <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData">
                   </selectCity>
                 </el-form-item>
@@ -127,7 +122,55 @@
       <template #commodity>
         <div style="width: 100%">
           <el-button type="primary" @click="openProductCompany = true" plain style="margin-bottom: 16px" v-if="!judgeStatus()">标准产品库</el-button>
-          <el-table :data="formData.data.quotationProductList" style="width: 100%; ">
+          <el-table :data="formData.data.quotationProductList" style="width: 100%;" default-expand-all row-key="productId">
+            <el-table-column type="expand" width="50" align="center">
+              <template #default="scope">
+                <el-table :data="scope.row.listOne" style="width: 100%;" :show-header="false">
+                  <el-table-column label="" width="50" />
+                  <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="productCnName" label="商品名称" min-width="130" />
+                  <el-table-column prop="productCode" label="商品编码" width="130" />
+                  <el-table-column label="尺寸 cm*cm*cm" width="180">
+                    <template #default="{ row, $index }">
+                      <div style="width: 100%">
+                        {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                      </div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="数量" width="150">
+                    <template #default="{ row, $index }">
+                      <div style="width: 100%">
+                        <el-form-item :prop="'quotationProductList.' + scope.$index + '.listOne.' + $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="0" />
+                        </el-form-item>
+                      </div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="单价" width="150">
+                    <template #default="{ row, $index }">
+                      <div style="width: 100%">
+                        {{row.price}}
+                      </div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column prop="amount" label="小计" width="120" />
+                  <el-table-column label="操作" width="120" align="center" fixed="right" v-if="!judgeStatus()">
+                    <template #default="{ $index }">
+                      <el-button type="primary" link @click="handleDeleteMaterial(scope.$index,$index)">删除</el-button>
+                    </template>
+                  </el-table-column>
+                </el-table>
+              </template>
+            </el-table-column>
             <el-table-column label="商品图片" width="80">
               <template #default="{ row }">
                 <div v-if="row.fileUrl">
@@ -145,32 +188,14 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="设计图稿" width="80">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-upload action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" accept=".gif, .jpeg, .jpg, .png" :show-file-list="false"
-                             :data="uploadData" :before-upload="(file)=>handleBeforeUpload(file,$index)" :on-success="()=>handleSuccess($index)">
-                    <img v-if="row.imageUrl" :src="row.imageUrl" class="pic" />
-                    <el-icon v-else class="avatar-uploader-icon">
-                      <Plus />
-                    </el-icon>
-                  </el-upload>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column label="生产源文件" width="140">
-              <template #default="{ row, $index }">
-                <!-- <span class="el-click" v-if="!row.prodFilePath" @click="handleClickUpload('prodFilePath',false)">点击</span> -->
-                <span class="el-click" v-if="row.prodFilePath" @click="handleClickUpload('prodFilePath',false,$index)">点击上传 (查看)</span>
-              </template>
-            </el-table-column>
             <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"
                                 class="margin-b-0 wid100">
                     <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
-                                     :controls="false" :min="0" @change="calculationAmount('quantity')" />
+                                     :controls="false" :min="0" />
+                    <!-- @change="calculationAmount('quantity')" -->
                   </el-form-item>
                 </div>
               </template>
@@ -178,64 +203,20 @@
             <el-table-column label="单价" width="150">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'quotationProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true"
+                  {{row.price}}
+                  <!-- <el-form-item :prop="'quotationProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true"
                                 class="margin-b-0 wid100">
-                    <div style="display:flex;">
-                      <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入" style="width: 100%" :precision="2"
-                                       :controls="false" :min="0" @change="calculationAmount()" />
-                      <!-- <el-popover placement="top-start" :width="400" trigger="hover" @show="showEcharts(row,$index)">
-                        <template #default>
-                          <div>
-                            <div>
-                              <img src="@/assets/images/money1.png" alt="" class="img" /> <span
-                                    style="font-size:14px;font-weight:700;color:#000">销售指导价:</span>
-                              <div style="padding:5px 0px 0px 20px">
-                                {{row.currency}} {{moneyFormat(row.salePrice,2)}}
-                              </div>
-                            </div>
-                            <div style="margin-top:15px">
-                              <img src="@/assets/images/money2.png" alt="" class="img" /> <span
-                                    style="font-size:14px;font-weight:700;color:#000">客户近期购买价格:</span>
-                              <div style="padding:5px 0px 0px 20px">
-                                <div v-for="item in row.customerContractProductList">
-                                  <span>{{item.createTime.slice(0,10)}} </span>
-                                  <span style="margin-left:40px">{{item.code}} </span>
-                                  <span style="margin-left:40px"> {{item.currency}} {{moneyFormat(item.price,2)}} </span>
-                                </div>
-                              </div>
-                            </div>
-                            <div style="margin-top:15px">
-                              <img src="@/assets/images/money3.png" alt="" class="img" /> <span
-                                    style="font-size:14px;font-weight:700;color:#000">产品近期销售价格:</span>
-                              <div style="padding:5px 0px 0px 20px">
-                                <div v-for="item in row.quotationProductList">
-                                  <span>{{item.createTime.slice(0,10)}} </span>
-                                  <span style="margin-left:40px">{{item.code}} </span>
-                                  <span style="margin-left:40px">{{item.currency}} {{moneyFormat(item.price,2)}} </span>
-                                </div>
-                              </div>
-                            </div>
-                            <div :ref="row.productId+$index" style="height:180px">
-                            </div>
-                          </div>
-                        </template>
-                        <template #reference>
-                          <div style="margin-left:10px;cursor:pointer;position:relative;top:4px">
-                            <el-icon :size="20" color="#85c1a6">
-                              <WarningFilled />
-                            </el-icon>
-                          </div>
-                        </template>
-                      </el-popover> -->
-                    </div>
-                  </el-form-item>
+                 
+                    <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" @change="calculationAmount()" />
+                  </el-form-item> -->
                 </div>
               </template>
             </el-table-column>
             <el-table-column prop="amount" label="小计" width="120" />
             <el-table-column label="操作" width="120" align="center" fixed="right" v-if="!judgeStatus()">
               <template #default="{ $index }">
-                <el-button type="primary" link @click="handleClickUpload('prodFilePath',true,$index)">重置</el-button>
+                <el-button type="primary" link @click="handleClickSelectMaterial($index)">配件</el-button>
                 <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
               </template>
             </el-table-column>
@@ -278,7 +259,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="操作" width="60" align="center" fixed="right" v-if="!judgeStatus()">
+            <el-table-column label="操作" width="80" align="center" fixed="right" v-if="!judgeStatus()">
               <template #default="{ $index }">
                 <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
               </template>
@@ -288,12 +269,17 @@
       </template>
     </byForm>
 
-    <el-dialog v-if="openProductCompany" v-model="openProductCompany" title="公司产品库" width="90%" append-to-body>
-      <!-- <SelectCompanyProduct @selectProduct="selectProduct" :alreadySelectData="formData.data.quotationProductList"></SelectCompanyProduct> -->
+    <el-dialog v-if="openProductCompany" v-model="openProductCompany" title="产品库" width="90%" append-to-body>
       <SelectProduct @selectProduct="selectProduct"></SelectProduct>
     </el-dialog>
 
-    <!-- <el-dialog v-if="copyContract" v-model="copyContract" :title="copyType === 1 ? '合同选择' : '样品单选择'" width="90%" append-to-body>
+    <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> -->
@@ -304,7 +290,7 @@
 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";
@@ -327,6 +313,7 @@ const fundsPaymentMethod = computed(
 const shippingMethod = computed(
   () => proxy.useUserStore().allDict["shipping_method"]
 );
+const treeData = ref([]);
 const accountList = ref([]);
 const customerList = ref([]);
 const corporationList = ref([]);
@@ -337,6 +324,8 @@ 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",
@@ -368,20 +357,14 @@ const formOption = reactive({
 });
 const formConfig = computed(() => {
   return [
-    // {
-    //   type: "slot",
-    //   slotName: "btn",
-    //   label: "",
-    //   itemWidth: 50,
-    // },
     {
       type: "title",
-      title: "合同类型",
+      title: "报价类型",
     },
     {
       type: "select",
       prop: "contractType",
-      label: "合同类型",
+      label: "报价类型",
       data: [
         {
           dictKey: "2",
@@ -392,6 +375,7 @@ const formConfig = computed(() => {
           dictValue: "外销",
         },
       ],
+      itemWidth: 50,
       fn: (val) => {
         if (val == "2") {
           formData.data.currency = currencyData.value[0].dictKey;
@@ -406,180 +390,190 @@ const formConfig = computed(() => {
       },
     },
     {
-      type: "title",
-      title: "贸易信息",
-      haveLine: true,
-    },
-    {
-      type: "slot",
-      slotName: "seller",
-      label: "",
-      itemWidth: 50,
-    },
-    {
-      type: "slot",
-      slotName: "buyer",
-      label: "",
+      type: "treeSelect",
+      prop: "companyId",
+      label: "报价公司",
+      data: treeData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
       itemWidth: 50,
+      // disabled: companyId.value != "100",
     },
     {
       type: "title",
-      title: "付款信息",
+      title: "贸易信息",
       haveLine: true,
     },
-    {
-      type: "select",
-      prop: "currency",
-      label: "币种",
-      data: currencyData.value,
-      itemWidth: 25,
-      disabled: formData.data.contractType == "2",
-    },
-    {
-      type: "number",
-      prop: "rate",
-      label: "汇率",
-      precision: 2,
-      min: 0,
-      controls: false,
-      itemWidth: 25,
-      disabled: formData.data.contractType == "2",
-    },
-    {
-      type: "select",
-      prop: "paymentMethod",
-      label: "付款方式",
-      data: fundsPaymentMethod.value,
-      itemWidth: 25,
-    },
-    {
-      type: "number",
-      prop: "advanceRatio",
-      label: "预付款比列(%)",
-      precision: 2,
-      min: 0,
-      controls: false,
-      itemWidth: 25,
-    },
-    {
-      type: "input",
-      prop: "remark",
-      label: "付款条件",
-      itemType: "textarea",
-      itemWidth: 50,
-    },
-    {
-      type: "select",
-      prop: "shroffAccountId",
-      label: "收款账号",
-      data: accountList.value,
-      itemWidth: 100,
-      fn: (val) => {
-        changeShroffAccount(val);
-      },
-    },
-    {
-      type: "input",
-      prop: "beneficiaryName",
-      label: " ",
-      placeholder: "请输入Beneficiary Name",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
-    {
-      type: "input",
-      prop: "beneficiaryAccountNumber",
-      label: " ",
-      placeholder: "请输入Beneficiary Account Number",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
-    {
-      type: "input",
-      prop: "beneficiaryBank",
-      label: " ",
-      placeholder: "请输入Beneficiary Bank",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
-    {
-      type: "input",
-      prop: "swiftCode",
-      label: " ",
-      placeholder: "请输入Swift Code",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
-    {
-      type: "input",
-      prop: "beneficiaryBankAddress",
-      label: " ",
-      placeholder: "请输入Beneficiary Bank Address",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
-    {
-      type: "input",
-      prop: "beneficiaryAddress",
-      label: " ",
-      placeholder: "请输入Beneficiary Address",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "1",
-    },
-    {
-      type: "input",
-      prop: "accountName",
-      label: "户名",
-      placeholder: "请输入户名",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "2",
-    },
-    {
-      type: "input",
-      prop: "openingBank",
-      label: "开户行",
-      placeholder: "请输入开户行",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "2",
-    },
-    {
-      type: "input",
-      prop: "accountOpening",
-      label: "账号",
-      placeholder: "请输入账号",
-      itemWidth: 50,
-      isShow: formData.data.contractType == "2",
-    },
     // {
     //   type: "slot",
-    //   slotName: "payment",
+    //   slotName: "seller",
     //   label: "",
+    //   itemWidth: 50,
     // },
     {
-      type: "title",
-      title: "交付信息",
-      haveLine: true,
-    },
-    {
-      type: "date",
-      prop: "deliveryTime",
-      label: "交货期限",
-      itemWidth: 50,
-    },
-    {
-      type: "select",
-      prop: "transportMethod",
-      label: "运输方式",
-      data: shippingMethod.value,
-      itemWidth: 50,
-    },
-    {
-      type: "input",
-      prop: "transportRemark",
-      label: "运输说明",
-      itemWidth: 50,
+      type: "slot",
+      slotName: "buyer",
+      label: "",
+      itemWidth: 100,
     },
     // {
+    //   type: "title",
+    //   title: "付款信息",
+    //   haveLine: true,
+    // },
+    // {
+    //   type: "select",
+    //   prop: "currency",
+    //   label: "币种",
+    //   data: currencyData.value,
+    //   itemWidth: 25,
+    //   disabled: formData.data.contractType == "2",
+    // },
+    // {
+    //   type: "number",
+    //   prop: "rate",
+    //   label: "汇率",
+    //   precision: 2,
+    //   min: 0,
+    //   controls: false,
+    //   itemWidth: 25,
+    //   disabled: formData.data.contractType == "2",
+    // },
+    // {
+    //   type: "select",
+    //   prop: "paymentMethod",
+    //   label: "付款方式",
+    //   data: fundsPaymentMethod.value,
+    //   itemWidth: 25,
+    // },
+    // {
+    //   type: "number",
+    //   prop: "advanceRatio",
+    //   label: "预付款比列(%)",
+    //   precision: 2,
+    //   min: 0,
+    //   controls: false,
+    //   itemWidth: 25,
+    // },
+    // {
+    //   type: "input",
+    //   prop: "remark",
+    //   label: "付款条件",
+    //   itemType: "textarea",
+    //   itemWidth: 50,
+    // },
+    // {
+    //   type: "select",
+    //   prop: "shroffAccountId",
+    //   label: "收款账号",
+    //   data: accountList.value,
+    //   itemWidth: 100,
+    //   fn: (val) => {
+    //     changeShroffAccount(val);
+    //   },
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryName",
+    //   label: " ",
+    //   placeholder: "请输入Beneficiary Name",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryAccountNumber",
+    //   label: " ",
+    //   placeholder: "请输入Beneficiary Account Number",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryBank",
+    //   label: " ",
+    //   placeholder: "请输入Beneficiary Bank",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "swiftCode",
+    //   label: " ",
+    //   placeholder: "请输入Swift Code",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryBankAddress",
+    //   label: " ",
+    //   placeholder: "请输入Beneficiary Bank Address",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryAddress",
+    //   label: " ",
+    //   placeholder: "请输入Beneficiary Address",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "1",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "accountName",
+    //   label: "户名",
+    //   placeholder: "请输入户名",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "2",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "openingBank",
+    //   label: "开户行",
+    //   placeholder: "请输入开户行",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "2",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "accountOpening",
+    //   label: "账号",
+    //   placeholder: "请输入账号",
+    //   itemWidth: 50,
+    //   isShow: formData.data.contractType == "2",
+    // },
+    // // {
+    // //   type: "slot",
+    // //   slotName: "payment",
+    // //   label: "",
+    // // },
+    // {
+    //   type: "title",
+    //   title: "交付信息",
+    //   haveLine: true,
+    // },
+    // {
+    //   type: "date",
+    //   prop: "deliveryTime",
+    //   label: "交货期限",
+    //   itemWidth: 50,
+    // },
+    // {
+    //   type: "select",
+    //   prop: "transportMethod",
+    //   label: "运输方式",
+    //   data: shippingMethod.value,
+    //   itemWidth: 50,
+    // },
+    // {
+    //   type: "input",
+    //   prop: "transportRemark",
+    //   label: "运输说明",
+    //   itemWidth: 50,
+    // },
+    // {
     //   type: "slot",
     //   slotName: "delivery",
     //   label: "",
@@ -594,25 +588,25 @@ const formConfig = computed(() => {
       slotName: "commodity",
       label: "",
     },
+    // {
+    //   type: "title",
+    //   title: "其他收费项目",
+    //   haveLine: true,
+    // },
+    // {
+    //   type: "slot",
+    //   slotName: "otherCharge",
+    //   label: "",
+    // },
     {
       type: "title",
-      title: "其他收费项目",
-      haveLine: true,
-    },
-    {
-      type: "slot",
-      slotName: "otherCharge",
-      label: "",
-    },
-    {
-      type: "title",
-      title: "合同总金额",
+      title: "报价总金额",
       haveLine: true,
     },
     {
       type: "input",
       prop: "amount",
-      label: "合同总金额",
+      label: "报价总金额",
       itemWidth: 25,
       disabled: true,
     },
@@ -620,7 +614,7 @@ const formConfig = computed(() => {
 });
 const rules = ref({
   contractType: [
-    { required: true, message: "请选择合同类型", trigger: "change" },
+    { required: true, message: "请选择报价类型", trigger: "change" },
   ],
   sellCorporationId: [
     { required: true, message: "请选择卖方公司", trigger: "change" },
@@ -672,27 +666,39 @@ const getDict = () => {
       }));
     });
 
-  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 })
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      tenantId: proxy.useUserStore().user.tenantId,
+      type: 0,
+    })
     .then((res) => {
-      accountList.value = res.rows.map((item) => {
-        return {
-          ...item,
-          label: item.alias,
-          value: item.id,
-        };
-      });
+      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) => {
@@ -831,6 +837,7 @@ const selectProduct = (goods) => {
       price: null,
       amount: "",
       fileList: [],
+      listOne: [],
     });
     proxy.msgTip("添加成功", 1);
   } else {
@@ -838,6 +845,40 @@ const selectProduct = (goods) => {
   }
 };
 
+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) {
@@ -960,6 +1001,10 @@ const handleDelete = (index) => {
   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) {

+ 1 - 1
src/components/selectCity/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="select-city">
+  <div class="select-city" style="width:100%">
     <el-select clearable filterable :placeholder="placeholder" @change="getCityData" v-model="showModel" style="width: 100%"
                :no-match-text="'无数据,请联系管理员添加'" :no-data-text="'无数据,请联系管理员添加'">
       <el-option v-for="item in data" :label="item.name" :value="item.id"> </el-option>

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

@@ -287,12 +287,11 @@ const selectConfig = computed(() => {
     },
     {
       type: "time",
-      label: "合同创建时间",
+      label: "创建时间",
       placeholder: "开始日期",
-      prop: "time",
+      prop: "beginTime",
       placeholderOne: "结束日期",
-      propOne: "time1",
-      // data: status.value,
+      propOne: "endTime",
     },
   ];
 });

File diff suppressed because it is too large
+ 870 - 201
src/views/EHSD/saleContract/priceSheetEHSD/index.vue


+ 414 - 0
src/views/EHSD/saleContract/priceSheetEstimate/index.vue

@@ -0,0 +1,414 @@
+<template>
+  <div class="pageIndexClass">
+    <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+             highlight-current-row :action-list="[
+         
+        ]" @get-list="getList">
+
+      <template #code="{ item }">
+        <div style="width: 100%">
+          <span style="color: #409eff; cursor: pointer; word-break: break-all" @click="getDtl(item,true)">{{ item.code }}</span>
+        </div>
+      </template>
+
+      <template #amount="{ item }">
+        <div>
+          <span style="padding-right: 4px">{{ item.currency }}</span>
+          <span>{{ moneyFormat(item.amount, 2) }}</span>
+        </div>
+      </template>
+
+      <template #product="{ item }">
+        <div style="width:100%;">
+          <el-popover placement="bottom-start" title="" :width="300" trigger="hover">
+            <div default>
+              <span v-for="(product,index) in item.quotationProductList">{{product.productName}} <span
+                      v-if="index<item.quotationProductList.length-1">,</span></span>
+            </div>
+            <template #reference>
+              <div style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer">
+                <span v-for="(product,index) in item.quotationProductList">{{product.productName}} <span
+                        v-if="index<item.quotationProductList.length-1">,</span></span>
+
+              </div>
+            </template>
+          </el-popover>
+        </div>
+      </template>
+
+    </byTable>
+
+    <el-dialog v-if="openAddDialog" v-model="openAddDialog" title="报价评估" width="60%" append-to-body>
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom">
+        <template #commodity>
+          <div style="width: 100%;padding-left:25px">
+            <el-table :data="formData.data.quotationProductList" style="width: 100%;" default-expand-all row-key="productId">
+              <el-table-column type="expand" width="50" align="center">
+                <template #default="scope">
+                  <el-table :data="scope.row.quotationProductBomList" style="width: 100%;" :show-header="false">
+                    <el-table-column label="" width="50" />
+                    <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="150" />
+                    <el-table-column prop="productName" label="商品名称" min-width="130" />
+                    <el-table-column label="尺寸 cm*cm*cm" width="180">
+                      <template #default="{ row, $index }">
+                        <div style="width: 100%">
+                          {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                        </div>
+                      </template>
+                    </el-table-column>
+                    <el-table-column label="数量" width="150" prop="quantity">
+                    </el-table-column>
+                    <el-table-column label="单价" width="150">
+                      <template #default="{ row, $index }">
+                        <div style="width: 100%">
+                          <el-form-item :prop="'quotationProductList.' + scope.$index + '.quotationProductBomList.' + $index + '.price'"
+                                        :rules="rules.price" :inline-message="true" class="margin-b-0 wid100">
+                            <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入" style="width: 100%" :precision="2"
+                                             :controls="false" :min="0" @change="totalAmount()" />
+                          </el-form-item>
+                        </div>
+                      </template>
+                    </el-table-column>
+                    <el-table-column prop="amount" label="小计" width="120">
+                    </el-table-column>
+                  </el-table>
+                </template>
+              </el-table-column>
+              <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="150" />
+              <el-table-column prop="productName" label="商品名称" min-width="130" />
+              <el-table-column label="尺寸 cm*cm*cm" width="180">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="数量" width="150" prop="quantity">
+              </el-table-column>
+              <el-table-column label="单价" width="150">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <el-form-item :prop="'quotationProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true"
+                                  class="margin-b-0 wid100">
+                      <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入" style="width: 100%" :precision="2"
+                                       :controls="false" :min="0" @change="totalAmount()" />
+                    </el-form-item>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="amount" label="小计" width="120">
+              </el-table-column>
+            </el-table>
+          </div>
+        </template>
+      </byForm>
+      <template #footer v-if="!isDetail">
+        <el-button @click="openAddDialog = false" size="default" v-debounce>关 闭</el-button>
+        <el-button type="primary" @click="handleSubmit(1)" size="default" v-debounce>暂 存</el-button>
+        <el-button type="primary" @click="handleSubmit(2)" size="default" v-debounce>提 交</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import { ref } from "vue";
+const { proxy } = getCurrentInstance();
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    status: 30,
+    sellCorporationId: "",
+  },
+});
+const loading = ref(false);
+const openAddDialog = ref(false);
+const quotationStatusData = ref([
+  {
+    label: "未报价",
+    value: 0,
+  },
+  {
+    label: "报价中",
+    value: 1,
+  },
+  {
+    label: "已报价",
+    value: 2,
+  },
+]);
+const selectConfig = computed(() => {
+  return [
+    {
+      label: "报价状态",
+      prop: "quotationStatus",
+      data: quotationStatusData.value,
+    },
+    {
+      type: "time",
+      label: "报价时间",
+      placeholder: "开始日期",
+      prop: "quotationTimeSta",
+      placeholderOne: "结束日期",
+      propOne: "quotationTimeEnd",
+    },
+    {
+      type: "time",
+      label: "创建时间",
+      placeholder: "开始日期",
+      prop: "beginTime",
+      placeholderOne: "结束日期",
+      propOne: "endTime",
+    },
+  ];
+});
+
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "报价单号",
+        slot: "code",
+        width: 180,
+      },
+    },
+    {
+      attrs: {
+        label: "报价金额",
+        slot: "amount",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "报价时间",
+        prop: "quotationTime",
+        width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "创建时间",
+        prop: "createTime",
+        width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "产品",
+        slot: "product",
+        "min-width": 180,
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: 120,
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          row.quotationStatus < 2
+            ? {
+                attrs: {
+                  label: "报价",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  getDtl(row);
+                },
+              }
+            : {},
+        ];
+      },
+    },
+  ];
+});
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/saleQuotation/page", sourceList.value.pagination).then((res) => {
+    res.rows.forEach((x) => {
+      x.addTagShow = false;
+      if (x.tag) {
+        x.tags = x.tag.split(",");
+      } else {
+        x.tags = [];
+      }
+    });
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+getList();
+const formDom = ref(null);
+const submitLoading = ref(false);
+const formData = reactive({
+  data: {},
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  disabled: false,
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "商品信息",
+      haveLine: true,
+    },
+    {
+      type: "slot",
+      slotName: "commodity",
+      label: "",
+    },
+    {
+      type: "title1",
+      title: "报价总金额",
+      haveLine: true,
+    },
+    {
+      type: "input",
+      prop: "amount",
+      label: "报价总金额",
+      itemWidth: 25,
+      disabled: true,
+    },
+  ];
+});
+const rules = ref({
+  price: [{ required: true, message: "请输入单价", trigger: "blur" }],
+});
+const isDetail = ref(false);
+const getDtl = (row, flag = false) => {
+  formOption.disabled = flag;
+  isDetail.value = flag;
+  openAddDialog.value = true;
+  proxy.post("/saleQuotation/detail", { id: row.id }).then((res) => {
+    formData.data = res;
+    // 城市数据回显
+    // if (formData.data.buyCountryId) {
+    //   getCityData(formData.data.buyCountryId, "20");
+    // }
+    // if (formData.data.buyProvinceId) {
+    //   getCityData(formData.data.buyProvinceId, "30");
+    // }
+    // 文件数据回显
+    let ids = [];
+    formData.data.quotationProductList.map((x) => {
+      ids.push(x.productId);
+      x.quotationProductBomList.map((y) => {
+        ids.push(y.materialId);
+      });
+    });
+    ids = Array.from(new Set(ids));
+    proxy
+      .post("/fileInfo/getList", {
+        businessIdList: ids,
+      })
+      .then((fileObj) => {
+        formData.data.quotationProductList.map((x) => {
+          x.fileList = fileObj[x.productId] || [];
+          if (x.fileList && x.fileList.length > 0) {
+            x.fileUrl = x.fileList[0].fileUrl;
+          }
+          x.quotationProductBomList.map((y) => {
+            y.fileList = fileObj[y.materialId] || [];
+            if (y.fileList && y.fileList.length > 0) {
+              y.fileUrl = y.fileList[0].fileUrl;
+            }
+          });
+        });
+      });
+  });
+};
+
+const totalAmount = () => {
+  let money = 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];
+      iele.amount = parseFloat(
+        Number(iele.quantity) * Number(iele.price)
+      ).toFixed(2);
+      money += Number(iele.amount);
+      for (let j = 0; j < iele.quotationProductBomList.length; j++) {
+        const jele = iele.quotationProductBomList[j];
+        jele.amount = parseFloat(
+          Number(jele.quantity) * Number(jele.price)
+        ).toFixed(2);
+        money += Number(jele.amount);
+      }
+    }
+  }
+  formData.data.amount = parseFloat(money).toFixed(2);
+};
+
+const handleSubmit = (type) => {
+  formDom.value.handleSubmit(() => {
+    if (
+      formData.data.quotationProductList &&
+      formData.data.quotationProductList.length > 0
+    ) {
+      submitLoading.value = true;
+      formData.data.quotationStatus = type;
+      proxy.post("/saleQuotation/edit", formData.data).then(
+        (res) => {
+          proxy.msgTip("操作成功", 1);
+          openAddDialog.value = false;
+          submitLoading.value = false;
+          getList();
+        },
+        (err) => {
+          submitLoading.value = false;
+        }
+      );
+    } else {
+      return proxy.msgTip("请添加至少一件商品", 2);
+    }
+  });
+};
+</script>
+
+<style lang="scss" scoped>
+.pic {
+  object-fit: contain;
+  width: 50px;
+  height: 50px;
+  cursor: pointer;
+  vertical-align: middle;
+}
+</style>

+ 0 - 3
src/views/dataBoard/main/productAnalysis.vue

@@ -169,9 +169,6 @@ const handlePageChange = (val) => {
   padding: 15px;
 }
 
-::v-deep(.el-table thead.is-group th.el-table__cell) {
-  // border: 1px solid #c2c5cb;
-}
 ::v-deep(
     .el-table .el-table__header-wrapper .el-table__header th,
     .el-table .el-table__fixed-header-wrapper th

+ 5 - 4
src/views/login.vue

@@ -114,9 +114,9 @@ function handleLogin() {
   proxy.$refs.loginRef.validate((valid) => {
     if (valid) {
       loading.value = true;
-      Cookies.set("tenantId", loginForm.value.tenantId, {
-        expires: 30,
-      });
+      // Cookies.set("tenantId", loginForm.value.tenantId, {
+      //   expires: 30,
+      // });
       // 勾选了需要记住密码设置在 cookie 中设置记住用户名和密码
       if (loginForm.value.rememberMe) {
         Cookies.set("username", loginForm.value.username, {
@@ -181,7 +181,8 @@ function getCookie() {
   const username = Cookies.get("username");
   const password = Cookies.get("password");
   const rememberMe = Cookies.get("rememberMe");
-  const tenantId = Cookies.get("tenantId");
+  // const tenantId = Cookies.get("tenantId");
+  const tenantId = "000000";
   loginForm.value = {
     username: username === undefined ? loginForm.value.username : username,
     password:

+ 49 - 31
src/views/production/project/technology/index.vue

@@ -142,12 +142,19 @@ let lineData = ref([
     disabled: false,
   },
 ]);
+const taskData = ref([]);
 let selectLine = ref([]);
 let dialogVisible = ref(false);
 let openProduct = ref(false);
 let modalType = ref("add");
 let rules = ref({
   name: [{ required: true, message: "请输入产线名称", trigger: "blur" }],
+  isBatchMode: [
+    { required: true, message: "请选择批量模式", trigger: "change" },
+  ],
+  productionTaskId: [
+    { required: true, message: "请选择生产任务", trigger: "change" },
+  ],
 });
 const { proxy } = getCurrentInstance();
 const selectConfig = reactive([
@@ -186,12 +193,12 @@ const config = computed(() => {
         slot: "line",
       },
     },
-    {
-      attrs: {
-        label: "适用产品",
-        slot: "product",
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "适用产品",
+    //     slot: "product",
+    //   },
+    // },
     {
       attrs: {
         label: "产线说明",
@@ -201,23 +208,23 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: "160",
+        width: "120",
         align: "center",
       },
       // 渲染 el-button,一般用在最后一列。
       renderHTML(row) {
         return [
-          {
-            attrs: {
-              label: "产品",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              updateProduct(row);
-            },
-          },
+          // {
+          //   attrs: {
+          //     label: "产品",
+          //     type: "primary",
+          //     text: true,
+          //   },
+          //   el: "button",
+          //   click() {
+          //     updateProduct(row);
+          //   },
+          // },
           {
             attrs: {
               label: "修改",
@@ -296,7 +303,7 @@ const formConfig = computed(() => {
     },
     {
       type: "radio",
-      prop: "radioaa",
+      prop: "isBatchMode",
       label: "批量模式",
       data: [
         {
@@ -310,18 +317,18 @@ const formConfig = computed(() => {
       ],
       fn: (val) => {
         if (val == "0") {
-          formData.data.unit = [];
+          formData.data.productionTaskId = "";
         }
       },
     },
     {
       type: "select",
-      prop: "unit",
+      prop: "productionTaskId",
       label: "生产任务",
-      data: [],
+      data: taskData.value,
       itemWidth: 100,
-      multiple: true,
-      isShow: formData.data.radioaa == "1",
+      multiple: false,
+      isShow: formData.data.isBatchMode == "1",
     },
     // {
     //   type: "slot",
@@ -365,13 +372,22 @@ const getList = async (req) => {
     });
 };
 const getProcesses = () => {
+  // proxy
+  //   .post("/productionProcesses/page", { pageNum: 1, pageSize: 9999 })
+  //   .then((res) => {
+  //     lineData.value = res.rows.map((x) => ({
+  //       key: x.id,
+  //       label: x.name,
+  //       disabled: false,
+  //     }));
+  //   });
   proxy
-    .post("/productionProcesses/page", { pageNum: 1, pageSize: 9999 })
-    .then((message) => {
-      lineData.value = message.rows.map((x) => ({
-        key: x.id,
-        label: x.name,
-        disabled: false,
+    .post("/produceOrderDetail/page", { pageNum: 1, pageSize: 9999 })
+    .then((res) => {
+      taskData.value = res.rows.map((x) => ({
+        ...x,
+        label: x.orderCode,
+        value: x.id,
       }));
     });
 };
@@ -380,7 +396,9 @@ const openModal = () => {
   dialogVisible.value = true;
   nodeObject.value = "";
   modalType.value = "add";
-  formData.data = {};
+  formData.data = {
+    isBatchMode: "0",
+  };
   selectLine.value = [];
 };
 const vueFlowDom = ref(null);

Some files were not shown because too many files changed in this diff