caojunjie před 2 roky
rodič
revize
e90bc0743d

+ 3 - 3
src/components/dictbiz-dialog/main.vue

@@ -12,7 +12,7 @@
         </el-dialog>
     </div>
 </template>
-  
+
 <script>
 import {
     add
@@ -52,6 +52,7 @@ export default {
                     {
                         label: '字典排序',
                         prop: 'sort',
+                        type: 'number',
                         rules: [
                             {
                                 required: true,
@@ -110,10 +111,9 @@ export default {
     }
 };
 </script>
-  
+
 <style scoped lang="scss">
 ::v-deep .el-form-item__error {
   display: none !important;
 }
 </style>
-  

+ 56 - 0
src/views/annualBudget/detailsPage.vue

@@ -52,9 +52,24 @@
           <el-button class="el-icon-download" type="info" size="small" :disabled="!form.id" @click="openReport">
             报表打印
           </el-button>
+          <el-button class="el-icon-upload2" type="info" size="small" :disabled="!form.id" @click="excelBox = true">
+            导入明细
+          </el-button>
         </template>
       </avue-crud>
     </trade-card>
+    <el-dialog title="添加产品" append-to-body :visible.sync="excelBox" v-if="excelBox" :close-on-click-modal="false" width="555px">
+      <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+        <template slot="excelTemplate">
+          <el-button type="primary" @click="derivation">
+            点击下载<i class="el-icon-download el-icon--right"></i>
+          </el-button>
+        </template>
+      </avue-form>
+      <p style="text-align: center;color: #DC0505">
+        温馨提示 第一次导入时请先下载模板
+      </p>
+    </el-dialog>
     <!--    报表-->
     <report-dialog
         :switchDialog="switchDialog"
@@ -72,6 +87,7 @@ import {
   tradingBoxItem,
 } from "@/api/annualBudget.js";
 import reportDialog from "@/components/report-dialog/main.vue";
+import {getToken} from "@/util/auth";
 
 export default {
   name: "detailsPage",
@@ -84,6 +100,35 @@ export default {
   },
   data() {
     return {
+      excelBox:false,
+      excelForm:{},
+      excelOption: {
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: "模板下载",
+            prop: "excelTemplate",
+            formslot: true,
+            span: 24
+          },
+          {
+            label: "模板上传",
+            prop: "excelFile",
+            type: "upload",
+            drag: true,
+            loadText: "模板上传中,请稍等",
+            span: 24,
+            data:{},
+            fileType:".xls,.xlsx",
+            propsHttp: {
+              res: "data"
+            },
+            tip: "请上传 .xls,.xlsx 标准格式文件",
+            action: "/api/blade-box-tube/annualItem/import-item"
+          }
+        ]
+      },
       key: 0,
       switchDialog: false,
       form: {},
@@ -249,6 +294,14 @@ export default {
     this.key++
   },
   methods: {
+    derivation() {
+      window.open(`/api/blade-box-tube/annualItem/export/employ?${this.website.tokenHeader}=${getToken()}`);
+    },
+    uploadAfter(res, done, loading, column) {
+      this.excelBox = false;
+      this.refresh(this.form.id)
+      done();
+    },
     getGSData(row, type) {
       this[type[0]][type[1]] = row.cname
     },
@@ -291,6 +344,9 @@ export default {
       detail({id: id}).then(res => {
         this.form = res.data.data
         this.dataList = res.data.data.itemList
+        this.findObject(this.excelOption.column, "excelFile").data = {
+          id:this.form.id
+        }
         loading.close();
         this.key++
       })

+ 10 - 0
src/views/annualBudget/index.vue

@@ -22,6 +22,9 @@
           <el-button icon="el-icon-delete" :size="size" v-if="row.status == 0" :type="type" @click="$refs.crud.rowDel(row,$index)">删除
           </el-button>
         </template>
+        <template slot="corpIdsSearch" slot-scope="scope">
+          <crop-select v-model="search.corpIds" corpType="KH"></crop-select>
+        </template>
         <template slot-scope="{type,size,row,$index}" slot="menuLeft">
           <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">创建单据</el-button>
         </template>
@@ -150,6 +153,13 @@ export default {
           searchDefaultTime: ["00:00:00", "23:59:59"],
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss"
+        },{
+          label: "客户名称",
+          prop: "corpIds",
+          hide:true,
+          showColumn:false,
+          searchOrder: 1,
+          search: true
         }]
       }
     }

+ 22 - 28
src/views/product/detailsPage.vue

@@ -3,8 +3,8 @@
     <div class="borderless">
       <div class="customer-head">
         <div class="customer-back">
-          <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
-            @click="backToList">返回列表
+          <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left" @click="backToList">
+            返回列表
           </el-button>
         </div>
         <div class="add-customer-btn">
@@ -23,19 +23,14 @@
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="goodsTypeId">
             <div style="display:flex;">
-              <avue-cascader :emit-path="false" check-strictly :show-all-levels="false" v-model="form.goodsTypeId"
-                placeholder="请选择产品分类" :dic="goodsTypeList" :props="props">
-              </avue-cascader>
-              <i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px"
-                @click="goodsTypeVisible = true"></i>
+              <avue-cascader :emit-path="false" check-strictly :show-all-levels="false" v-model="form.goodsTypeId" placeholder="请选择产品分类" :dic="goodsTypeList" :props="props"></avue-cascader>
+              <i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px" @click="goodsTypeVisible = true"></i>
             </div>
           </template>
           <template slot="unit">
             <div style="display:flex;">
-              <avue-select v-model="form.unit" filterable placeholder="请选择单位" :dic="unitList" :props="props2">
-              </avue-select>
-              <i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px"
-                @click="$refs.dictbiz.open()"></i>
+              <avue-select v-model="form.unit" filterable placeholder="请选择单位" :dic="unitList" :props="props2"></avue-select>
+              <i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px" @click="$refs.dictbiz.open()"></i>
             </div>
           </template>
           <template slot="whether">
@@ -47,19 +42,14 @@
         <avue-crud ref="crud" :option="optionList" :data="data" :table-loading="loading" @saveColumn="saveColumn"
           @resetColumn="resetColumn" :cell-style="cellStyle">
           <template slot="headerSerial">
-            <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
-              :disabled="detailData.status == 1" circle></el-button>
+            <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow" :disabled="detailData.status == 1" circle></el-button>
           </template>
           <template slot="storageIdHeader" slot-scope="{column}">
-            <span style="color: #409EFF;cursor: pointer" @click.stop="storageVisible = true">仓库
-            </span>
+            <span style="color: #409EFF;cursor: pointer" @click.stop="storageVisible = true">仓库</span>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
-            <el-button size="small" type="text" @click="rowCell(row, index)">{{
-                row.$cellEdit ? "保存" : "修改"
-            }}</el-button>
-            <el-button size="small" type="text" @click="rowDel(row, index)">删除
-            </el-button>
+            <el-button size="small" type="text" @click="rowCell(row, index)">{{row.$cellEdit ? "保存" : "修改"}}</el-button>
+            <el-button size="small" type="text" @click="rowDel(row, index)">删除</el-button>
           </template>
         </avue-crud>
       </trade-card>
@@ -68,8 +58,7 @@
       <el-dialog title="设置产品分类" v-dialogDrag :visible.sync="goodsTypeVisible" class="avue-dialog"
         width="80%" append-to-body @closed="goodsTypeClosed">
         <span>
-          <!-- <avue-form :key="reload" ref="goodsType" v-model="form2" :option="option2" style="margin-top:20px">
-          </avue-form> -->
+          <!-- <avue-form :key="reload" ref="goodsType" v-model="form2" :option="option2" style="margin-top:20px"></avue-form> -->
           <goods-type></goods-type>
         </span>
         <div class="avue-dialog__footer">
@@ -77,19 +66,16 @@
           <el-button @click="saveGoodstype" type="primary" size="mini">确 定</el-button>
         </div>
       </el-dialog>
-      <el-dialog title="添加仓库" v-dialogDrag :visible.sync="storageVisible" class="avue-dialog avue-dialog--top"
-        width="30%" append-to-body @closed="storageClosed">
+      <el-dialog title="添加仓库" v-dialogDrag :visible.sync="storageVisible" class="avue-dialog avue-dialog--top" width="30%" append-to-body @closed="storageClosed">
         <span>
-          <avue-form :key="reload2" ref="storage" v-model="form3" :option="option3" style="margin-top:20px">
-          </avue-form>
+          <avue-form :key="reload2" ref="storage" v-model="form3" :option="option3" style="margin-top:20px"></avue-form>
         </span>
         <div class="avue-dialog__footer">
           <el-button @click="storageVisible = false" size="mini">取 消</el-button>
           <el-button @click="savestorage" type="primary" size="mini">确 定</el-button>
         </div>
       </el-dialog>
-      <dictbiz-dialog ref="dictbiz" title="添加单位" code="unit" parentId="1585962784498225154" @closed="getAllWorkDicts">
-      </dictbiz-dialog>
+      <dictbiz-dialog ref="dictbiz" title="添加单位" code="unit" parentId="1585962784498225154" @closed="getAllWorkDicts"></dictbiz-dialog>
     </div>
   </div>
 </template>
@@ -248,6 +234,14 @@ export default {
             }]
           },
           {
+            label: "销售数量",
+            prop: "salesVolumes",
+            type: 'number',
+            minRows: 0,
+            controls: false,
+            span: 8
+          },
+          {
             label: "标签",
             prop: "label",
             type: 'checkbox',

+ 24 - 3
src/views/product/js/optionList.js

@@ -58,11 +58,32 @@ export const option = {
       index: 5
     },
     {
+      label: "库存数量",
+      prop: "stockGoodsNumber",
+      overHidden: true,
+      index: 6
+    },{
+      label: '是否上架',
+      prop: 'upperFrame',
+      filterable: true,
+      search: true,
+      type: 'select',
+      dataType: "string",
+      index: 7,
+      dicData:[{
+        label: "上架",
+        value: 1
+      },{
+        label: "下架",
+        value: 0
+      }]
+    },
+    {
       label: "备注",
       prop: "remarks",
       search: true,
       overHidden: true,
-      index: 6
+      index: 8
     },
     {
       label: "状态",
@@ -79,7 +100,7 @@ export const option = {
       hide: true,
       showColumn: false,
       overHidden: true,
-      index: 7
+      index: 9
     },
     {
       label: "标签",
@@ -96,7 +117,7 @@ export const option = {
       hide: true,
       showColumn: false,
       overHidden: true,
-      index: 8
+      index: 10
     }
   ]
 }

+ 0 - 1
src/views/salesOrder/index.vue

@@ -313,7 +313,6 @@ export default {
   },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(211), option);
-    this.option.height = window.innerHeight - 210;
     this.getAllWorkDicts()
     this.getWorkDicts("order_status_pjjl").then(res => {
       this.findObject(this.option.column, "status").dicData = res.data.data;

+ 1 - 0
src/views/salesOrder/js/optionList.js

@@ -4,6 +4,7 @@ export const option = {
   searchShow: true,
   searchMenuSpan: 8,
   align: "center",
+  height:"auto",
   searchSpan: 8,
   tip: false,
   expand: true,