Browse Source

按钮禁用

web100 2 năm trước cách đây
mục cha
commit
7e0e454ed8

+ 8 - 2
src/views/tirePartsMall/basicData/listingManagement/index.vue

@@ -23,9 +23,9 @@
               <avue-ueditor v-model="form.detailsText" :options="optionsUeditor"></avue-ueditor>
             </template>
             <template slot-scope="{type,size,row,index}" slot="menu">
-              <el-button :size="size" :type="type" @click="$refs.crud.rowEdit(row, index)">编辑
+              <el-button :size="size" :type="type" :disabled="row.upAndDownShelves" @click="$refs.crud.rowEdit(row, index)">编辑
               </el-button>
-              <el-button :size="size" :type="type" @click="$refs.crud.rowDel(row, index)">删除
+              <el-button :size="size" :type="type" :disabled="row.upAndDownShelves" @click="$refs.crud.rowDel(row, index)">删除
               </el-button>
               <el-tooltip :content="`${row.upAndDownShelves == 0 ? '上架' : '下架'}`" placement="top">
                 <el-switch style="margin-left: 10px" v-model="row.upAndDownShelves" @change="check(row)" :active-value="1"
@@ -520,6 +520,9 @@ export default {
     // 确认导入
     importGoods() {
       console.log(this.goodsListSave);
+      if(!this.goodsListSave.length){
+        this.$message.error('请选择')
+      }
       if (this.goodsListSave.some(item => item.priceOne==undefined || item.priceTwo==undefined || item.priceThree==undefined || item.priceFour==undefined)) {
         this.$message.error('请填写所有售价');
       }else{
@@ -647,6 +650,8 @@ export default {
     },
     onLoad(page, params = {}) {
       console.log(this.search);
+      console.log(params);
+      this.search.cname = params.cname
       params = {
         ...params,
         current: page.currentPage,
@@ -667,6 +672,7 @@ export default {
         this.loading = false
       })
       this.loading = true
+
       groundingList(params).then(res => {
         this.goodsListShow = res.data.data.records
         this.data = res.data.data.records;

+ 13 - 11
src/views/tirePartsMall/inventory/index.vue

@@ -81,16 +81,18 @@ export default {
               type: 'sum',
             },
         ],
-        column: [{
-          label: '轮胎编码',
-          prop: "code",
-          search: true,
-          overHidden: true,
-        },{
+        column: [
+        {
           label: '轮胎名称',
           prop: "cname",
           search: true,
           overHidden: true,
+        },
+        {
+          label: '轮胎编码',
+          prop: "code",
+          search: true,
+          overHidden: true,
         },{
           label: '品牌',
           prop: "brandName",
@@ -144,6 +146,11 @@ export default {
           overHidden: true,
           width:100
         },{
+          label: '库存单价',
+          prop: "inventoryCostPrice",
+          overHidden: true,
+          width:100
+        },{
           label: '批次',
           prop: "dot",
           overHidden: true,
@@ -159,11 +166,6 @@ export default {
           overHidden: true,
           width:100
         },{
-          label: '库存成本',
-          prop: "inventoryCostPrice",
-          overHidden: true,
-          width:100
-        },{
           label: '库存预警',
           prop: "inventoryAlert",
           overHidden: true,

+ 47 - 17
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/detailsPage.vue

@@ -37,11 +37,13 @@
                                     :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
                                     @click="$refs.formContacts.rowEdit(row, index)">编辑
                                 </el-button>
-                                <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
+                                <el-button icon="el-icon-delete" :size="size" :disabled="disabled || form.statusName == '已入库'" :type="type"
                                     @click="rowDelBox(row, index)">删除
                                 </el-button>
                             </template>
-                            <template slot="menuLeft">
+                            <template slot-scope="{scope,row}" slot="menuLeft">
+                                <el-button type="primary" icon="el-icon-plus" size="small" 
+                                    @click="rowAdd(row)" :disabled="isrowAdd">添加轮胎</el-button>
                                 <el-button type="success" size="small" icon="el-icon-bottom" @click="excelBox = true">导入
                                 </el-button>
                                 <el-button type="primary" icon="el-icon-printer" size="small"
@@ -106,6 +108,7 @@ export default {
             switchDialog: false,
             activeName: "sale_detail",
             disabled: false,
+            isrowAdd:true,
             excelBox: false,
             excelOption: {
                 submitBtn: false,
@@ -264,7 +267,7 @@ export default {
             optionContacts: {},
             optionContactsBack: {
                 align: "center",
-                addBtn: true,
+                addBtn: false,
                 addBtnText: "录入明细",
                 refreshBtn: false,
                 editBtn: false,
@@ -282,6 +285,7 @@ export default {
                     prop: 'goodsId',
                     width: 200,
                     overHidden: true,
+                    disabled:false,
                     filterable: true,
                     type: 'select',
                     props: {
@@ -293,12 +297,14 @@ export default {
                     label: '物料编码',
                     prop: 'goodsNo',
                     overHidden: true,
+                    disabled:false,
                     width: 140
                 }, {
                     label: "品牌",
                     prop: 'brandId',
                     width: 100,
                     overHidden: true,
+                    disabled:false,
                     type: 'select',
                     props: {
                         label: 'cname',
@@ -309,6 +315,7 @@ export default {
                     label: "规格型号",
                     prop: "propertyName",
                     overHidden: true,
+                    disabled:false,
                     rules: [{
                         required: true,
                         message: " ",
@@ -317,10 +324,12 @@ export default {
                 }, {
                     label: "花纹",
                     prop: "pattern",
+                    disabled:false,
                     overHidden: true
                 }, {
                     label: "轮胎描述",
                     prop: "goodsDescription",
+                    disabled:false,
                     overHidden: true
                 }, {
                     label: "批次号",
@@ -339,6 +348,7 @@ export default {
                     label: "单位",
                     prop: 'units',
                     type: "select",
+                    disabled:false,
                     props: {
                         label: "dictValue",
                         value: "dictValue"
@@ -347,6 +357,7 @@ export default {
                 }, {
                     label: "单价",
                     prop: "price",
+                    disabled:false,
                     ovrHidden: true,
                     rules: [{
                         required: true,
@@ -361,6 +372,7 @@ export default {
                 }, {
                     label: "实际数量",
                     prop: "sendNum",
+                    disabled:false,
                     overHidden: true,
                     rules: [{
                         required: true,
@@ -370,6 +382,7 @@ export default {
                 }, {
                     label: "备注",
                     prop: "remarks",
+                    disabled:false,
                     overHidde: true
                 }]
             },
@@ -484,6 +497,7 @@ export default {
         onLoad: Object,
         detailData: Object
     },
+
     async created() {
         this.optionContacts = await this.getColumnData(this.getColumnName(274.1), this.optionContactsBack);
         this.findObject(this.optionContacts.column, "goodsId").change = ({ value, column }) => {
@@ -518,17 +532,33 @@ export default {
         if (this.onLoad.id && this.detailData.id) {
             this.refresh(this.onLoad.id, true)
             this.$set(this.optionForm,'disabled',true)
-            this.$set(this.optionContacts,'disabled',true)
+            this.$set(this.optionContactsBack,'disabled',true)
+            console.log(this.$refs.formContacts);
 
         } else if (this.onLoad.id) {
             console.log(2);
             this.refresh(this.onLoad.id, true)
         }
+        if(!this.onLoad.id){
+            this.isrowAdd= false
+        }
     },
     components: {
         reportDialog
     },
+
     methods: {
+        rowAdd(row){
+            this.optionContactsBack.column.forEach(its => {
+                if (its.prop == 'goodsNum') {
+                    this.$set(its,'disabled',true)
+                } else {
+                    this.$set(its,'disabled',false)
+
+                }
+            })
+            this.$refs.formContacts.rowAdd()
+        },
         derivation() {
             window.open(
                 `/api/blade-sales-part/ship/export-item?${this.website.tokenHeader
@@ -574,41 +604,41 @@ export default {
         //编辑
         confirmEditing(){
             if(this.form.statusName == '待入库'){
+                this.isrowAdd = false
                 this.$set(this.optionForm,'disabled',false)
                 this.$set(this.optionContacts,'disabled',false)
                 this.optionForm.column.forEach(item=>{
-                    if(item.prop == 'remarks' || item.prop == 'customerId' || item.prop == 'storageId' || item.prop == 'createTime' || item.prop == 'stockClerkId'){
-                        item.disabled = false
+                    if(item.prop == 'remarks'  || item.prop == 'createTime' || item.prop == 'stockClerkId'){
+                        this.$set(item,'disabled',false)
                     }else{
-                        item.disabled = true
+                        this.$set(item,'disabled',true)
 
                     }
                 })
-                this.optionContacts.column.forEach(item=>{
+                this.optionContactsBack.column.forEach(item=>{
                     if(item.prop == 'remarks'){
-                        item.disabled = false
+                        this.$set(item,'disabled',false)
                     }else{
-                        item.disabled = true
+                        this.$set(item,'disabled',true)
 
                     }
                 })
             }else{
                 this.$set(this.optionForm,'disabled',false)
-                this.$set(this.optionContacts,'disabled',false)
+                this.$set(this.optionContactsBack,'disabled',false)
                 this.optionForm.column.forEach(item=>{
                     if(item.prop == 'remarks'){
-                        item.disabled = false
+                        this.$set(item,'disabled',false)
                     }else{
-                        item.disabled = true
+                        this.$set(item,'disabled',true)
 
                     }
                 })
-                this.optionContacts.column.forEach(item=>{
+                this.optionContactsBack.column.forEach(item=>{
                     if(item.prop == 'remarks'){
-                        item.disabled = false
+                        this.$set(item,'disabled',false)
                     }else{
-                        item.disabled = true
-
+                        this.$set(item,'disabled',true)
                     }
                 })
             }

+ 3 - 3
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/index.vue

@@ -10,7 +10,7 @@
           <el-button :size="size" :type="type" :disabled="row.item >= 1" @click="$refs.crud.rowDel(row, index)">删除</el-button>
         </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>
+          <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">新采购单</el-button>
           <!--<el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>-->
         </template>
         <template slot-scope="{row,index}" slot="stockClerkName">
@@ -129,7 +129,7 @@ export default {
             label: 'cname',
             value: 'id'
           },
-          dicUrl: '/api/blade-sales-part/corpsDesc/listAll?corpType=GYS',
+          dicUrl: '/api/blade-sales-part/corpsDesc/listAll?corpType=GYS&enableOrNot=0',
         }, {
           label: "仓库",
           prop: "storageName",
@@ -266,7 +266,7 @@ export default {
 
   },
   mounted() {
-    console.log(this.$refs.crud);
+    // console.log(this.$refs.crud);
   },
   methods: {
     check(row) {

+ 5 - 2
src/views/tirePartsMall/salesManagement/outboundTask/index.vue

@@ -9,7 +9,7 @@
         @row-update="rowUpdate">
         <template slot-scope="{type,size,row,index}" slot="menu" >
           <!--<el-button icon="el-icon-view" :size="size" :type="type" @click="check(row)">查看</el-button>-->
-          <el-button type="text" size="small" @click="rowCell(row, index)">{{ row.$cellEdit ? '保存' : '修改' }}
+          <el-button type="text" size="small" :disabled="Number(row.sendTotalNum) == Number(row.goodsTotalNum)" @click="rowCell(row, index)">{{ row.$cellEdit ? '保存' : '修改' }}
           </el-button>
           <!-- <el-button :disabled="row.statusName === '已派工'" :size="size" :type="type"
             @click="$refs.crud.rowDel(row, index)">删除
@@ -99,7 +99,7 @@ export default {
             label: 'cname',
             value: 'id'
           },
-          dicUrl: '/api/blade-sales-part/corpsDesc/listAll?corpType=KH',
+          dicUrl: '/api/blade-sales-part/corpsDesc/listAll?corpType=KH&enableOrNot=0',
         }
           // , {
           //     label: "商品种类",
@@ -222,8 +222,11 @@ export default {
       this.option.searchMenuPosition = "right";
     }
     this.option.selectable = (row, index) => {
+      console.log('row.sendTotalNum',row.sendTotalNum);
+      console.log('row.goodsTotalNum',row.goodsTotalNum);
       return Number(row.sendTotalNum) !== Number(row.goodsTotalNum);
     }
+
   },
   methods: {
     selectionChange(list) {

+ 5 - 2
src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue

@@ -102,7 +102,7 @@ export default {
             label: 'cname',
             value: 'id'
           },
-          dicUrl: '/api/blade-sales-part/corpsDesc/listAll?corpType=KH',
+          dicUrl: '/api/blade-sales-part/corpsDesc/listAll?corpType=KH&enableOrNot=0',
           rules: [{
             required: true,
             message: " ",
@@ -431,6 +431,8 @@ export default {
           }).finally(() => {
             loading.close();
           });
+        }else{
+          this.$message.error('请选择')
         }
       })
     },
@@ -526,7 +528,8 @@ export default {
     },
     //编辑
     confirmEditing() {
-      if (this.form.statusName == '待出库') {
+      if (this.form.statusName == '待出库' ||this.form.statusName == '待入库') {
+        this.isDisabled = false
         this.$set(this.optionForm, 'disabled', false)
         this.optionForm.column.forEach(item => {
           if (item.prop == 'remarks' || item.prop == 'createTime' || item.prop == 'stockClerkId') {

+ 411 - 206
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -14,7 +14,7 @@
                     @click="editCustomer">保 存
                 </el-button>
                 <el-button class="el-button--small-yh" style="margin-left: 6px;" :type="buttonColor" size="small"
-                     :disabled="isDisabledTask" @click="generateOutbound">
+                    :disabled="isDisabledTask" @click="generateOutbound">
                     {{ buttonText }}
                 </el-button>
 
@@ -50,11 +50,12 @@
                 <avue-form :option="optionForm" v-model="form" ref="form">
                     <template slot-scope="{row,index}" slot="contacts">
                         <el-select v-model="form.contacts" placeholder="请选择" size="small" style="width:60%" filterable
-                            @change="contactsChange($event)" :disabled = isContacts>
+                            @change="contactsChange($event)" :disabled=isContacts>
                             <el-option v-for="item in contactsOption" :key="item.id" :label="item.contacts"
                                 :value="item.contacts" />
                         </el-select>
-                    </template></avue-form>
+                    </template>
+                </avue-form>
             </trade-card>
             <trade-card title="明细信息">
                 <el-tabs v-model="activeName" type="card">
@@ -63,7 +64,9 @@
                             :data="form.orderItemsList" :key="key" @row-save="rowSave" @row-update="rowUpdate"
                             @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 269.1)"
                             @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 269.1)">
-                            <template slot-scope="scope" slot="menuLeft">
+                            <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>
                             </template>
@@ -140,7 +143,7 @@
 
 <script>
 import { getDetails as getCustom } from "@/api/tirePartsMall/basicData/customerInformation"
-import { getDetails, submit, generateShipTask, tradingBox, delOrderItem, checkOrder, confirmRefund, revokeCheckOrder, revokeGenerateShipTask,goodsListXs } from "@/api/tirePartsMall/salesManagement/saleOrder";
+import { getDetails, submit, generateShipTask, tradingBox, delOrderItem, checkOrder, confirmRefund, revokeCheckOrder, revokeGenerateShipTask, goodsListXs } from "@/api/tirePartsMall/salesManagement/saleOrder";
 import { dotList, goodsDetail } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
 import reportDialog from "@/components/report-dialog/main";
 import checkSchedule from "@/components/check/checkSchedule";
@@ -150,15 +153,17 @@ import TicketDistribution from "../../../oceanShipping/maritimeExport/components
 import M from "minimatch";
 export default {
     name: "detailsPage",
+
     data() {
         return {
-            goodsIdoptions:[],
+            goodsIdoptions: [],
             dataList: [],
             dicUrlWithCustomId: '',
+            isAddBtn: true,
             isDisabled: false,
             isDisabledTask: false,
             contactsOption: [],
-            isContacts:false,
+            isContacts: false,
             checkData: {},
             buttonText: '生成任务',
             buttonColor: 'success', // 初始颜色为success
@@ -187,6 +192,7 @@ export default {
                     label: '客户',
                     prop: "customerId",
                     disabled: false,
+                    remote: true,
                     type: 'select',
                     props: {
                         label: 'cname',
@@ -194,20 +200,18 @@ export default {
                     },
                     cascader: ['recAddress'],
                     change: (data) => {
-                        console.log(this.$refs.form.DIC.customerId);
-                        console.log('this.onLoad.id', this.onLoad.id);
 
-                        if (!this.form.id) {
-                            this.$set(this.optionContactsBack, "addBtn", true)
+                        if (!this.onLoad.id) {
+                            // this.$set(this.optionContactsBack, "addBtn", true)
                             // this['optionContacts'] = this['optionContactsBack'];
                             // this.delColumnData(this.getColumnName('269.1'), this['optionContactsBack']);
                         }
                         if (this.$refs.form.DIC.customerId || !this.onLoad.id) {
                             getCustom({ id: data.value }).then(res => {
-                                console.log(res.data.data);
-                                this.dicUrlWithCustomId = res.data.data.id
-                                this.form.storageId ? this.form.storageId : res.data.data.deliveryWarehouseId
-                                this.form.storageId = res.data.data.deliveryWarehouseId
+                                this.dicUrlWithCustomId = res.data.data.id ? res.data.data.id : ''
+                                // this.form.storageId ? this.form.storageId : res.data.data.deliveryWarehouseId
+                                // this.form.storageId = res.data.data.deliveryWarehouseId
+                                this.form.storageId = this.form.storageId ?this.form.storageId :res.data.data.deliveryWarehouseId
                                 this.form.contacts = res.data.data.corpsAttnList[0].cname
                                 this.form.phone = res.data.data.corpsAttnList[0].tel
                                 this.contactsOption = res.data.data.corpsAddrList
@@ -227,7 +231,7 @@ export default {
                         //     }
                         // }
                     },
-                    dicUrl: '/api/blade-sales-part/corpsDesc/listAll?corpType=KH',
+                    dicUrl: '/api/blade-sales-part/corpsDesc/listAll?cname={{key}}&corpType=KH&enableOrNot=0',
                     rules: [{
                         required: true,
                         message: " ",
@@ -237,6 +241,7 @@ export default {
                     label: '仓库',
                     prop: "storageId",
                     type: 'select',
+                    disabled: false,
                     props: {
                         label: 'cname',
                         value: 'id'
@@ -263,6 +268,7 @@ export default {
                     label: '应收类别',
                     prop: "receivableType",
                     type: "select",
+                    disabled: false,
                     dicUrl: "/api/blade-system/dict-biz/dictionary?code=receivableType",
                     props: {
                         label: "dictValue",
@@ -273,7 +279,7 @@ export default {
                     label: '联系人',
                     type: "select",
                     prop: "contacts",
-                    disabled:false,
+                    disabled: false,
                     props: {
                         label: 'address',
                         value: 'id'
@@ -281,6 +287,8 @@ export default {
                     dicUrl: '/api/blade-sales-part/corpsAddr/corpIdByAddr?pid={{key}}'
                 }, {
                     label: '电话',
+                    disabled: false,
+
                     prop: "phone",
                 }, {
                     label: '收货地址',
@@ -296,6 +304,7 @@ export default {
                     label: '配送方式',
                     type: 'select',
                     prop: "shipType",
+                    disabled: false,
                     dicUrl: "/api/blade-system/dict-biz/dictionary?code=deliveryMethod",
                     props: {
                         label: "dictValue",
@@ -304,10 +313,13 @@ export default {
                     value: '物流'
                 }, {
                     label: '物流公司',
+                    disabled: false,
+
                     prop: "logisticsCorpName"
                 }, {
                     label: '成本',
                     prop: "cost",
+                    display: true,
                     disabled: true
                 }, {
                     label: '毛利',
@@ -329,6 +341,7 @@ export default {
                     label: '备注',
                     prop: "remarks",
                     type: 'textarea',
+                    disabled: false,
                     span: 16,
                     minRows: 1
                 }]
@@ -363,10 +376,10 @@ export default {
                         type: 'sum',
                     }
                 ],
-                addBtnText: "录入明细",
+                addBtnText: "添加轮胎",
                 refreshBtn: false,
                 dialogDrag: true,
-                addBtn: true,
+                addBtn: false,
                 span: 8,
                 height: 500,
                 addRowBtn: false,
@@ -414,20 +427,58 @@ export default {
                     remote: true,
                     overHidden: true,
                     type: 'select',
+                    dicData: [],
                     props: {
                         label: 'cname',
                         value: 'id'
                     },
                     // dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}'
-                    dicUrl: []
+                    dicUrl: "/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}&customId=1658279303722418177&enableOrNot=0"
                     // dicUrl: "/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}"
                 }, {
+                    label: '数量',
+                    prop: 'goodsNum',
+                    overHidden: true,
+                    disabled: false,
+                    width: 100,
+                    rules: [{
+                        required: true,
+                        message: " ",
+                        trigger: "blur"
+                    }]
+                }, {
+                    label: '价格',
+                    prop: 'price',
+                    overHidden: true,
+                    width: 100,
+                    disabled: false,
+                    rules: [{
+                        required: true,
+                        message: " ",
+                        trigger: "blur"
+                    }]
+                }, {
+                    label: '批次号',
+                    prop: 'dot',
+                    type: "select",
+                    disabled: true,
+                    allowCreate: true,
+                    filterable: true,
+                    dicData: [],
+                    props: {
+                        label: "dot",
+                        value: "dot"
+                    },
+                    dicUrl: "/api/blade-sales-part/stockDesc/dotList",
+                    overHidden: true,
+                }, {
                     label: '轮胎编码',
                     prop: 'goodsNo',
                     overHidden: true,
                     disabled: false,
                     width: 100
-                }, {
+                },
+                {
                     label: '品牌',
                     prop: 'brandId',
                     disabled: false,
@@ -439,7 +490,8 @@ export default {
                         value: 'id'
                     },
                     dicUrl: '/api/blade-sales-part/brandDesc/listAll'
-                }, {
+                },
+                {
                     label: '规格型号',
                     prop: 'propertyName',
                     overHidden: true,
@@ -470,45 +522,6 @@ export default {
                     dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
                     overHidden: true,
                     width: 100
-                }, {
-                    label: '批次号',
-                    prop: 'dot',
-                    type: "select",
-                    disabled: true,
-                    allowCreate: true,
-                    filterable: true,
-                    dicData: [],
-                    props: {
-                        label: "dot",
-                        value: "dot"
-                    },
-                    dicUrl: "/api/blade-sales-part/stockDesc/dotList",
-                    overHidden: true,
-                },
-                {
-                    label: '数量',
-                    prop: 'goodsNum',
-                    overHidden: true,
-                    disabled: false,
-                    width: 100,
-                    rules: [{
-                        required: true,
-                        message: " ",
-                        trigger: "blur"
-                    }]
-                },
-
-                {
-                    label: '价格',
-                    prop: 'price',
-                    overHidden: true,
-                    width: 100,
-                    disabled: false,
-                    rules: [{
-                        required: true,
-                        message: " ",
-                        trigger: "blur"
-                    }]
                 },
 
                 {
@@ -642,11 +655,20 @@ export default {
         detailData: Object
     },
     async created() {
+        // console.log(this.$route);
+        //         if(this.$route.query.check.actId){
+
+        //             this.isExamineBtn = false
+        //         }
         this.findObject(this.optionContactsBack.column, "goodsId").change = ({ value, column }) => {
             if (this.formContacts.goodsId !== value) {
-                goodsDetail({ id: value,customId:this.dicUrlWithCustomId }).then(res => {
+                goodsDetail({ id: value, customId: this.dicUrlWithCustomId }).then(res => {
                     this.formContacts.goodsNo = res.data.data.code
                     this.formContacts.brandId = res.data.data.brandId
+
+                    // this.formContacts.brandId = res.data.data.brandName
+                    // this.formContacts.brandName = res.data.data.brandId
+
                     this.formContacts.propertyName = res.data.data.specificationAndModel
                     this.formContacts.pattern = res.data.data.brandItem
                     this.formContacts.goodsDescription = res.data.data.goodsDescription
@@ -663,17 +685,23 @@ export default {
                             this.findObject(this.optionContactsBack.column, "dot").dicData = res.data.data
                         })
                     }
+                    // this.formContacts.goodsId = res.data.data.cname
+                    // this.formContacts.goodsName = res.data.data.id
                 })
             }
         }
         this.optionContacts = await this.getColumnData(this.getColumnName(269.1), this.optionContactsBack);
-        console.log('this.optionContacts.column', this.optionContacts.column);
+
         this.findObject(this.optionContacts.column, "goodsId").change = ({ value, column }) => {
-            console.log('走i在');
+
             if (this.formContacts.goodsId !== value) {
                 goodsDetail({ id: value }).then(res => {
                     this.formContacts.goodsNo = res.data.data.code
                     this.formContacts.brandId = res.data.data.brandId
+
+                    // this.formContacts.brandId = res.data.data.brandName
+                    // this.formContacts.brandName = res.data.data.brandId
+
                     this.formContacts.propertyName = res.data.data.specificationAndModel
                     this.formContacts.pattern = res.data.data.brandItem
                     this.formContacts.goodsDescription = res.data.data.goodsDescription
@@ -689,6 +717,8 @@ export default {
                             this.findObject(this.optionContacts.column, "dot").dicData = res.data.data
                         })
                     }
+                    // this.formContacts.goodsId = res.data.data.cname
+                    // this.formContacts.goodsName = res.data.data.id
                 })
             }
         }
@@ -707,64 +737,67 @@ export default {
         }
         if (!this.form.id) {
             console.log(3);
-            this.$set(this.optionContactsBack, "addBtn", false)
+            this.optionContactsBack.column.forEach(its => {
+                if (its.prop == 'goodsId' || its.prop == 'goodsNum' || its.prop == 'price' || its.prop == 'dot' || its.prop == 'remarks') {
+                    its.disabled = false
+                } else {
+                    its.disabled = true
+                }
+            })
+            // this.$set(this.optionContactsBack, "addBtn", false)
             this['optionContacts'] = this['optionContactsBack'];
             this.delColumnData(this.getColumnName('269.1'), this['optionContactsBack']);
         }
         if (!this.detailData.id) {
+            this.isAddBtn = false
             this.form.businessSource = '内部销售'
         }
-        console.log('this.detailData.status', this.detailData.status);
-        // if (this.detailData.status == 1) {
-        //     this.isExamineBtn = false;
-        // }
-        // goodsListXs(this.dicUrlWithCustomId).then(res=>{
-        //     console.log(res);
-        //     this.goodsIdoptions = res.data
-        // })
+        if (this.detailData.check) {
+            this.isExamineBtn = false
+            // this.batchNo = this.detailData.check.batchNo
+        }
     },
-    watch:{
-        dicUrlWithCustomId(){
-        //     console.log(23432);
-        //     goodsListXs(this.dicUrlWithCustomId).then(res=>{
-        //     console.log(res);
-        //     this.goodsIdoptions = res.data
-        // })
-            this.findObject(this.optionContactsBack.column, "goodsId").dicUrl = `/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}&customId=${this.dicUrlWithCustomId}`
 
-     
+    watch: {
+        dicUrlWithCustomId() {
+            // this.findObject(this.optionContactsBack.column, "goodsId").dicUrl = `/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}&customId=${this.dicUrlWithCustomId}&enableOrNot=0`
+            goodsListXs(this.dicUrlWithCustomId).then(res => {
+                this.findObject(this.optionContactsBack.column, "goodsId").dicData = res.data.data
+            })
+
         },
         $route(to, from) {
-        if (this.onLoad.id && this.detailData.id) {
-            this.$set(this.optionForm, 'disabled', true)
-            this.$set(this.optionContactsBack, 'disabled', true)
-            this.isContacts = true
-            this.isDisabled = 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) {
-            console.log(3);
-            this.$set(this.optionContactsBack, "addBtn", false)
-            this['optionContacts'] = this['optionContactsBack'];
-            this.delColumnData(this.getColumnName('269.1'), this['optionContactsBack']);
-        }
-        if (!this.detailData.id) {
-            this.form.businessSource = '内部销售'
-        }
-        console.log('this.detailData.status', this.detailData.status);
-        // if (this.detailData.status == 1) {
-        //     this.isExamineBtn = false;
-        // }
-        if(to.name == '销售订单'){
-            console.log('销售订单');
-            this.isExamineBtn = false;
+            if (this.onLoad.id && this.detailData.id) {
+                this.$set(this.optionForm, 'disabled', true)
+                this.$set(this.optionContactsBack, 'disabled', true)
+                this.isContacts = true
+                this.isDisabled = 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) {
+            //     console.log(3);
+            //     // this.$set(this.optionContactsBack, "addBtn", false)
+            //     this['optionContacts'] = this['optionContactsBack'];
+            //     this.delColumnData(this.getColumnName('269.1'), this['optionContactsBack']);
+            // }
+            // if (!this.detailData.id) {
+            //     this.form.businessSource = '内部销售'
+            // }
+
+            if (this.detailData.status == 1) {
+                this.isExamineBtn = false;
+            }
+            // if (to.name == '销售订单') {
+            //     console.log('销售订单');
+            //     this.isExamineBtn = false;
 
+            // }
         }
-    }
     },
+
     methods: {
         editBtn(row, index) {
             console.log(123);
@@ -775,11 +808,16 @@ export default {
             }).then(res => {
                 this.findObject(this.optionContactsBack.column, "dot").dicData = res.data.data
             })
+            goodsListXs(this.dicUrlWithCustomId).then(res => {
+                this.findObject(this.optionContactsBack.column, "goodsId").dicData = res.data.data
+            })
         },
         //表头编辑
         confirmEditing() {
-            console.log(this.form);
-            if(this.form.status=='已取消'||this.form.status =='待发货'||this.form.status=='已发货'){
+            this.isAddBtn = false
+            if (this.form.status == '已取消'  || this.form.status == '退款请核') {
+                this.isAddBtn = true
+                this.$message.error('当前状态不允许编辑')
                 // this.optionForm.column.forEach(item=>{
                 //     if(item.prop= 'contacts'){
                 //         item.disabled = true
@@ -787,95 +825,223 @@ export default {
                 // })
                 return;
             }
+            this.optionContactsBack.column.forEach(its => {
+                if (its.prop == 'goodsId' || its.prop == 'goodsNum' || its.prop == 'price' || its.prop == 'dot' || its.prop == 'remarks') {
+                    its.disabled = false
+                } else {
+                    its.disabled = true
+                }
+            })
             this.$set(this.optionForm, 'disabled', false)
             this.$set(this.optionContactsBack, 'disabled', false)
             this.isDisabled = false
-            console.log('this.form.businessSource', this.form.businessSource);
             if (this.form.businessSource == "外部销售") {
+                if (this.form.status == '待确认') {
+                    const loadings = this.$loading({
+                        lock: true,
+                        text: '加载中',
+                        spinner: 'el-icon-loading',
+                        background: 'rgba(255,255,255,0.7)'
+                    });
+                    console.log('外部销售');
+                    this.optionForm.column.forEach(its => {
+                        if (its.prop == 'customerId') {
+                            this.$set(its, 'disabled', true)
+                        }
+                    })
+                    //不能录入不能删除
+                    this.isDisabled = true
+                    this.$set(this.form, 'shipType', '物流')
+                    this.$set(this.form, 'receivableType', '网络支付')
+                    this.optionContactsBack.column.forEach(item => {
+                        this.$set(item, 'disabled', true)
+                        if (item.label == '批次号' || item.label == '备注') {
+                            item.disabled = false
+                        }
+                    })
+                    loadings.close()
+                }else{
+                    const loadin = this.$loading({
+                        lock: true,
+                        text: '加载中',
+                        spinner: 'el-icon-loading',
+                        background: 'rgba(255,255,255,0.7)'
+                    });
+                    this.isAddBtn = true
+                    this.isDisabled = true
+                    this.optionForm.column.forEach(its => {
+                        if (its.prop != 'remarks') {
+                            its.disabled = true
+                        } else {
+                            its.disabled = false
+                        }
+                    })
+                    this.optionContactsBack.column.forEach(its => {
+                        if (its.prop != 'remarks') {
+                            its.disabled = true
+                        } else {
+                            its.disabled = false
+                        }
+                    })
+                    loadin.close()
+                }
+
+            } else {
                 const loading = this.$loading({
                     lock: true,
                     text: '加载中',
                     spinner: 'el-icon-loading',
                     background: 'rgba(255,255,255,0.7)'
                 });
-                console.log('外部销售');
-                this.optionForm.column.forEach(its => {
-                    if (its.prop == 'customerId') {
-                        this.$set(its, 'disabled', true)
-                    }
-                })
-                //不能录入不能删除
-                this.$set(this.optionContactsBack, "addBtn", false)
-                this.isDisabled = true
-                this.$set(this.form, 'shipType', '物流')
-                this.$set(this.form, 'receivableType', '网络支付')
-                this.optionContactsBack.column.forEach(item => {
-                    this.$set(item, 'disabled', true)
-                    if (item.label == '批次号' || item.label == '备注') {
-                        item.disabled = false
-                    }
-                })
+                if (this.form.status == '待发货' || this.form.status == '已发货') {
+                    const loading = this.$loading({
+                        lock: true,
+                        text: '加载中',
+                        spinner: 'el-icon-loading',
+                        background: 'rgba(255,255,255,0.7)'
+                    });
+                    this.optionForm.column.forEach(its => {
+                        if (its.prop != 'remarks') {
+                            its.disabled = true
+                        } else {
+                            its.disabled = false
+                        }
+                    })
+                    this.optionContactsBack.column.forEach(its => {
+                        if (its.prop != 'remarks') {
+                            its.disabled = true
+                        } else {
+                            its.disabled = false
+                        }
+                    })
+                    loading.close()
+                } else if (this.form.status == '录入') {
 
-                // this['optionContacts'] = this['optionContactsBack'];
-                // this.delColumnData(this.getColumnName(269.1), this['optionContactsBack']);
+                    // this.$set(this.optionForm, 'disabled', false)
+                    // this.$set(this.optionContactsBack, 'disabled', false)
+                    this.$set(this.optionForm, 'disabled', false)
+                    this.$set(this.optionContactsBack, 'disabled', false)
+                    this.isContacts = true
+                    //删除按钮
+                    this.isDisabled = false
+                    // this.optionForm.column.forEach(item => {
+                    //     item.disabled = false
+                    // })
+                    loading.close()
+
+                } else if (this.form.status == '待确认') {
+                    this.isDisabled = true
+                    console.log('待确认');
+                    this.optionForm.column.forEach(item => {
+                        if (item.label === '仓库' || item.label === '备注' || item.label === '配送方式' || item.label === '物流公司') {
+                            this.$set(item, 'disabled', false)
+                        } else {
+                            this.$set(item, 'disabled', true)
+                        }
+                    })
+                    this.optionContactsBack.column.forEach(its => {
+                        if (its.prop == 'remarks' || its.prop == 'dot') {
+                            this.$set(its, 'disabled', false)
+                        } else {
+                            this.$set(its, 'disabled', true)
+
+                        }
+                    })
+                    loading.close()
+                }
+                // this.$set(this.form, 'shipType', '物流')
+                // this.$set(this.form, 'receivableType', '现金')
+                // this.optionContactsBack.column.forEach(item => {
+                //     this.$set(item, 'disabled', false)
+                // })
                 // this.optionContactsBack.column.forEach(item => {
-                //     if (item.prop == 'dot') {
-                //         this.$set(item, disabled, false)
-                //     } else {
-                //         this.$set(item, disabled, true)
+                //     if (item.label === '规格型号' || item.label === '花纹' || item.label === '品牌' || item.label === '物料编码' || item.label === '单位' || item.label === '轮胎描述') {
+                //         item.disabled = true;
                 //     }
                 // })
-                loading.close()
-            } else {
-                const loading = this.$loading({
-                    lock: true,
-                    text: '加载中',
-                    spinner: 'el-icon-loading',
-                    background: 'rgba(255,255,255,0.7)'
-                });
-                this.$set(this.form, 'shipType', '物流')
-                this.$set(this.form, 'receivableType', '现金')
-                this.optionContactsBack.column.forEach(item => {
-                    this.$set(item, 'disabled', false)
-                })
-                this.optionContactsBack.column.forEach(item => {
-                    if (item.label === '规格型号' || item.label === '花纹' || item.label === '品牌' || item.label === '物料编码' || item.label === '单位' || item.label === '轮胎描述') {
-                        item.disabled = true;
-                    }
-                })
-                console.log(324324);
-                this['optionContacts'] = this['optionContactsBack'];
-                this.delColumnData(this.getColumnName(269.1), this['optionContactsBack']);
+                // this['optionContacts'] = this['optionContactsBack'];
+                // this.delColumnData(this.getColumnName(269.1), this['optionContactsBack']);
                 loading.close()
             }
             // this.$set(this.form.orderItemsList,'goodsNum',66)
+
         },
         generateOutbound() {
-            if(!this.form.id){
+            if (!this.form.id) {
                 this.$message.error('请先保存')
-            }else{
+            } else {
                 if (this.buttonText === '生成任务') {
-                // 将按钮文本更改为"撤销任务"
-                this.buttonText = '撤销任务';
-                // 将按钮颜色更改为对应的颜色
-                this.buttonColor = 'warning'; // 比如改为warning
-                //生成任务逻辑
-                if (this.form.orderItemsList.length <= 0) {
-                    this.$message.error('请录入明细');
+                    //生成任务逻辑
+                    if (this.form.orderItemsList.length <= 0) {
+                        this.$message.error('请录入明细');
+                    } else {
+                        this.$set(this.optionForm, 'disabled', true)
+                        this.$set(this.optionContactsBack, 'disabled', true)
+                        this.$refs["form"].validate((valid, done) => {
+                            done();
+                            if (valid) {
+                                const loading = this.$loading({
+                                    lock: true,
+                                    text: '加载中',
+                                    spinner: 'el-icon-loading',
+                                    background: 'rgba(255,255,255,0.7)'
+                                });
+                                // this.form.orderItemsList.forEach((items) => {
+                                //     let brandName = items.brandId
+                                //     items.brandId = items.brandName
+                                //     items.brandName = brandName
+
+                                //     let goodsName = items.goodsId
+                                //     items.goodsId = items.goodsName
+                                //     items.goodsName = goodsName
+
+                                // })
+                                generateShipTask(this.form).then(res => {
+                                    console.log(res.data);
+                                    this.refresh(res.data.data.id, true)
+                                    this.isContacts = true
+                                    // 将按钮文本更改为"撤销任务"
+                                    this.buttonText = '撤销任务';
+                                    // 将按钮颜色更改为对应的颜色
+                                    this.buttonColor = 'warning'; // 比如改为warning
+                                    this.$message.success("生成出库任务成功");
+                                    loading.close();
+                                }).finally(() => {
+                                    loading.close();
+                                });
+                            }else{
+                                this.$message.error('请选择仓库')
+                            }
+                        })
+                    }
                 } else {
-                    this.$set(this.optionForm, 'disabled', true)
-                    this.$set(this.optionContactsBack, 'disabled', true)
                     this.$refs["form"].validate((valid, done) => {
                         done();
-                        if (valid) {
+                        console.log(valid);
+                        if (true) {
                             const loading = this.$loading({
                                 lock: true,
                                 text: '加载中',
                                 spinner: 'el-icon-loading',
                                 background: 'rgba(255,255,255,0.7)'
                             });
-                            generateShipTask(this.form).then(res => {
-                                this.$message.success("生成出库任务成功");
+                            // this.form.orderItemsList.forEach((items) => {
+                            //     let brandName = items.brandId
+                            //     items.brandId = items.brandName
+                            //     items.brandName = brandName
+
+                            //     let goodsName = items.goodsId
+                            //     items.goodsId = items.goodsName
+                            //     items.goodsName = goodsName
+
+                            // })
+                            revokeGenerateShipTask(this.form).then(res => {
+                                // 将按钮文本更改为"生成任务"
+                                this.buttonText = '生成任务';
+                                // 将按钮颜色还原为success
+                                this.buttonColor = 'success';
+                                this.$message.success("撤销出库成功");
+                                this.refresh(res.data.data.id)
                                 loading.close();
                             }).finally(() => {
                                 loading.close();
@@ -883,29 +1049,6 @@ export default {
                         }
                     })
                 }
-            } else {
-                // 将按钮文本更改为"生成任务"
-                this.buttonText = '生成任务';
-                // 将按钮颜色还原为success
-                this.buttonColor = 'success';
-                this.$refs["form"].validate((valid, done) => {
-                    done();
-                    if (valid) {
-                        const loading = this.$loading({
-                            lock: true,
-                            text: '加载中',
-                            spinner: 'el-icon-loading',
-                            background: 'rgba(255,255,255,0.7)'
-                        });
-                        revokeGenerateShipTask(this.form).then(res => {
-                            this.$message.success("撤销出库成功");
-                            loading.close();
-                        }).finally(() => {
-                            loading.close();
-                        });
-                    }
-                })
-            }
 
             }
         },
@@ -932,6 +1075,16 @@ export default {
                         spinner: 'el-icon-loading',
                         background: 'rgba(255,255,255,0.7)'
                     });
+                    // this.form.orderItemsList.forEach(its => {
+                    //     console.log(its.goodsId);
+                    //     console.log(its.goodsName);
+                    //     its.brandId = its.brandName
+                    //     let goodsName = its.goodsId
+                    //     its.goodsId = its.goodsName
+                    //     its.goodsName = goodsName
+
+                    // })
+
                     submit({
                         bsType: "XS",
                         ...this.form
@@ -956,9 +1109,8 @@ export default {
                 background: 'rgba(255,255,255,0.7)'
             })
             getDetails({ id: id }).then(res => {
-                console.log('res', res);
                 this.form = res.data.data
-                let ordForm = { srcBillNo: this.form.srcOrdNo }
+                let ordForm = { srcBillNo: this.form.ordNo }
                 let _this = this
                 getList(1, 50, ordForm).then((res) => {
                     this.dataList = res.data.data.records ? res.data.data.records : [];
@@ -971,7 +1123,7 @@ export default {
                 if (this.form.status == '退款中') {
                     this.isConfirmRefundBtn = false;
                 }
-                if(this.form.status == '已取消'){
+                if (this.form.status == '已取消') {
                     this.isConfirmRefundBtn = true;
                 }
 
@@ -979,21 +1131,37 @@ export default {
 
                 //     this.isExamineBtn = false;
                 // }
-                if(this.form.generateTask == '已生成'){
+                if (this.form.generateTask == '已生成') {
                     this.buttonText = '撤销任务';
                     this.isDisabledTask = false;
-                    this.buttonColor= 'warning'
+                    this.buttonColor = 'warning'
 
                 }
 
                 if (this.form.status == '退款请核' || this.form.status == '退款中') {
                     this.isRevocationRequest = false;
                 }
+                //成本、毛利对销售角色隐藏
+                this.optionForm.column.forEach(its => {
+                    if (JSON.parse(localStorage.getItem('saber-userInfo')).content.role_name.split(',').includes('销售')) {
+                        if (its.prop == 'cost' || its.prop == 'grossProfit') {
+                            this.$set(its, 'display', false)
+                        }
+                    }
+                })
                 this.form.orderItemsList.forEach((items) => {
                     if (!items.subTotalMoney) {
                         items.subTotalMoney = items.goodsNum * items.price
                         items.grossProfit = items.subTotalMoney - items.costprie
                     }
+                    // let brandName = items.brandId
+                    // items.brandId = items.brandName
+                    // items.brandName = brandName
+
+                    // let goodsName = items.goodsId
+                    // items.goodsId = items.goodsName
+                    // items.goodsName = goodsName
+
                 })
                 loading.close();
 
@@ -1052,6 +1220,7 @@ export default {
         },
         //关闭审核
         choceCheckFun() {
+            this.isExamineBtn = !this.isExamineBtn
             this.checkDialog = false;
         },
         //申请退款
@@ -1064,8 +1233,6 @@ export default {
                 this.$refs["form"].validate((valid, done) => {
                     done()
                     if (valid) {
-                        console.log(this.form);
-                        console.log(this.$store.getters.domSaleStatus);
                         const data = {
                             id: this.form.id,
                             url: '/tirePartsMall/salesManagement/saleOrder/index',
@@ -1079,9 +1246,11 @@ export default {
                             background: 'rgba(255,255,255,0.7)'
                         });
                         checkOrder({ ...data }).then((res) => {
-                            loading.close();
+                            this.refresh(res.data.data.id)
                             this.$message.success('申请退款成功');
                             this.isApplySettlement = !this.isApplySettlement
+                            loading.close();
+                            console.log(res);
                         }).catch(() => { loading.close(); })
                     }
                 })
@@ -1100,6 +1269,17 @@ export default {
                     spinner: 'el-icon-loading',
                     background: 'rgba(255,255,255,0.7)'
                 });
+                // this.form.orderItemsList.forEach((items) => {
+
+                //     let brandName = items.brandId
+                //     items.brandId = items.brandName
+                //     items.brandName = brandName
+
+                //     let goodsName = items.goodsId
+                //     items.goodsId = items.goodsName
+                //     items.goodsName = goodsName
+
+                // })
                 confirmRefund({ ...this.form }).then((res) => {
                     loading.close()
                     this.$message.success('确定退款成功');
@@ -1108,7 +1288,6 @@ export default {
         },
         //审批
         examineBtn() {
-            console.log(this.$route.query.check);
             this.checkData = this.$route.query.check
             this.checkDialog = true;
         },
@@ -1125,10 +1304,25 @@ export default {
                     spinner: 'el-icon-loading',
                     background: 'rgba(255,255,255,0.7)'
                 });
+                // this.form.orderItemsList.forEach((items) => {
+                //     if (!items.subTotalMoney) {
+                //         items.subTotalMoney = items.goodsNum * items.price
+                //         items.grossProfit = items.subTotalMoney - items.costprie
+                //     }
+                //     let brandName = items.brandId
+                //     items.brandId = items.brandName
+                //     items.brandName = brandName
+
+                //     let goodsName = items.goodsId
+                //     items.goodsId = items.goodsName
+                //     items.goodsName = goodsName
+
+                // })
                 revokeCheckOrder({ ...this.form }).then(res => {
-                    loading.close();
+                    this.isRevocationRequest = !this.isRevocationRequest
+                    this.refresh(res.data.data.id)
                     this.$message.success('撤回成功')
-                    this.refresh(this.form.id)
+                    loading.close();
                 })
             })
         },
@@ -1139,8 +1333,7 @@ export default {
                 type: "warning"
             }).then(() => {
                 if (row.id) {
-                    console.log(index);
-                    console.log(this.form.orderItemsList);
+
                     delOrderItem({ ids: row.id }).then(res => {
                         this.form.orderItemsList.splice(index, 1);
                         this.$message.success("操作成功!");
@@ -1158,6 +1351,18 @@ export default {
         rowUpdate(form, index, done, loading) {
             done(form)
         },
+        // 新增轮胎
+        rowAdd(row) {
+            this.optionContactsBack.column.forEach(its => {
+                if (its.prop == 'goodsId' || its.prop == 'goodsNum' || its.prop == 'price' || its.prop == 'dot' || its.prop == 'remarks') {
+                    its.disabled = false
+                } else {
+                    its.disabled = true
+                }
+            })
+            console.log('新增了', row);
+            this.$refs.formContacts.rowAdd()
+        },
         //打印
         handlePrint() {
             this.switchDialog = !this.switchDialog;

+ 7 - 1
src/views/tirePartsMall/salesManagement/saleOrder/index.vue

@@ -7,7 +7,7 @@
         @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 269)" :page.sync="page">
         <template slot-scope="{type,size,row,index}" slot="menu">
           <!-- <el-button :size="size" :type="type" @click="check(row)">查看</el-button> -->
-          <el-button :size="size" :type="type" :disabled="row.status != '录入'" @click="$refs.crud.rowDel(row, index)">删除</el-button>
+          <el-button :size="size" :type="type" :disabled="row.status != '录入' || row.item>=1" @click="$refs.crud.rowDel(row, index)">删除</el-button>
         </template>
         <template slot="corpNameSearch">
           <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
@@ -215,6 +215,11 @@ export default {
       if (this.$route.query.check) {
         this.editOpen({ id: this.$route.query.check.srcBillId }, 1)
       }
+      this.detailData = {
+          id: this.$route.query.check.billId,
+          check: this.$route.query.check,
+          auditId: this.$route.query.check.id
+        };
     }, 100);
   },
   async created() {
@@ -249,6 +254,7 @@ export default {
         id: row.id,
         status: status
       };
+      console.log(status);
       this.detailsOpen = true;
     },
     //刷新