瀏覽代碼

全局功能更改

cz 1 年之前
父節點
當前提交
d922502717

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

@@ -47,7 +47,7 @@
               label: i.propsTreeLabel || 'label',
               children: i.propsTreeChildren || 'children',
             }" value-key="id" :placeholder="i.placeholder || $t('common.pleaseSelect')" :disabled="i.disabled ? i.disabled : false" check-strictly
-                          :style="i.style?i.style:{width:'100%'}" default-expand-all />
+                          :style="i.style?i.style:{width:'100%'}" default-expand-all @change="(e) => commonsEmit(e, i)" />
           <el-date-picker v-model="formData[i.prop]" :readonly="i.readonly ? i.readonly : false" v-else-if="i.type == 'date'" :type="i.itemType"
                           :placeholder="i.placeholder || $t('common.pleaseSelectTime')" @change="(e) => commonsEmit(e, i)"
                           :disabled="i.disabled ? i.disabled : false" :format="i.format ? i.format : dateFormatInit(i.itemType)"

+ 51 - 4
src/components/byTable/index.vue

@@ -66,7 +66,7 @@
           </div>
           <div v-else>
             <div class="by-dropdown-title">
-              {{i.label || i.labelCopy}}
+              {{getSelectLabel(pagination[i.prop],i) || i.label || i.labelCopy}}
               <i style="margin-left: 5px" class="iconfont icon-iconm_xialan1"></i>
             </div>
             <ul class="by-dropdown-lists">
@@ -81,12 +81,17 @@
         </div>
       </div>
 
-      <div style="display: flex">
+      <div style="display: flex;align-items:center">
         <el-input :placeholder="$t('common.pleaseEnterKeywords')" suffix-icon="search" size="mini" v-model="pagination.keyword"
                   @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="onMoreSearch">
+        <el-icon :size="16" style="cursor:pointer;margin-left: 10px" @click="searchFn">
+          <Search />
+        </el-icon>
+        <el-icon :size="16" style="cursor:pointer;margin-left: 10px" @click="searchReset">
+          <Refresh />
+        </el-icon>
+        <div class="more-icon" @click="retrievalModalFn" v-if="false">
           <i class="iconfont icon-iconx_saixuan"></i>
         </div>
       </div>
@@ -326,6 +331,16 @@ export default defineComponent({
     const getParent = computed(() => {
       return proxy.$parent;
     });
+    // 复制过滤条件
+    // const firstValue = ref(true);
+    const paginationCopy = ref({});
+    // if (firstValue.value) {
+    //   paginationCopy.value = Object.freeze(proxy.deepClone(props.pagination));
+    //   firstValue.value = false;
+    // }
+
+    paginationCopy.value = Object.freeze(proxy.deepClone(props.pagination));
+
     const getPagination = computed(() => {
       const params = {
         pageNum: 1,
@@ -389,6 +404,18 @@ export default defineComponent({
       proxy.$emit("moreSearch", "");
       //获取父组件定义的moreSearch方法
     };
+
+    const searchReset = () => {
+      proxy.$emit(
+        "getList",
+        Object.assign(props.filterParams, {
+          ...paginationCopy.value,
+          type: "",
+          status: "",
+        })
+      );
+    };
+
     const handlePageChange = (val) => {
       proxy.$emit(
         "getList",
@@ -449,6 +476,24 @@ export default defineComponent({
       );
     };
 
+    const getSelectLabel = (value, item) => {
+      if (value !== "" && value != undefined) {
+        let current = item.data.find(
+          (x) => x.value == value || x.dictKey == value
+        );
+        if (current) {
+          if (current.label) {
+            return current.label;
+          }
+          if (current.dictValue) {
+            return current.dictValue;
+          }
+        }
+      } else {
+        return item.labelCopy;
+      }
+    };
+
     const searchItemSelctOne = (item, prop, propOne) => {
       if (prop && propOne) {
         proxy.$emit(
@@ -500,11 +545,13 @@ export default defineComponent({
       handleNativeClick,
       searchFn,
       searchItemSelct,
+      getSelectLabel,
       searchItemSelctOne,
       selectConfigCopy,
       isSelectable,
       retrievalModal,
       retrievalModalFn,
+      searchReset,
       statSelectVal,
       statWarpHeight,
       isMore,

+ 1 - 0
src/components/product/SelectMaterial.vue

@@ -539,6 +539,7 @@ const clickSelect = (item) => {
   justify-content: space-between;
   .tree {
     width: 300px;
+    border-right: 1px solid rgb(223, 221, 221);
   }
   .content {
     width: calc(100% - 310px);

+ 67 - 45
src/components/product/SelectProduct.vue

@@ -105,6 +105,10 @@ import { watch } from "vue";
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   alreadySelectData: Array,
+  companyId: {
+    type: String,
+    default: "",
+  },
 });
 const tableHeight = ref(0);
 const getTableHeight = () => {
@@ -126,6 +130,7 @@ const treeListData = ref([]);
 const innerMethon = ref([]);
 const outsideMethon = ref([]);
 const productUnit = ref([]);
+const companyData = ref([]);
 const accountCurrency = ref([]);
 const sourceList = ref({
   data: [],
@@ -168,11 +173,11 @@ let rules = ref({
   ],
 });
 
-const selectConfig = reactive([
+const selectConfig = computed(() => [
   // {
-  //   label: "产品类型",
-  //   prop: "type",
-  //   data: [],
+  //   label: "归属公司",
+  //   prop: "companyId",
+  //   data: companyData.value,
   // },
 ]);
 const config = computed(() => {
@@ -187,39 +192,46 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "归属公司",
+        prop: "companyName",
+        width: 150,
+      },
+    },
+    {
+      attrs: {
         label: "产品分类",
         prop: "classifyName",
-        "min-width": 150,
+        "min-width": 200,
       },
     },
     {
       attrs: {
         label: "产品编码",
         prop: "customCode",
-        width: 120,
+        width: 180,
       },
     },
     {
       attrs: {
         label: "产品名称",
         slot: "name",
-        "min-width": 150,
-      },
-    },
-    {
-      attrs: {
-        label: "产品英文名",
-        prop: "nameEnglish",
-        "min-width": 120,
-      },
-    },
-    {
-      attrs: {
-        label: "产品规格",
-        prop: "spec",
-        width: 120,
+        "min-width": 200,
       },
     },
+    // {
+    //   attrs: {
+    //     label: "产品英文名",
+    //     prop: "nameEnglish",
+    //     "min-width": 120,
+    //   },
+    // },
+    // {
+    //   attrs: {
+    //     label: "产品规格",
+    //     prop: "spec",
+    //     width: 120,
+    //   },
+    // },
     {
       attrs: {
         label: "尺寸",
@@ -246,11 +258,25 @@ const config = computed(() => {
         width: 100,
       },
     },
+    // {
+    //   attrs: {
+    //     label: "海关编码",
+    //     prop: "hsCode",
+    //     width: 100,
+    //   },
+    // },
     {
       attrs: {
-        label: "海关编码",
-        prop: "hsCode",
-        width: 100,
+        label: "原材料编码",
+        prop: "rawMaterialCode",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "原材料",
+        prop: "rawMaterialName",
+        "min-width": 300,
       },
     },
     {
@@ -676,33 +702,28 @@ const handleSuccess = (res) => {
 };
 const getDict = () => {
   proxy
-    .getDictOne([
-      "inner_packaging_method_ehsd",
-      "outside_packaging_method_ehsd",
-      "unit",
-      "account_currency",
-    ])
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      tenantId: proxy.useUserStore().user.tenantId,
+      type: 0,
+    })
     .then((res) => {
-      innerMethon.value = res["inner_packaging_method_ehsd"].map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-      outsideMethon.value = res["outside_packaging_method_ehsd"].map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-      productUnit.value = res["unit"].map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-      accountCurrency.value = res["account_currency"].map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
+      companyData.value = res.data.map((x) => ({
+        ...x,
+        label: x.deptName,
+        value: x.deptId,
       }));
+      // treeDataOne.value = proxy.handleTree(res.data, "deptId");
     });
 };
 getDict();
 getTreeList();
+
+if (props && props.companyId) {
+  sourceList.value.pagination.companyId = props.companyId;
+}
 getList();
 const clickSelect = (item) => {
   item.selectType = "1";
@@ -748,6 +769,7 @@ const handleOpenProductContract = (row) => {
   justify-content: space-between;
   .tree {
     width: 300px;
+    border-right: 1px solid rgb(223, 221, 221);
   }
   .content {
     width: calc(100% - 310px);

+ 1 - 5
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -8,11 +8,6 @@
     <div class="content">
       <byTable :source="sourceList.data" :tableHeight="tableHeight" :pagination="sourceList.pagination" :config="config" :loading="loading"
                highlight-current-row :selectConfig="selectConfig" :action-list="[
-               {
-                text: 'Excel导入',
-                action: () => openExcel(),
-                disabled: false,
-              },
               {
                 text: '添加',
                 action: () => openModal('add'),
@@ -200,6 +195,7 @@ const sourceList = ref({
     productClassifyId: "",
     keyword: "",
     definition: "1",
+    companyId: "",
   },
 });
 const dialogVisible = ref(false);

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

@@ -257,7 +257,9 @@ const sourceList = ref({
     pageSize: 10,
     keyword: "",
     status: "",
-    sellCorporationId: "",
+    companyId: "",
+    userId: "",
+    isSettled: "",
     beginTime: "",
     endTime: "",
   },

文件差異過大導致無法顯示
+ 293 - 480
src/views/EHSD/saleContract/priceSheetEHSD/index.vue


+ 108 - 57
src/views/EHSD/saleContract/priceSheetEstimate/index.vue

@@ -13,7 +13,7 @@
 
       <template #status="{ item }">
         <div style="width: 100%">
-          <span :style="{color: item.status ==99? 'red' :''}">{{dictValueLabel(item.status, statusData)}}</span>
+          <span :style="{color: item.status ==88? 'red' :''}">{{dictValueLabel(item.status, statusData)}}</span>
         </div>
       </template>
 
@@ -54,51 +54,72 @@
 
     </byTable>
 
-    <el-dialog v-if="openAddDialog" v-model="openAddDialog" title="报价评估" width="60%" append-to-body>
+    <el-dialog v-if="openAddDialog" v-model="openAddDialog" title="报价评估" width="80%" 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>
+                  <div style="padding-left:50px">
+                    <div style="margin-bottom:10px;margin-left:-20px">
+                      <TitleInfo content='BOM单:'></TitleInfo>
+                    </div>
+                    <el-table :data="scope.row.quotationProductBomList" style="width: 100%;" border class="bom-table">
+                      <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="190" />
+                      <el-table-column prop="productName" label="物料名称" min-width="200" />
+                      <el-table-column label="尺寸 cm*cm*cm" width="150">
+                        <template #default="{ row, $index }">
+                          <div style="width: 100%">
+                            {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                          </div>
+                        </template>
+                      </el-table-column>
+                      <el-table-column prop="quantity" label="数量" width="80">
+                        <!-- <template #default="{ row, $index }">
+                          <div style="width: 100%">
+                            <el-form-item :prop="'quotationProductList.' + scope.$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" @change="changeQuantity()" />
+                            </el-form-item>
+                          </div>
+                        </template> -->
+                      </el-table-column>
+                      <el-table-column prop="allQuantity" label="总量" width="80" />
+                      <el-table-column label="单价" width="110">
+                        <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="110">
+                      </el-table-column>
+                      <el-table-column label="备注" width="180" prop="remark">
+                      </el-table-column>
+                      <el-table-column label="操作" width="60" align="center" fixed="right" v-if="!isDetail">
+                        <template #default="{ $index }">
+                          <el-button type="primary" link @click="handleDeleteMaterial(scope.$index,$index)">删除</el-button>
+                        </template>
+                      </el-table-column>
+                    </el-table>
+                  </div>
                 </template>
               </el-table-column>
-              <el-table-column label="商品图片" width="80">
+              <el-table-column label="图片" width="80">
                 <template #default="{ row }">
                   <div v-if="row.fileUrl">
                     <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
@@ -106,27 +127,18 @@
                   <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">
+              <el-table-column prop="productCode" label="商品编码" width="190" />
+              <el-table-column prop="productName" label="商品名称" min-width="200" />
+              <el-table-column label="尺寸 cm*cm*cm" width="150">
                 <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 label="数量" width="120" 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 label="单价" width="120" prop="price">
               </el-table-column>
               <el-table-column prop="amount" label="小计" width="120">
               </el-table-column>
@@ -155,8 +167,14 @@ const sourceList = ref({
     pageNum: 1,
     pageSize: 10,
     keyword: "",
-    status: 30,
-    sellCorporationId: "",
+    status: "",
+    type: "",
+    quotationStatus: "",
+    companyId: "",
+    quotationTimeSta: "",
+    quotationTimeEnd: "",
+    beginTime: "",
+    endTime: "",
   },
 });
 const loading = ref(false);
@@ -172,7 +190,7 @@ const statusData = ref([
   },
   {
     label: "作废",
-    value: 99,
+    value: 88,
   },
 ]);
 const quotationStatusData = ref([
@@ -364,6 +382,8 @@ const getDtl = (row, flag = false) => {
     // if (formData.data.buyProvinceId) {
     //   getCityData(formData.data.buyProvinceId, "30");
     // }
+    // 价格计算
+    changeQuantity();
     // 文件数据回显
     let ids = [];
     formData.data.quotationProductList.map((x) => {
@@ -394,12 +414,43 @@ const getDtl = (row, flag = false) => {
   });
 };
 
+const changeQuantity = () => {
+  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.quantity) {
+        for (let j = 0; j < iele.quotationProductBomList.length; j++) {
+          const jele = iele.quotationProductBomList[j];
+          jele.allQuantity = iele.quantity * jele.quantity;
+        }
+      }
+    }
+    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++) {
+      let iele = formData.data.quotationProductList[i];
+      let productPrice = 0;
+      for (let j = 0; j < iele.quotationProductBomList.length; j++) {
+        const jele = iele.quotationProductBomList[j];
+        productPrice += Number(
+          parseFloat(Number(jele.quantity) * Number(jele.price)).toFixed(2)
+        );
+      }
+      iele.price = parseFloat(productPrice).toFixed(2);
+    }
+
     for (let i = 0; i < formData.data.quotationProductList.length; i++) {
       let iele = formData.data.quotationProductList[i];
       iele.amount = parseFloat(
@@ -409,12 +460,12 @@ const totalAmount = () => {
       for (let j = 0; j < iele.quotationProductBomList.length; j++) {
         const jele = iele.quotationProductBomList[j];
         jele.amount = parseFloat(
-          Number(jele.quantity) * Number(jele.price)
+          Number(jele.allQuantity) * Number(jele.price)
         ).toFixed(2);
-        money += Number(jele.amount);
       }
     }
   }
+
   formData.data.amount = parseFloat(money).toFixed(2);
 };
 

+ 9 - 3
src/views/EHSD/saleContract/priceSheetForeign/index.vue

@@ -20,7 +20,7 @@
 
       <template #status="{ item }">
         <div style="width: 100%">
-          <span :style="{color: item.status ==99? 'red' :''}">{{dictValueLabel(item.status, statusData)}}</span>
+          <span :style="{color: item.status ==88? 'red' :''}">{{dictValueLabel(item.status, statusData)}}</span>
         </div>
       </template>
 
@@ -148,7 +148,7 @@ const statusData = ref([
   },
   {
     label: "作废",
-    value: 99,
+    value: 88,
   },
 ]);
 const quotationStatusData = ref([
@@ -183,7 +183,13 @@ const sourceList = ref({
     pageSize: 10,
     keyword: "",
     status: "",
-    sellCorporationId: "",
+    type: "",
+    quotationStatus: "",
+    companyId: "",
+    quotationTimeSta: "",
+    quotationTimeEnd: "",
+    beginTime: "",
+    endTime: "",
   },
 });
 const loading = ref(false);

+ 2 - 0
src/views/MES/productionMaterial/index.vue

@@ -90,6 +90,8 @@ const sourceList = ref({
     pageSize: 10,
     keyword: "",
     status: "0",
+    beginTime: "",
+    endTime: "",
   },
 });
 const treeData = ref([]);

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

@@ -54,6 +54,11 @@ const sourceList = ref({
     pageNum: 1,
     pageSize: 10,
     keyword: "",
+    produceStatus: "",
+    staDeliveryPeriod: "",
+    endDeliveryPeriod: "",
+    beginTime: "",
+    endTime: "",
   },
 });
 const treeData = ref([]);

+ 5 - 0
src/views/MES/productionTask/index.vue

@@ -90,6 +90,11 @@ const sourceList = ref({
     pageNum: 1,
     pageSize: 10,
     keyword: "",
+    produceStatus: "",
+    staDeliveryPeriod: "",
+    endDeliveryPeriod: "",
+    beginTime: "",
+    endTime: "",
   },
 });
 const treeData = ref([]);

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

@@ -74,6 +74,11 @@ const sourceList = ref({
     pageNum: 1,
     pageSize: 10,
     keyword: "",
+    produceStatus: "",
+    staDeliveryPeriod: "",
+    endDeliveryPeriod: "",
+    beginTime: "",
+    endTime: "",
   },
 });
 const treeData = ref([]);

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

@@ -93,6 +93,8 @@ const sourceList = ref({
     total: 3,
     pageNum: 1,
     pageSize: 10,
+    supplierType: "",
+    definition: "",
   },
 });
 let dialogVisible = ref(false);

部分文件因文件數量過多而無法顯示