Преглед на файлове

出入库单据可直接提交,无需先保存再提交。提交后就把编辑按钮隐藏

Qukatie преди 5 дни
родител
ревизия
7699c00466

+ 11 - 11
src/views/storehouse/inStockManage/inStockPlan/detailsPage.vue

@@ -8,12 +8,12 @@
             </div>
             <div class="add-customer-btn">
                 <el-button class="el-button&#45;&#45;small-yh" style="margin-left: 6px;" type="primary" size="small"
-                    v-if="editButton" @click="inEdit">编 辑
+                    v-if="editButton&&form.status == 0" @click="inEdit">编 辑
                 </el-button>
-                <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
-                    :disabled="isSaveBtn" @click="editCustomer(0)">保 存
+                <el-button class="el-button--small-yh" v-if="!editButton" style="margin-left: 6px;" type="primary"
+                    size="small" :disabled="isSaveBtn" @click="editCustomer(0)">保 存
                 </el-button>
-                <el-button class="el-button--small-yh" v-if="form.id && form.status == 0" style="margin-left: 6px;"
+                <el-button class="el-button--small-yh" style="margin-left: 6px;"
                     type="success" size="small" @click="editCustomer(1)" :disabled="form.status == 1">提 交
                 </el-button>
                 <!-- <el-dropdown v-if="form.status == 1">
@@ -41,8 +41,9 @@
                     </template>
                     <tempalte slot="customerName">
                         <dic-select v-model="form.customerName" placeholder="货主" key="id" label="cname" res="records"
-                            url="/blade-sales-part/corpsDesc/list?current=1&size=20&&enableOrNot=1&corpType=KH" :filterable="true"
-                            :remote="true" dataName="cname" @selectChange="dicChange('customerName', $event)"
+                            url="/blade-sales-part/corpsDesc/list?current=1&size=20&&enableOrNot=1&corpType=KH"
+                            :filterable="true" :remote="true" dataName="cname"
+                            @selectChange="dicChange('customerName', $event)"
                             :disabled="editButton || form.status == 1"></dic-select>
                     </tempalte>
                     <tempalte slot="storageName">
@@ -50,7 +51,7 @@
                             url="/blade-sales-part/tire/center/warehouse/storage/list?current=1&size=5"
                             :filterable="true" :remote="true" dataName="cname"
                             @selectChange="dicChange('storageName', $event)"
-                            :disabled="editButton || form.status == 1||form.planItemsList.length>0"></dic-select>
+                            :disabled="editButton || form.status == 1 || form.planItemsList.length > 0"></dic-select>
                     </tempalte>
                     <tempalte slot="warehouseKeeperName">
                         <dic-select v-model="form.warehouseKeeperName" placeholder="库管" key="id" label="realName"
@@ -63,8 +64,7 @@
             <trade-card title="明细信息">
                 <el-tabs v-model="activeName" type="card">
                     <el-tab-pane label="商品明细" name="sale_detail">
-                        <avue-crud :option="optionContacts" ref="formContacts"
-                            :data="form.planItemsList" :key="key"
+                        <avue-crud :option="optionContacts" ref="formContacts" :data="form.planItemsList" :key="key"
                             @row-update="rowUpdate" @row-close="rowClose" :before-close="beforeClose"
                             @selection-change="selectionContacts"
                             @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 477)"
@@ -832,7 +832,7 @@ export default {
             //     return this.$message.error('请保存数据')
             // }
             this.form.centerShipCostList.push({
-                goodsNum:this.form.goodsTotalNum,
+                goodsNum: this.form.goodsTotalNum,
                 $cellEdit: true
             })
         },
@@ -893,7 +893,7 @@ export default {
             if (name == 'storageName') {
                 if (row) {
                     this.form.storageId = row.id
-                    this.form.storageName=row.cname
+                    this.form.storageName = row.cname
                 } else {
                     this.form.storageId = null
                     this.form.storageName = null

+ 1 - 1
src/views/storehouse/inStockManage/inStockPlan/index.vue

@@ -36,7 +36,7 @@
                 <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 && row.status !== '1'"
+                    <el-button :size="size" :type="type" :disabled="row.status && row.status == 1"
                         @click="$refs.crud.rowDel(row, index)">删除
                     </el-button>
                 </template>

+ 11 - 10
src/views/storehouse/outStockManage/outStockPlan/detailsPage.vue

@@ -8,12 +8,12 @@
             </div>
             <div class="add-customer-btn">
                 <el-button class="el-button&#45;&#45;small-yh" style="margin-left: 6px;" type="primary" size="small"
-                    v-if="editButton" @click="inEdit">编 辑
+                    v-if="editButton && form.status == 0" @click="inEdit">编 辑
                 </el-button>
-                <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
-                    :disabled="isSaveBtn" @click="editCustomer(0)">保 存
+                <el-button class="el-button--small-yh" v-if="!editButton" style="margin-left: 6px;" type="primary"
+                    size="small" :disabled="isSaveBtn" @click="editCustomer(0)">保 存
                 </el-button>
-                <el-button class="el-button--small-yh" v-if="form.id && form.status == 0" style="margin-left: 6px;"
+                <el-button class="el-button--small-yh"  style="margin-left: 6px;"
                     type="success" size="small" @click="editCustomer(1)" :disabled="form.status == 1">提 交
                 </el-button>
                 <!-- <el-dropdown v-if="form.status == 1">
@@ -50,7 +50,7 @@
                             url="/blade-sales-part/tire/center/warehouse/storage/list?current=1&size=5"
                             :filterable="true" :remote="true" dataName="cname"
                             @selectChange="dicChange('storageName', $event)"
-                            :disabled="editButton || form.status == 1||form.planItemsList.length>0"></dic-select>
+                            :disabled="editButton || form.status == 1 || form.planItemsList.length > 0"></dic-select>
                     </tempalte>
                     <tempalte slot="warehouseKeeperName">
                         <dic-select v-model="form.warehouseKeeperName" placeholder="库管" key="id" label="realName"
@@ -64,8 +64,8 @@
                 <el-tabs v-model="activeName" type="card">
                     <el-tab-pane label="出库明细" name="sale_detail">
                         <avue-crud :option="optionContacts" v-model="formContacts" ref="formContacts"
-                            :data="form.planItemsList" :key="key"
-                            @row-close="rowClose" :before-close="beforeClose" @selection-change="selectionContacts"
+                            :data="form.planItemsList" :key="key" @row-close="rowClose" :before-close="beforeClose"
+                            @selection-change="selectionContacts"
                             @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 474)"
                             @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 474)">
                             <template slot-scope="{scope,row}" slot="menuLeft">
@@ -207,8 +207,9 @@
                                 </el-button>
                                 <el-button :icon="row.isDeleted == 1 ? 'el-icon-refresh-left' : 'el-icon-delete'"
                                     :size="size" :disabled="editButton || form.status == 1" :type="type"
-                                    @click="rowDel(row, index, 'centerShipPaymentCostList')">{{ row.isDeleted == 1 ? '恢复' :
-                                        '删除' }}
+                                    @click="rowDel(row, index, 'centerShipPaymentCostList')">{{ row.isDeleted == 1 ?
+                                        '恢复' :
+                                    '删除' }}
                                 </el-button>
                             </template>
                         </avue-crud>
@@ -985,7 +986,7 @@ export default {
             if (name == 'storageName') {
                 if (row) {
                     this.form.storageId = row.id
-                    this.form.storageName=row.cname
+                    this.form.storageName = row.cname
                 } else {
                     this.form.storageId = null
                     this.form.storageName = null

+ 1 - 1
src/views/storehouse/outStockManage/outStockPlan/index.vue

@@ -34,7 +34,7 @@
         </template>
         <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 && row.status === '1'"
+          <el-button :size="size" :type="type" :disabled="row.status && row.status == 1"
             @click="$refs.crud.rowDel(row, index)">删除</el-button>
         </template>
         <template slot="corpNameSearch">