浏览代码

首页 弹出框修改

caojunjie 2 年之前
父节点
当前提交
879e583785

+ 87 - 0
src/views/tirePartsMall/configuration/commodity.json

@@ -0,0 +1,87 @@
+{
+  "align": "center",
+  "height": "auto",
+  "calcHeight": 80,
+  "stripe": true,
+  "tip": false,
+  "addBtn": false,
+  "searchShow": true,
+  "searchShowBtn": false,
+  "menu": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 80,
+  "searchSpan": 8,
+  "searchMenuSpan": 8,
+  "searchMenuPosition": "right",
+  "border": true,
+  "index": true,
+  "selection": true,
+  "dialogClickModal": false,
+  "column": [
+    {
+      "label": "轮胎名称",
+      "prop": "cname",
+      "search": true,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "数量",
+      "prop": "goodsNum",
+      "slot": true,
+      "overHidden": true,
+      "width": 120
+    },
+    {
+      "label": "库存",
+      "prop": "goodsTypeName",
+      "hide": true,
+      "addDisabled": false,
+      "multiple": true,
+      "overHidden": true
+    },
+    {
+      "label": "轮胎编码",
+      "prop": "code",
+      "slot": true,
+      "overHidden": true
+    },
+    {
+      "label": "品牌",
+      "prop": "brandName",
+      "slot": true,
+      "overHidden": true
+    },
+    {
+      "label": "规格型号",
+      "prop": "specificationAndModel",
+      "slot": true,
+      "overHidden": true
+    },
+    {
+      "label": "花纹",
+      "prop": "brandItem",
+      "slot": true,
+      "overHidden": true
+    },
+    {
+      "label": "轮胎描述",
+      "prop": "goodsDescription",
+      "slot": true,
+      "overHidden": true
+    },
+    {
+      "label": "单位",
+      "prop": "unit",
+      "slot": true,
+      "overHidden": true
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "slot": true
+    }
+  ]
+}

+ 76 - 0
src/views/tirePartsMall/configuration/commodityxsho.json

@@ -0,0 +1,76 @@
+{
+  "align": "center",
+  "height": "auto",
+  "calcHeight": 80,
+  "stripe": true,
+  "tip": false,
+  "addBtn": false,
+  "searchShow": true,
+  "searchShowBtn": false,
+  "menu": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 80,
+  "searchSpan": 8,
+  "searchMenuSpan": 8,
+  "searchMenuPosition": "right",
+  "border": true,
+  "index": true,
+  "selection": true,
+  "dialogClickModal": false,
+  "column": [
+    {
+      "label": "轮胎名称",
+      "prop": "cname",
+      "search": true,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "数量",
+      "prop": "goodsNum",
+      "slot": true,
+      "overHidden": true,
+      "width": 120
+    },
+    {
+      "label": "库存",
+      "prop": "inventory",
+      "addDisabled": false,
+      "multiple": true,
+      "overHidden": true
+    },
+    {
+      "label": "规格型号",
+      "prop": "specificationAndModel",
+      "slot": true,
+      "overHidden": true
+    },
+    {
+      "label": "公司",
+      "prop": "salesCompanyName",
+      "slot": true,
+      "overHidden": true
+    },
+    {
+      "label": "品牌",
+      "prop": "brandName",
+      "slot": true,
+      "overHidden": true
+    },
+
+    {
+      "label": "花纹",
+      "prop": "brandItem",
+      "slot": true,
+      "overHidden": true
+    },
+    {
+      "label": "共享公司",
+      "prop": "sharedCompany",
+      "slot": true,
+      "overHidden": true
+    }
+  ]
+}

+ 358 - 31
src/views/tirePartsMall/salesManagement/purchaseOrder/detailsPage.vue

@@ -78,18 +78,34 @@
                             <template slot-scope="{scope,row}" slot="menuLeft">
                                 <el-button type="primary" icon="el-icon-plus" size="small" :disabled="isAddBtn"
                                     @click="rowAdd(row)">添加轮胎</el-button>
-                                <el-button type="primary" icon="el-icon-printer" size="small"
-                                    @click="handlePrint">打印</el-button>
                                     <el-button type="success" size="small" :disabled="isrowAdd" icon="el-icon-bottom" @click="excelBox = true">导入
-                                </el-button> 
+                                </el-button>
+                                <el-button type="primary" icon="el-icon-printer" size="small"
+                                           @click="handlePrint">打印</el-button>
                             </template>
                             <template slot="goodsId" slot-scope="{ row }">
-                                <el-select v-if="row.$cellEdit" v-model="row.goodsId" allow-create filterable default-first-option >
-                                    <el-option v-for="(item, index) in goodsIdoptions" :key="index" :label="item.cname"
+                                <!--<el-select v-if="row.$cellEdit" v-model="row.goodsId" allow-create filterable default-first-option >-->
+                                <!--    <el-option v-for="(item, index) in goodsIdoptions" :key="index" :label="item.cname"-->
+                                <!--        :value="item.id"></el-option>-->
+                                <!--</el-select>-->
+                                <span>{{ row.goodsName }}</span>
+                            </template>
+                            <template slot="goodsNum" slot-scope="{ row }">
+                                <el-input v-if="row.goodsNumtype" size="small" v-model="row.goodsNum" style="width: 100%"></el-input>
+                                <span v-else>{{ row.goodsNum }}</span>
+                            </template>
+                            <template slot="price" slot-scope="{ row }">
+                                <el-input v-if="row.pricetype" size="small" v-model="row.price" style="width: 100%"></el-input>
+                                <span v-else>{{ row.price }}</span>
+                            </template>
+                            <template slot="dot" slot-scope="{ row }">
+                                <el-select v-if="row.dotedittype && row.whether=='1'" v-model="row.dot" allow-create filterable default-first-option >
+                                    <el-option v-for="(item, index) in picihaolist" :key="index" :label="item.dot"
                                         :value="item.id"></el-option>
                                 </el-select>
-                                <span v-else>{{ row.goodsName }}</span>
+                                <span v-else>{{ row.dot }}</span>
                             </template>
+
                             <!-- <template slot-scope="{scope,row}" slot="goodsNum">
                                 <el-input size="small" v-model="formContacts.goodsNum" style="width: 100%">
                                     <template slot="inventory">{{ inventory }}吨</template>
@@ -107,8 +123,11 @@
                                 </span>
                             </template> -->
                             <template slot-scope="{type,size,row,index,disabled}" slot="menu">
-                                <el-button :size="size" :disabled="disabled || isAdd" :type="type"
-                                    :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="editBtn(row, index)">编辑
+                                <el-button v-if="mingxibaocun" :size="size" :disabled="disabled || isAdd" :type="type"
+                                    :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="hangeditBtn(row, index)">编辑
+                                </el-button>
+                                <el-button v-else :size="size" :disabled="disabled || isAdd" :type="type"
+                                           :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="hangbaocun(row, index)">保存
                                 </el-button>
                                 <el-button icon="el-icon-delete" :size="size" :disabled="disabled || isDisabled"
                                     :type="type" @click="rowDelBox(row, index, 'orderItemsList')">删除
@@ -177,6 +196,54 @@
             </p>
         </el-dialog>
         </div>
+
+        <el-dialog title="选择轮胎" append-to-body class="el-dialogDeep" :visible.sync="dialogVisible" width="80%"
+                   :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="closeGoods">
+            <el-row :style="{ height: rowHeight }">
+                <el-col :span="5" style="height: 100%;overflow-y: auto">
+                    <div>
+                        <el-scrollbar>
+                            <basic-container>
+                                <avue-tree :option="treeOption" :data="treeDataGoods" @node-click="nodeClick" />
+                            </basic-container>
+                        </el-scrollbar>
+                    </div>
+                </el-col>
+                <el-col :span="19">
+                    <basic-container>
+                        <avue-crud :option="optionTwo" :table-loading="loading" :data="goodsListShow" ref="crud"
+                                   @refresh-change="refreshChange" @selection-change="selectionChange" @search-change="goodsSearch"
+                                   :page.sync="page" @on-load="onLoad">
+                            <template slot="menuLeft">
+                                <el-tabs v-model="activeNameTabs" @tab-click="tabHandle">
+                                    <el-tab-pane label="查询结果" name="searchList" />
+                                    <el-tab-pane label="已选定数据" name="importStaging" />
+                                </el-tabs>
+                            </template>
+                            <template slot="goodsNum" slot-scope="{row}">
+                                <el-input-number v-model="row.goodsNum" size="small" :controls="false" :precision="0"
+                                                 @input="amountChange(row)" style="width: 100%" />
+                            </template>
+                            <template slot-scope="scope" slot="menu">
+                                <el-button type="text" icon="el-icon-edit" size="small"
+                                           @click.stop="importStagList(scope.row, scope.index)" v-if="activeNameTabs == 'searchList'"
+                                           :disabled="goodsListSave.findIndex(item => item.id == scope.row.id) !== -1">选择
+                                </el-button>
+                                <el-button type="text" icon="el-icon-delete" size="small"
+                                           @click.stop="removeStagList(scope.row, scope.index)" v-else>移除
+                                </el-button>
+                            </template>
+                        </avue-crud>
+                    </basic-container>
+                </el-col>
+            </el-row>
+            <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false" :loading="saveLoading">取 消</el-button>
+        <el-button type="primary" @click="importGoods" v-if="commodityData !== true" :loading="saveLoading">导入</el-button>
+        <!--<el-button type="primary" @click="importChoice" v-if="commodityData === true" :loading="saveLoading"-->
+        <!--           :disabled="tableData.length !== 1">导入</el-button>-->
+      </span>
+        </el-dialog>
     </div>
 </template>
 
@@ -189,19 +256,70 @@ import { dotList, goodsDetail } from "@/api/tirePartsMall/purchasingManagement/w
 import reportDialog from "@/components/report-dialog/main";
 import checkSchedule from "@/components/check/checkSchedule";
 import check from "@/components/check/check";
-import { getList } from "@/api/paymentManagement/paymentRecord"
+import {getCorpType, getList} from "@/api/tirePartsMall/basicData/commodityInformation"
 import TicketDistribution from "../../../oceanShipping/maritimeExport/components/ticketDistribution.vue";
 import M from "minimatch";
 import da from "element-ui/src/locale/lang/da";
 import { number } from "echarts";
+import {getDeptLazyTreeTwo} from "@/api/basicData/basicFeesDesc";
+import commodity from "../../configuration/commodity.json";
 export default {
     name: "detailsPage",
 
     data() {
         return {
+            // 编辑还是保存
+            mingxibaocun:true,
+            // 批次号请求到的数据
+            picihaolist:[],
+            // 添加轮胎弹窗
+            dialogVisible:false,
+            // 弹窗高度
+            rowHeight: '',
+            // 左侧选择搜索
+            treeDataGoods: [],
+            treeDeptId: '',
+            page: {
+                pageSize: 10,
+                currentPage: 1,
+                total: 0,
+                pageSizes: [10, 50, 100, 300, 500]
+            },
+            pageList: {
+                pageSize: 10,
+                currentPage: 1,
+                total: 0
+            },
+            // 左侧选择
+            treeOption:{
+                addBtn: false,
+                menu: false,
+                size: "small",
+                props: {
+                labelText: "标题",
+                    label: "title",
+                    value: "value",
+                }
+            },
+            // 表格需要的配置
+            optionTwo: commodity,
+            loading: false,
+            // 商品列表数据合计
+            goodsListShow: [],
+            // 商品列表暂存
+            goodsListSave: [],
+            saveLoading: false,
+            commodityData: false,
+            surplusRouteQuantityOption: [],
+            tableData: [],
+            // tabs切换
+            activeNameTabs:'searchList',
+            data:[],
+
             inventory: 0,
             isStatus: 1,
             excelBox:false,
+            // 轮胎名称
             goodsIdoptions: [],
             dataList: [],
             dicUrlWithCustomId: '',
@@ -341,7 +459,7 @@ export default {
                     //     message: " ",
                     //     trigger: "blur"
                     // }]
-                }, 
+                },
                 // {
                 //     label: '来源单号',
                 //     prop: "srcOrdNo",
@@ -384,7 +502,7 @@ export default {
 
                     prop: "phone",
                 }, {
-                    label: '收货地址',
+                    label: '地址',
                     prop: "recAddress",
                     type: 'select',
                     disabled: false,
@@ -410,7 +528,7 @@ export default {
                 //     disabled: false,
 
                 //     prop: "logisticsCorpName"
-                // }, 
+                // },
                 // {
                 //     label: '成本',
                 //     prop: "cost",
@@ -420,7 +538,7 @@ export default {
                 //     label: '毛利',
                 //     prop: "grossProfit",
                 //     disabled: true
-                // }, 
+                // },
                 // {
                 //     label: '采购金额',
                 //     prop: "salesAmount",
@@ -430,9 +548,9 @@ export default {
                 //     label: '运费',
                 //     prop: "freight",
                 //     disabled: true
-                // }, 
+                // },
                 {
-                    label: '应类别',
+                    label: '应类别',
                     prop: "receivableType",
                     type: "select",
                     disabled: false,
@@ -442,19 +560,19 @@ export default {
                         value: "dictValue"
                     },
                     value: '网络支付'
-                }, 
+                },
                 {
                     label: '总金额',
                     prop: "totalMoney",
                     disabled: true
                 },
-                
+
                 {
                     label: '结算金额',
                     prop: "paymentAmountTl",
                     disabled: true
                 },
-                
+
                 {
                     label: '单据编号',
                     prop: "ordNo",
@@ -485,8 +603,13 @@ export default {
                 addBtn: false,
                 span: 8,
                 height: 500,
+                // 添加
                 addRowBtn: false,
+                // 保存按钮
                 editBtn: false,
+                // 航编辑开启
+                cellBtn:true,
+                rowKey:'ids',
                 delBtn: false,
                 menuWidth: 140,
                 dialogTop: 25,
@@ -530,6 +653,7 @@ export default {
                     prop: 'goodsNum',
                     overHidden: true,
                     disabled: false,
+                    cell:true,
                     width: 100,
                     rules: [{
                         required: true,
@@ -553,6 +677,7 @@ export default {
                     overHidden: true,
                     width: 100,
                     disabled: false,
+                    cell:true,
                     rules: [{
                         required: true,
                         message: " ",
@@ -577,6 +702,8 @@ export default {
                 }, {
                     label: '批次号',
                     prop: 'dot',
+                        cell:true,
+                        width:120,
                     type: "select",
                     disabled: true,
                     allowCreate: true,
@@ -597,16 +724,10 @@ export default {
                 },
                 {
                     label: '品牌',
-                    prop: 'brandId',
+                    prop: 'brandName',
                     disabled: false,
                     width: 100,
                     overHidden: true,
-                    type: 'select',
-                    props: {
-                        label: 'cname',
-                        value: 'id'
-                    },
-                    dicUrl: '/api/blade-sales-part/brandDesc/listAll'
                 },
                 {
                     label: '规格型号',
@@ -656,7 +777,7 @@ export default {
                 //     prop: 'profit',
                 //     overHidden: true,
                 //     width: 100
-                // }, 
+                // },
                 {
                     label: '小计',
                     prop: 'subTotalMoney',
@@ -671,7 +792,7 @@ export default {
                 //     prop: 'thisAmount',
                 //     overHidden: true,
                 //     width: 100
-                // }, 
+                // },
                 // {
                 //     label: '成本',
                 //     prop: 'costprie',
@@ -885,7 +1006,6 @@ export default {
             this.isAdd = true
             this.refresh(this.onLoad.id, true)
         } else if (this.onLoad.id) {
-            console.log(2);
             this.refresh(this.onLoad.id, true)
         }
         if (!this.form.id) {
@@ -918,6 +1038,12 @@ export default {
             this.isExamineBtn = false
             // this.batchNo = this.detailData.check.batchNo
         }
+
+        if (this.detailData.id) {
+            this.getDetailsfun()
+        }
+
+
     },
 
     watch: {
@@ -991,13 +1117,212 @@ export default {
         }
     },
 
+    mounted() {
+        this.$nextTick(() => {
+            // 监听浏览器高度变化,改变表格高度
+            window.onresize = () => {
+                this.rowHeight = (window.innerHeight - 130) + 'px'
+            }
+        })
+    },
     methods: {
+        // 获取明细信息
+        getDetailsfun(){
+            console.log(this.detailData.id,1128)
+            getDetails({
+                id:this.detailData.id
+            }).then(res=>{
+                console.log(res.data,1131)
+                this.form.orderItemsList = res.data.data.orderItemsList
+            })
+        },
+        // 获取左侧筛选
+        getAllWorkDicts(){
+            getCorpType({ corpType: 'SP' }).then(res => {
+                this.treeDataGoods = res.data.data;
+            });
+        },
+        //导入页左商品类型查询
+        nodeClick(data) {
+            this.treeDeptId = data.id;
+            this.page.currentPage = 1;
+            this.onLoad(this.page, {goodsTypeId:this.treeDeptId});
+        },
+        closeGoods() {
+            this.treeDataGoods = [];
+            this.treeDeptId = "";
+            this.activeNameTabs = "searchList";
+        },
+        //刷新触发
+        refreshChange() {
+            this.treeDeptId = ''
+            this.page.currentPage = 1;
+            this.onLoad(this.page);
+        },
+        //选中触发
+        selectionChange(list) {
+            this.tableData = list
+        },
+        // 点击搜索触发
+        goodsSearch(params, done) {
+            this.treeDeptId = ''
+            params = {
+                ...params,
+                artsVision: this.form.belongToCorpId
+            }
+            this.onLoad(this.page, params);
+            done()
+        },
+        // 标签页切换
+        tabHandle(data) {
+            if (data.name == 'searchList') {
+                this.goodsListShow = this.data;
+                this.page.total = this.pageList.total
+            } else if (data.name == 'importStaging') {
+                this.goodsListShow = this.goodsListSave;
+                this.page.total = 0
+            }
+        },
+        // 商品信息价格计算
+        amountChange(row) {
+            // 价格
+            if (!row.price) {
+                row.price = 0;
+            }
+        },
+        importStagList(row, index, type) {
+            this.goodsListSave.push(row);
+        },
+        removeStagList(row, index, type) {
+            this.goodsListSave.splice(row.$index, 1)
+        },
+        //确认导入触发
+        async importGoods() {
+            this.surplusRouteQuantityOption.push({ storageQuantity: '0' });
+            console.log(this.goodsListSave,'导入按钮')
+            console.log(this.surplusRouteQuantityOption,'导入按钮2')
+            console.log(this.tableData,'导入按钮3')
+            if (this.goodsListSave.length > 0) {
+                this.goodsListSaveHandle()
+            } else {
+                if (this.tableData.length > 0) {
+                    this.tableDataHandle()
+                }
+            }
+        },
+
+        // 导入按钮事件
+        tableDataHandle(){
+            // 循环获取库存数量
+            for(let item of this.tableData) {
+                console.log(item,'循环导入')
+                let page = {}
+                if (this.form.storageId) {
+                    page.storageId = this.form.storageId
+                }
+                page.goodsId = item.id
+                dotList(page).then(res=>{
+                    console.log(res.data,'获取到的数据')
+                    let obj = {}
+                    if(res.data.data.length>0){
+                        obj.price = res.data.data[0].inventoryCostPrice,
+                        obj.inventory = res.data.data[0].balanceQuantity,
+                        obj.pattern = res.data.data[0].brandItem,
+                        obj.goodsDescription = res.data.data[0].productDescription,
+                            // 小计
+                        obj.subTotalMoney = item.goodsNum * res.data.data[0].inventoryCostPrice
+                    }
+                    this.form.orderItemsList.push({
+                        ...obj,
+                        goodsId:item.goodsId,
+                        goodsName:item.cname,
+                        dot:item.dot,
+                        brandName:item.brandName,
+                        brandId:item.brandId,
+                        goodsNo:item.code,
+                        propertyName:item.typeno,
+
+                        goodsNum:item.goodsNum,
+                        units:item.unit,
+                        // sendNum:res.data.data[0],
+                        // 备注
+                        // remarks:res.data.data[0]
+                        // 判断批次号是否可以编辑
+                        whether:item.whether,
+                        // 批次号的状态
+                        dotedittype:false,
+                        // 价格数量
+                        goodsNumtype:false,
+                        // 价格
+                        pricetype:false
+                    })
+                })
+            }
+            this.dialogVisible = false
+        },
+        // 导入
+        goodsListSaveHandle(){
+            this.tableDataHandle()
+        },
+
+        //导入轮胎弹窗列表查询
+        onLoad(page, params = { artsVision: this.form.belongToCorpId }) {
+            this.loading = true;
+            getList({
+                ...params,
+                current: page.currentPage,
+                size: page.pageSize
+            }).then(res=>{
+                console.log(res,1213)
+                const data = res.data.data;
+                this.page.total = data.total;
+                this.pageList.total = data.total
+                this.data = data.records;
+                this.goodsListShow = data.records;
+                this.loading = false;
+            })
+            // getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId, null).then(res => {
+            //     const data = res.data.data;
+            //     this.page.total = data.total;
+            //     this.pageList.total = data.total
+            //     this.data = data.records;
+            //     this.goodsListShow = data.records;
+            //     this.loading = false;
+            // });
+        },
+        // 采购明细行编辑
+        hangeditBtn(row,index){
+            console.log(row)
+            this.picihaolistfun()
+            row.dotedittype = true
+            // 价格数量
+            row.goodsNumtype = true
+            row.pricetype = true
+            // 编辑和保存状态切换
+            this.mingxibaocun = false
+        },
+        // 保存按钮
+        hangbaocun(row) {
+            row.dotedittype = false
+            row.goodsNumtype = false
+            row.pricetype = false
+            this.mingxibaocun = true
+        },
+        // 批次号获取数据
+        picihaolistfun(){
+            dotList().then(res=>{
+                this.picihaolist = res.data.data
+                console.log(res.data.data,1282)
+            })
+        },
+
+        // 编辑
         editBtn(row, index) {
             // this.findObject(this.optionContactsBack.column, "goodsId").dicUrl= `/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}&enableOrNot=1`
             this.confirmEditing()
             console.log(row);
             this.$refs.formContacts.dicInit()
-            this.$refs.formContacts.rowEdit(row, index);
+            // this.$refs.formContacts.rowEdit(row, index);
             dotList({
                 storageId: this.form.storageId,
                 goodsId: this.formContacts.goodsId
@@ -1460,6 +1785,7 @@ export default {
             goodsListAll().then(res=>{
                 console.log();
             })
+            console.log(id,1769)
             getDetails({ id: id }).then(res => {
                 this.form = res.data.data
                 let ordForm = { srcBillNo: this.form.ordNo }
@@ -1679,7 +2005,6 @@ export default {
             );
         },
         rowSave(form, done, loading) {
-
             form.subTotalMoney = form.goodsNum * form.price
             form.goodsName = form.$goodsId
             if (this.isStatus) {
@@ -1711,7 +2036,9 @@ export default {
                 }
             })
             console.log('新增了', row);
-            this.$refs.formContacts.rowAdd()
+            this.getAllWorkDicts()
+            this.dialogVisible = true
+            // this.$refs.formContacts.rowAdd()
         },
         uploadAfter(res, done, loading, column) {
             if (res instanceof Array) {

+ 350 - 7
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -71,6 +71,22 @@
                                 <el-button type="primary" icon="el-icon-printer" size="small"
                                     @click="handlePrint">打印</el-button>
                             </template>
+
+                            <template slot="goodsNum" slot-scope="{ row }">
+                                <el-input v-if="row.goodsNumtype" size="small" v-model="row.goodsNum" style="width: 100%"></el-input>
+                                <span v-else>{{ row.goodsNum }}</span>
+                            </template>
+                            <template slot="price" slot-scope="{ row }">
+                                <el-input v-if="row.pricetype" size="small" v-model="row.price" style="width: 100%"></el-input>
+                                <span v-else>{{ row.price }}</span>
+                            </template>
+                            <template slot="dot" slot-scope="{ row }">
+                                <el-select v-if="row.dotedittype && row.whether=='1'" v-model="row.dot" allow-create filterable default-first-option >
+                                    <el-option v-for="(item, index) in picihaolist" :key="index" :label="item.dot"
+                                               :value="item.id"></el-option>
+                                </el-select>
+                                <span v-else>{{ row.dot }}</span>
+                            </template>
                             <!-- <template slot-scope="{scope,row}" slot="goodsNum">
                                 <el-input size="small" v-model="formContacts.goodsNum" style="width: 100%">
                                     <template slot="inventory">{{ inventory }}吨</template>
@@ -88,8 +104,11 @@
                                 </span>
                             </template> -->
                             <template slot-scope="{type,size,row,index,disabled}" slot="menu">
-                                <el-button :size="size" :disabled="disabled || isAdd" :type="type"
-                                    :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="editBtn(row, index)">编辑
+                                <el-button v-if="mingxibaocun" :size="size" :disabled="disabled || isAdd" :type="type"
+                                           :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="hangeditBtn(row, index)">编辑
+                                </el-button>
+                                <el-button v-else :size="size" :disabled="disabled || isAdd" :type="type"
+                                           :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="hangbaocun(row, index)">保存
                                 </el-button>
                                 <el-button icon="el-icon-delete" :size="size" :disabled="disabled || isDisabled"
                                     :type="type" @click="rowDelBox(row, index, 'orderItemsList')">删除
@@ -144,6 +163,57 @@
                 <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
             </el-dialog>
         </div>
+
+
+        <el-dialog title="选择轮胎" append-to-body class="el-dialogDeep" :visible.sync="dialogVisible" width="80%"
+                   :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="closeGoods">
+            <el-row :style="{ height: rowHeight }">
+                <el-col :span="5" style="height: 100%;overflow-y: auto">
+                    <div>
+                        <el-scrollbar>
+                            <basic-container>
+                                <avue-tree :option="treeOption" :data="treeDataGoods" @node-click="nodeClick" />
+                            </basic-container>
+                        </el-scrollbar>
+                    </div>
+                </el-col>
+                <el-col :span="19">
+                    <basic-container>
+                        <avue-crud :option="optionTwo" :table-loading="loading" :data="goodsListShow" ref="crud"
+                                   @refresh-change="refreshChange" @selection-change="selectionChange" @search-change="goodsSearch"
+                                   :page.sync="page" @on-load="onLoad">
+                            <template slot="menuLeft">
+                                <el-tabs v-model="activeNameTabs" @tab-click="tabHandle">
+                                    <el-tab-pane label="查询结果" name="searchList" />
+                                    <el-tab-pane label="已选定数据" name="importStaging" />
+                                </el-tabs>
+                            </template>
+                            <template slot="goodsNum" slot-scope="{row}">
+                                <el-input-number v-model="row.goodsNum" size="small" :controls="false" :precision="0"
+                                                 @input="amountChange(row)" style="width: 100%" />
+                            </template>
+                            <template slot-scope="scope" slot="menu">
+                                <el-button type="text" icon="el-icon-edit" size="small"
+                                           @click.stop="importStagList(scope.row, scope.index)" v-if="activeNameTabs == 'searchList'"
+                                           :disabled="goodsListSave.findIndex(item => item.id == scope.row.id) !== -1">选择
+                                </el-button>
+                                <el-button type="text" icon="el-icon-delete" size="small"
+                                           @click.stop="removeStagList(scope.row, scope.index)" v-else>移除
+                                </el-button>
+                            </template>
+                        </avue-crud>
+                    </basic-container>
+                </el-col>
+            </el-row>
+            <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false" :loading="saveLoading">取 消</el-button>
+        <el-button type="primary" @click="importGoods" v-if="commodityData !== true" :loading="saveLoading">导入</el-button>
+                <!--<el-button type="primary" @click="importChoice" v-if="commodityData === true" :loading="saveLoading"-->
+                <!--           :disabled="tableData.length !== 1">导入</el-button>-->
+      </span>
+        </el-dialog>
+
+
     </div>
 </template>
 
@@ -155,7 +225,8 @@ import reportDialog from "@/components/report-dialog/main";
 import { dateFormat } from "@/util/date";
 import checkSchedule from "@/components/check/checkSchedule";
 import check from "@/components/check/check";
-import { getList } from "@/api/paymentManagement/paymentRecord"
+import {getList, listAll} from "@/api/tirePartsMall/basicData/listingManagement"
+import commodityxsho from '../../configuration/commodityxsho.json'
 import TicketDistribution from "../../../oceanShipping/maritimeExport/components/ticketDistribution.vue";
 import M from "minimatch";
 import da from "element-ui/src/locale/lang/da";
@@ -165,6 +236,55 @@ export default {
 
     data() {
         return {
+            // 编辑还是保存
+            mingxibaocun:true,
+            // 批次号请求到的数据
+            picihaolist:[],
+            // 添加轮胎弹窗
+            dialogVisible:false,
+            // 弹窗高度
+            rowHeight: '',
+            // 左侧选择搜索
+            treeDataGoods: [],
+            treeDeptId: '',
+            page: {
+                pageSize: 10,
+                currentPage: 1,
+                total: 0,
+                pageSizes: [10, 50, 100, 300, 500]
+            },
+            pageList: {
+                pageSize: 10,
+                currentPage: 1,
+                total: 0
+            },
+            // 左侧选择
+            treeOption:{
+                addBtn: false,
+                menu: false,
+                size: "small",
+                props: {
+                    labelText: "标题",
+                    label: "cname",
+                    value: "id",
+                }
+            },
+            // 表格需要的配置
+            optionTwo: commodityxsho,
+            loading: false,
+            // 商品列表数据合计
+            goodsListShow: [],
+            // 商品列表暂存
+            goodsListSave: [],
+            saveLoading: false,
+            commodityData: false,
+            surplusRouteQuantityOption: [],
+            tableData: [],
+            // tabs切换
+            activeNameTabs:'searchList',
+            data:[],
+
+
             inventory: 0,
             isStatus: 1,
             goodsIdoptions: [],
@@ -292,7 +412,7 @@ export default {
                     //     message: " ",
                     //     trigger: "blur"
                     // }]
-                }, 
+                },
                 {
                     label: '联系人',
                     type: "select",
@@ -423,6 +543,8 @@ export default {
                 refreshBtn: false,
                 dialogDrag: true,
                 addBtn: false,
+                // 航编辑开启
+                cellBtn:true,
                 span: 8,
                 height: 500,
                 addRowBtn: false,
@@ -476,6 +598,7 @@ export default {
                     prop: 'goodsNum',
                     overHidden: true,
                     disabled: false,
+                    cell:true,
                     width: 100,
                     rules: [{
                         required: true,
@@ -501,6 +624,7 @@ export default {
                     overHidden: true,
                     width: 100,
                     disabled: false,
+                    cell:true,
                     rules: [{
                         required: true,
                         message: " ",
@@ -525,7 +649,9 @@ export default {
                 }, {
                     label: '批次号',
                     prop: 'dot',
+                        cell:true,
                     type: "select",
+                        width:120,
                     disabled: true,
                     allowCreate: true,
                     filterable: true,
@@ -604,7 +730,7 @@ export default {
                 //     prop: 'profit',
                 //     overHidden: true,
                 //     width: 100
-                // }, 
+                // },
                 {
                     label: '小计',
                     prop: 'subTotalMoney',
@@ -619,7 +745,7 @@ export default {
                 //     prop: 'thisAmount',
                 //     overHidden: true,
                 //     width: 100
-                // }, 
+                // },
                 {
                     label: '成本',
                     prop: 'costprie',
@@ -860,6 +986,10 @@ export default {
             this.isExamineBtn = false
             // this.batchNo = this.detailData.check.batchNo
         }
+
+        if (this.detailData.id) {
+            this.getDetailsfun()
+        }
     },
 
     watch: {
@@ -934,6 +1064,211 @@ export default {
         }
     },
     methods: {
+        // 获取明细信息
+        getDetailsfun(){
+            getDetails({
+                id:this.detailData.id
+            }).then(res=>{
+                console.log(res.data,1131)
+                this.form.orderItemsList = res.data.data.orderItemsList
+            })
+        },
+        // 获取左侧筛选
+        getAllWorkDicts(){
+            listAll().then(res => {
+                console.log(res.data,1050)
+                this.treeDataGoods = res.data.data;
+            });
+        },
+        //导入页左商品类型查询
+        nodeClick(data) {
+            this.treeDeptId = data.id;
+            this.page.currentPage = 1;
+            this.onLoad(this.page, {brandId:this.treeDeptId});
+        },
+        closeGoods() {
+            this.treeDataGoods = [];
+            this.treeDeptId = "";
+            this.activeNameTabs = "searchList";
+        },
+        //刷新触发
+        refreshChange() {
+            this.treeDeptId = ''
+            this.page.currentPage = 1;
+            this.onLoad(this.page);
+        },
+        //选中触发
+        selectionChange(list) {
+            this.tableData = list
+        },
+        // 点击搜索触发
+        goodsSearch(params, done) {
+            console.log(params,done,1079)
+            this.treeDeptId = ''
+            params = {
+                ...params,
+                artsVision: this.form.belongToCorpId
+            }
+            console.log(params,1085)
+
+            // params.specificationAndModel = params.cname
+            // delete params.cname
+            this.onLoad(this.page, params);
+            done()
+        },
+        // 标签页切换
+        tabHandle(data) {
+            if (data.name == 'searchList') {
+                this.goodsListShow = this.data;
+                this.page.total = this.pageList.total
+            } else if (data.name == 'importStaging') {
+                this.goodsListShow = this.goodsListSave;
+                this.page.total = 0
+            }
+        },
+        // 商品信息价格计算
+        amountChange(row) {
+            // 价格
+            if (!row.price) {
+                row.price = 0;
+            }
+        },
+        importStagList(row, index, type) {
+            this.goodsListSave.push(row);
+        },
+        removeStagList(row, index, type) {
+            this.goodsListSave.splice(row.$index, 1)
+        },
+        //确认导入触发
+        async importGoods() {
+            this.surplusRouteQuantityOption.push({ storageQuantity: '0' });
+            console.log(this.goodsListSave,'导入按钮')
+            console.log(this.surplusRouteQuantityOption,'导入按钮2')
+            console.log(this.tableData,'导入按钮3')
+            if (this.goodsListSave.length > 0) {
+                this.goodsListSaveHandle()
+            } else {
+                if (this.tableData.length > 0) {
+                    this.tableDataHandle()
+                }
+            }
+        },
+
+        // 导入按钮事件
+        tableDataHandle(){
+            // 循环获取库存数量
+            for(let item of this.tableData) {
+                console.log(item,'循环导入')
+                let page = {}
+                if (this.form.storageId) {
+                    page.storageId = this.form.storageId
+                }
+                page.goodsId = item.goodsId
+                let obj = {}
+                goodsDetail({ id: page.goodsId, customId: this.dicUrlWithCustomId, stock: page.storageId ? page.storageId : '' }).then(res=>{
+                    console.log(res.data.data,1141)
+                    // 单位
+                    obj.units = res.data.data.unit
+                    // 判断批次号是否可以编辑
+                    obj.whether = res.data.data.whether,
+                    dotList(page).then(res=>{
+                        console.log(res.data,'获取到的数据')
+                        if(res.data.data.length>0){
+                            obj.price = res.data.data[0].inventoryCostPrice,
+                                obj.inventory = res.data.data[0].balanceQuantity,
+                                obj.pattern = res.data.data[0].brandItem,
+                                obj.goodsDescription = res.data.data[0].productDescription,
+                                obj.dot = res.data.data[0].dot,
+                                // 轮胎编码
+                                obj.goodsNo = res.data.data[0].code
+                            // 规格型号
+                            obj.propertyName = res.data.data[0].typeno,
+                                // 小计
+                                obj.subTotalMoney = item.goodsNum * res.data.data[0].inventoryCostPrice
+                        }
+                        this.form.orderItemsList.push({
+                            ...obj,
+                            goodsId:item.goodsId,
+                            goodsName:item.cname,
+                            goodsNum:item.goodsNum,
+                            brandName:item.brandName,
+                            brandId:item.brandId,
+
+                            // sendNum:res.data.data[0],
+                            // 备注
+                            // remarks:res.data.data[0]
+                            // 批次号的状态
+                            dotedittype:false,
+                            // 价格数量
+                            goodsNumtype:false,
+                            // 价格
+                            pricetype:false
+                        })
+                    })
+                })
+
+            }
+            this.dialogVisible = false
+        },
+        // 导入
+        goodsListSaveHandle(){
+            this.tableDataHandle()
+        },
+
+        //导入轮胎弹窗列表查询
+        onLoad(page, params = { artsVision: this.form.belongToCorpId }) {
+            this.loading = true;
+            getList({
+                ...params,
+                current: page.currentPage,
+                size: page.pageSize,
+                billType:page.billType,
+                upAndDownShelves:1,
+            }).then(res=>{
+                console.log(res,1213)
+                const data = res.data.data;
+                this.page.total = data.total;
+                this.pageList.total = data.total
+                this.data = data.records;
+                this.goodsListShow = data.records;
+                this.loading = false;
+            })
+            // getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId, null).then(res => {
+            //     const data = res.data.data;
+            //     this.page.total = data.total;
+            //     this.pageList.total = data.total
+            //     this.data = data.records;
+            //     this.goodsListShow = data.records;
+            //     this.loading = false;
+            // });
+        },
+        // 采购明细行编辑
+        hangeditBtn(row,index){
+            console.log(row)
+            this.picihaolistfun()
+            row.dotedittype = true
+            // 价格数量
+            row.goodsNumtype = true
+            row.pricetype = true
+            // 编辑和保存状态切换
+            this.mingxibaocun = false
+        },
+        // 保存按钮
+        hangbaocun(row) {
+            row.dotedittype = false
+            row.goodsNumtype = false
+            row.pricetype = false
+            this.mingxibaocun = true
+        },
+        // 批次号获取数据
+        picihaolistfun(){
+            dotList().then(res=>{
+                this.picihaolist = res.data.data
+                console.log(res.data.data,1282)
+            })
+        },
+
+
         editBtn(row, index) {
 
             this.confirmEditing()
@@ -1739,7 +2074,15 @@ export default {
                 }
             })
             console.log('新增了', row);
-            this.$refs.formContacts.rowAdd()
+            console.log(this.form.storageId,2038)
+            if (this.form.storageId) {
+                this.page.billType = 0
+            }else {
+                this.page.billType = 1
+            }
+            this.getAllWorkDicts()
+            this.dialogVisible = true
+            // this.$refs.formContacts.rowAdd()
         },
         //打印
         handlePrint() {

+ 48 - 0
src/views/wel/components/quick-launch.vue

@@ -55,6 +55,33 @@
         </div>
       </div>
 
+        <div class="content" v-if="sysType == 11">
+            <div class="content-icon" @click="inPage('xs')">
+                <i class="tradingIcon icon-sales" style="color:#57927a"></i>
+                <span>销售订单</span>
+            </div>
+            <div class="content-icon" @click="inPage('ck')">
+                <i class="tradingIcon icon-sales" style="color:#576892"></i>
+                <span>出库任务</span>
+            </div>
+            <div class="content-icon" @click="inPage('ckgd')">
+                <i class="tradingIcon icon-receipt" style="color:#57927a"></i>
+                <span>出库工单</span>
+            </div>
+            <div class="content-icon" @click="inPage('cgdd')">
+                <i class="tradingIcon icon-ship" style="color:#576892"></i>
+                <span>采购订单</span>
+            </div>
+            <div class="content-icon" @click="inPage('rkrw')">
+                <i class="tradingIcon icon-ship" style="color:#576892"></i>
+                <span>入库任务</span>
+            </div>
+            <div class="content-icon" @click="inPage('rk')">
+                <i class="tradingIcon icon-ship" style="color:#576892"></i>
+                <span>采购入库</span>
+            </div>
+        </div>
+
       <!-- <div class="content" v-if="sysType == 5">
         <div class="content-icon" @click="inPage('zy')">
           <i class="tradingIcon icon-pay" style="color:#57927a"></i>
@@ -342,6 +369,27 @@ export default {
             this.$router.push("/dealer/purchase/index");
             break;
         }
+      }else if (this.sysType == 11) {
+          switch(type){
+              case 'xs':
+                  this.$router.push('/tirePartsMall/salesManagement/saleOrder/index');
+                  break;
+              case 'ck':
+                  this.$router.push('/tirePartsMall/salesManagement/outboundTask/index');
+                  break;
+              case 'ckgd':
+                  this.$router.push('/tirePartsMall/salesManagement/outboundWorkOrder/index');
+                  break;
+              case 'cgdd':
+                  this.$router.push('/tirePartsMall/salesManagement/purchaseOrder/index');
+                  break;
+              case 'rkrw':
+                  this.$router.push('/tirePartsMall/salesManagement/inboundTask/index');
+                  break;
+              case 'rk':
+                  this.$router.push('/tirePartsMall/purchasingManagement/warehouseEntryOrder/index');
+                  break;
+          }
       }else if(this.sysType == 999){
         switch(type){
           case 'xs':

+ 95 - 0
src/views/wel/home/tirezujian/tireindex.vue

@@ -0,0 +1,95 @@
+<template>
+    <div class="container">
+        <quick-launch class="item1" :sysType="sysType" />
+        <!--<audit-data class="item2" v-if="sysType !== 999" :sysType="sysType"/>-->
+        <realtime-data class="item3" v-if="sysType !== 999 && sysType !== 11" :sysType="sysType"/>
+        <sales-reached class="item4" :sysType="sysType" v-if="sysType!=4||roleName!='采购'"/>
+
+        <!--新加的-->
+        <xinsales-reached class="item4" :sysType="sysType" v-if="sysType==11 && $store.getters.userInfo.tenant_id !== 577435"/>
+
+        <sales-trend :class="sysType!=5 && sysType!=4?'item3':'item5'" :sysType="sysType" v-if="(sysType!=4||roleName!='采购') && sysType != 2 && sysType != 6"/>
+        <!--新家的表格-->
+        <xinsales-trend class="item5" :sysType="sysType" v-if="sysType==11"/>
+
+        <!--<charge-today class="item6" :sysType="sysType" v-if="(sysType!=4||roleName!='采购')&&sysType !== 999"/>-->
+        <!--<pay-today class="item7" :sysType="sysType" v-if="(sysType!=4||roleName!='采购')&&sysType !== 999"/>-->
+    </div>
+</template>
+
+<script>
+
+import quickLaunch from "@/views/wel/components/quick-launch.vue";
+import xinsalesTrend from "@/views/wel/components/xinsales-trend.vue";
+import auditData from "@/views/wel/components/audit-data.vue";
+import xinsalesReached from "@/views/wel/components/xinsales-reached.vue";
+import salesReached from "@/views/wel/components/sales-reached.vue";
+import payToday from "@/views/wel/components/pay-today.vue";
+import chargeToday from "@/views/wel/components/charge-today.vue";
+import realtimeData from "@/views/wel/components/realtime-data.vue";
+import salesTrend from "@/views/wel/components/sales-trend.vue";
+export default {
+    name: "wel",
+    data() {
+        return {
+            roleName:''
+        };
+    },
+    props:{
+        sysType:Number
+    },
+    created() {
+        this.roleName=localStorage.getItem("roleName")
+    },
+    components: {
+        quickLaunch,
+        auditData,
+        realtimeData,
+        salesReached,
+        salesTrend,
+        chargeToday,
+        payToday,
+        xinsalesReached,
+        xinsalesTrend
+    },
+    computed: {},
+    methods: {}
+};
+</script>
+
+<style lang="scss" scoped>
+.item1 {
+    grid-area: a;
+}
+.item2 {
+    grid-area: b;
+}
+.item3 {
+    grid-area: c;
+}
+.item4 {
+    grid-area: d;
+}
+.item5 {
+    grid-area: e;
+}
+.item6 {
+    grid-area: f;
+}
+.item7 {
+    grid-area: g;
+}
+.container {
+    display: grid;
+    width: 100%;
+    // height: 95.5vh;
+    grid-template-columns: repeat(auto-fill, 10%);
+    // grid-template-rows: 140px 180px 180px 350px 140px;
+    grid-template-areas:
+    "a a a a a a a a a a"
+    "b b b b b b b b b b"
+    "c c c c c c c c c c"
+    "d d d d e e e e e e"
+    "f f f f f g g g g g";
+}
+</style>

+ 3 - 0
src/views/wel/index.vue

@@ -5,11 +5,13 @@
     <jiatongPage v-else-if="billType == 8"></jiatongPage>
     <noctite v-else-if="billType == 9"></noctite>
     <equipment-control v-else-if="billType == 10"></equipment-control>
+      <tireindex v-else-if="billType == 11" :sysType="billType"></tireindex>
     <defaultPage v-else :sysType="billType"></defaultPage>
   </div>
 </template>
 
 <script>
+import tireindex from '@/views/wel/home/tirezujian/tireindex';
 import defaultPage from "@/views/wel/home/defaultPage";
 import tongjiSchool from "@/views/wel/home/tongjiSchool";
 import landTransportation from "@/views/wel/home/landTransportation/landTransportation";
@@ -39,6 +41,7 @@ export default {
 
   },
   components: {
+      tireindex,
     tongjiSchool,
     defaultPage,
     jiatongPage,