970319330@qq.com 1 неделя назад
Родитель
Сommit
1c801a033a

+ 2 - 2
src/bgj/ServiceMaterialClass/modules/add.vue

@@ -14,12 +14,12 @@
           <el-form-item  prop="brandname" :label="$t(`品牌名称`)">
             <el-input v-model="form.brandname"  :placeholder="$t(`输入品牌名称`)" style="width:300px"></el-input>
           </el-form-item>
-          <el-form-item  :label="$t(`品牌logo`)">
+          <!-- <el-form-item  :label="$t(`品牌logo`)">
             <uploadFile ref="upload" v-if="!form.attinfos || form.attinfos.length === 0" style="margin-top:10px" :folderid="folderid" accept=".JPG,.PNG,.jpg,.png" btntype="image" :bindData="{ownertable:'sa_brand_bgj',ownerid:form.sa_brand_bgjid,usetype:'default'}" @onSuccess="uploadSuccess"></uploadFile>
             <previewImage v-else  :image="form.attinfos[0]" :deletebtn="true"
               @onSuccess="clearCover"></previewImage>
             <small style="display:block;margin-top:20px" class="info">{{$t(`注:建议上传图片大小`)}}1024x1024px,{{$t('大小不超过')}}2M,{{$t('格式为')}}JPG/PNG</small>
-          </el-form-item>
+          </el-form-item> -->
         </el-form>
       </div>
       <div class="fixed__btn__panel">

+ 16 - 5
src/bgj/headquartersServiceMaterial/modules/batchUp.vue

@@ -25,16 +25,27 @@ export default {
             this.onBatchUp();
         },
         onBatchUp() {
-            //根据是否传入 btnName 切换 单数/批量 文案
             const isSingle = !!this.btnName;
+            const dataList = this.btnName ? [this.rowData] : this.rowData;
+            const filteredList = dataList.filter((item) => item.status !== 1);
+            const filterCount = dataList.length - filteredList.length;
+            if (filteredList.length === 0) {
+                this.$message({
+                    type: "warning",
+                    message: this.$t("没有可上架的物料,请检查物料状态!"),
+                });
+                return;
+            }
+            let hintText = "";
+            if (filterCount > 0) {
+                hintText = this.$t(`已过滤`) + filterCount + this.$t(`个新建状态物料,`);
+            }
             const confirmText = isSingle
                 ? this.$t("确定上架此物料吗")
-                : this.$t("确定上架这些物料吗");
+                : hintText + this.$t("确定上架这些物料吗");
             const cancelText = isSingle
                 ? this.$t("已取消上架")
                 : this.$t("已取消批量上架");
-            // 统一兼容数据格式
-            const dataList = this.btnName ? [this.rowData] : this.rowData;
             this.$confirm(confirmText + "?", this.$t("提示"), {
                 confirmButtonText: this.$t("确定"),
                 cancelButtonText: this.$t("取消"),
@@ -43,7 +54,7 @@ export default {
                 .then(async () => {
                     this.loading = true;
                     let row = [];
-                    dataList.forEach(function (item, index) {
+                    filteredList.forEach(function (item, index) {
                         row[index] = item.sc_itemid;
                     });
                     const sc_itemids_str = row.join(",");

+ 7 - 35
src/bgj/integrationrule/index.vue

@@ -105,7 +105,7 @@
             </el-table>
             <div class="editor-footer">
                 <el-button type="primary" size="small" @click="handleAddRow">新增行</el-button>
-                <el-button size="small" @click="fetchEditorData">刷新</el-button>
+                <el-button size="small" @click="clearData">刷新</el-button>
             </div>
         </div>
 
@@ -194,8 +194,8 @@ export default {
                 const cText = `${item.c_team}${item.c_symbol}${item.c_count}人,积分占比:${item.c_ratio}%`;
                 return {
                     ...item,
-                    aRuleText: item.a_count > 1 ? `${aText}(均摊)` : aText,
-                    cRuleText: item.c_count > 1 ? `${cText}(均摊)` : cText
+                    aRuleText: item.a_symbol === '>' && item.a_count > 0 ? `${aText}(均摊)` : aText,
+                    cRuleText: item.c_symbol === '>' && item.c_count > 0 ? `${cText}(均摊)` : cText
                 };
             });
         }
@@ -245,6 +245,7 @@ export default {
                 content: {
                     pageNumber: 1,
                     pageSize: 100,
+                    isused:1,
                     where: {
                         condition: ""
                     }
@@ -254,37 +255,8 @@ export default {
                 this.workOrderTypeList = res.data;
             }
         },
-        async fetchEditorData() {
-            if (this.isLoading) return;
-            this.isLoading = true;
-            try {
-                const res = await this.$api.requested({
-                    id: 2026052510103006,
-                    content: {
-                        rules: []
-                    }
-                });
-                if (res && res.data && res.data.rules) {
-                    this.editorData = res.data.rules.map((item) => ({
-                        sc_workorder_templateid: item.sc_workorder_templateid,
-                        a_symbol: item.a_symbol || "≥",
-                        a_count: item.a_count || 0,
-                        a_ratio: item.a_ratio || 0,
-                        a_team: item.a_team || "",
-                        c_symbol: item.c_symbol || "=",
-                        c_count: item.c_count || 0,
-                        c_ratio: item.c_ratio || 0,
-                        c_team: item.c_team || "",
-                        isNew: false
-                    }));
-                } else {
-                    this.editorData = [];
-                }
-            } catch (e) {
-                console.error("fetchEditorData error:", e);
-            } finally {
-                this.isLoading = false;
-            }
+        async clearData() {
+            this.editorData = [];
         },
         async fetchResultListData() {
             try {
@@ -308,7 +280,7 @@ export default {
         handleAddRow() {
             const newRow = {
                 sc_workorder_templateid: "",
-                a_symbol: "",
+                a_symbol: "=",
                 a_count: 1,
                 a_ratio: 100,
                 a_team: "组长",

+ 11 - 4
src/bgj/pointsbasedproducts/modules/add.vue

@@ -45,6 +45,7 @@
                         <el-col :span="24">
                             <el-form-item :label="$t('积分:')" prop="points">
                                 <el-input-number
+                                    style="width: 200px"
                                     v-model="form.points"
                                     :min="0"
                                     :placeholder="$t('请填写积分')"
@@ -54,6 +55,7 @@
                         <el-col :span="24">
                             <el-form-item :label="$t('价格:')" prop="price">
                                 <el-input-number
+                                    style="width: 200px"
                                     v-model="form.price"
                                     :min="0"
                                     :precision="2"
@@ -127,20 +129,20 @@
                             </el-form-item>
                         </el-col>
                         <el-col :span="24">
-                            <el-form-item :label="$t('最小订购量:')" prop="orderminqty">
+                            <el-form-item :label="$t('起订量')" prop="orderminqty">
                                 <el-input-number
                                     v-model="form.orderminqty"
                                     :min="1"
-                                    :placeholder="$t('请填写最小订购量')"
+                                    :placeholder="$t('请填写起订量')"
                                 />
                             </el-form-item>
                         </el-col>
                         <el-col :span="24">
-                            <el-form-item :label="$t('订购增量:')" prop="orderaddqty">
+                            <el-form-item :label="$t('增量:')" prop="orderaddqty">
                                 <el-input-number
                                     v-model="form.orderaddqty"
                                     :min="1"
-                                    :placeholder="$t('请填写订购增量')"
+                                    :placeholder="$t('请填写增量')"
                                 />
                             </el-form-item>
                         </el-col>
@@ -216,6 +218,11 @@
         </el-drawer>
     </div>
 </template>
+<style scope>
+    .el-input-number--mini {
+        width: 200px !important;
+    }
+</style>
 <script>
 import uploadFile from "@/components/upload/preview_upload.vue";
 import previewImage from "@/components/previewImage/index.vue";