Browse Source

点击查看

qinbai 3 years ago
parent
commit
2e64f7f619

+ 21 - 5
src/views/importTrade/invoice/detailsPageEdit.vue

@@ -9,9 +9,16 @@
       <div class="upper_right_button">
         <el-button type="primary"
                    size="small"
+                   v-if="viewDisabled"
+                   class="el-button--small-yh "
+                   :loading="buttonLoading"
+                   @click.stop="openDisabled()">编辑
+        </el-button>
+        <el-button type="primary"
+                   size="small"
                    :loading="buttonLoading"
                    class="el-button--small-yh"
-                   :disabled="!form.id"
+                   :disabled="!form.id || viewDisabled"
                    @click.stop="confirmGoods">
           {{goodsDisable ? "撤回发货":"确认发货"}}
         </el-button>
@@ -27,7 +34,7 @@
           type="primary"
           size="small"
           :loading="buttonLoading"
-          :disabled="disabled  || goodsDisable"
+          :disabled="disabled  || goodsDisable || viewDisabled"
           @click="editCustomer"
         >{{ form.id ? '确认修改' : '确认新增' }}
         </el-button>
@@ -213,14 +220,14 @@
               <el-button
                 type="text"
                 size="small"
-                :disabled="goodsDisable"
+                :disabled="goodsDisable || viewDisabled"
                 @click="rowCell(row,index)"
               >{{ row.$cellEdit ? '保存' : '修改' }}
               </el-button>
               <el-button
                 type="text"
                 size="small"
-                :disabled="goodsDisable"
+                :disabled="goodsDisable || viewDisabled"
                 @click="rowDel(row,index)"
               >删除
               </el-button>
@@ -229,7 +236,7 @@
               <el-button type="primary"
                          icon="el-icon-plus"
                          size="small"
-                         :disabled="goodsDisable"
+                         :disabled="goodsDisable || viewDisabled"
                          @click="openMarketDialog"
               >导入明细
               </el-button>
@@ -310,6 +317,7 @@ export default {
       disabled: false,
       goodsDisable: false,
       marketDialog: false,
+      viewDisabled:false,
       customerContact: customerContact,
       contactsForm: {},
       marketParams:{},
@@ -501,6 +509,11 @@ export default {
     getStorage().then(res => {
       this.storageIdDic = res.data
     })
+
+    if(this.detailData.view){
+      this.viewDisabled = true
+    }
+
     if (this.detailData.id) {
       this.buttonLoading = true;
       let id = this.detailData.id.replace(/\"/g, "")
@@ -738,6 +751,9 @@ export default {
       this.sumOrderNo();   //合并合同号
       this.marketDialog = false;
     },
+    openDisabled(){
+      this.viewDisabled = false
+    },
     //选择货物品种
     choice(row) {
       this.dialogVisible = true;

+ 7 - 0
src/views/importTrade/invoice/index.vue

@@ -61,6 +61,12 @@
         >删除
         </el-button>
       </template>
+      <template slot-scope="scope" slot="orderNo">
+        <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.orderNo }}</span>
+      </template>
+      <template slot-scope="scope" slot="corpsName">
+        <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.corpsName }}</span>
+      </template>
     </avue-crud>
   </basic-container>
   <detail-page
@@ -195,6 +201,7 @@ export default {
     beforeOpenPage(row, status) {
       this.detailData = {
         id: row.id,
+        view:true,
         status: status
       };
       this.show = false;

+ 21 - 5
src/views/importTrade/receipt/detailsPageEdit.vue

@@ -9,9 +9,16 @@
       <div class="upper_right_button">
         <el-button type="primary"
                    size="small"
+                   v-if="viewDisabled"
+                   class="el-button--small-yh "
+                   :loading="buttonLoading"
+                   @click.stop="openDisabled()">编辑
+        </el-button>
+        <el-button type="primary"
+                   size="small"
                    class="el-button--small-yh"
                    :loading="buttonLoading"
-                   :disabled="!form.id"
+                   :disabled="!form.id || viewDisabled"
                    @click.stop="confirmReceipt">
           {{receiptDisable ?"撤销收货":"确认收货"}}
         </el-button>
@@ -26,7 +33,7 @@
           class="el-button--small-yh"
           type="primary"
           size="small"
-          :disabled="disabled || receiptDisable"
+          :disabled="disabled || receiptDisable || viewDisabled"
           :loading="buttonLoading"
           @click="editCustomer"
         >{{ form.id ? '确认修改' : '确认新增' }}
@@ -207,14 +214,14 @@
               <el-button
                 type="text"
                 size="small"
-                :disabled="receiptDisable"
+                :disabled="receiptDisable  || viewDisabled"
                 @click="rowCell(row,index)"
               >{{ row.$cellEdit ? '修改完成' : '修改' }}
               </el-button>
               <el-button
                 type="text"
                 size="small"
-                :disabled="receiptDisable"
+                :disabled="receiptDisable  || viewDisabled"
                 @click="rowDel(row,index)"
               >删除
               </el-button>
@@ -223,7 +230,7 @@
               <el-button type="primary"
                          icon="el-icon-plus"
                          size="small"
-                         :disabled="receiptDisable"
+                         :disabled="receiptDisable  || viewDisabled"
                          @click="commoditySelection"
               >导入明细
               </el-button>
@@ -299,6 +306,7 @@ export default {
       skip:false,
       buttonLoading:false,
       receiptDisable:false,
+      viewDisabled:false,
       customerContact: customerContact,
       contactsForm: {},
       contactsData: [],
@@ -490,6 +498,11 @@ export default {
     getStorage().then(res =>{
       this.storageIdDic = res.data
     })
+
+    if(this.detailData.view){
+      this.viewDisabled = true
+    }
+
     if (this.detailData.id) {
       this.buttonLoading = true;
       let id = this.detailData.id.replace(/\"/g, "")
@@ -849,6 +862,9 @@ export default {
       this.sumOrderNo();   //合并合同号
       this.procurementDialog = false;
     },
+    openDisabled(){
+      this.viewDisabled = false
+    },
     //上传文件保存
     upLoadSave(row, done, loading){
       this.upLoadData.push(row)

+ 7 - 0
src/views/importTrade/receipt/index.vue

@@ -60,6 +60,12 @@
         >删除
         </el-button>
       </template>
+      <template slot-scope="scope" slot="orderNo">
+        <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.orderNo }}</span>
+      </template>
+      <template slot-scope="scope" slot="corpsName">
+        <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.corpsName }}</span>
+      </template>
     </avue-crud>
   </basic-container>
   <detail-page
@@ -194,6 +200,7 @@ export default {
     beforeOpenPage(row, status) {
       this.detailData = {
         id: row.id,
+        view:true,
         status: status
       };
       this.show = false;

+ 26 - 10
src/views/purchase/contract/detailsPage.vue

@@ -6,17 +6,24 @@
                    @click="backToList">返回列表
         </el-button>
       <div v-if="!checkDisabled"  class="upper_right_button">
+        <el-button type="primary"
+                   size="small"
+                   v-if="viewDisabled"
+                   class="el-button--small-yh "
+                   :loading="buttonLoading"
+                   @click.stop="openDisabled()">编辑
+        </el-button>
         <el-button type="warning"
                    size="small"
                    class="el-button--small-yh "
                    :loading="buttonLoading"
-                   :disabled="!form.id"
+                   :disabled="!form.id || viewDisabled"
                    @click.stop="applyPayment('申请')">申请货款
         </el-button>
         <el-button type="info"
                    size="small"
                    :loading="buttonLoading"
-                   :disabled="!form.id"
+                   :disabled="!form.id  || viewDisabled"
                    @click="openApplicationDialog"
         >查看申请记录
         </el-button>
@@ -24,7 +31,7 @@
                    size="small"
                    class="el-button--small-yh "
                    :loading="buttonLoading"
-                   :disabled="!form.id"
+                   :disabled="!form.id  || viewDisabled"
                    @click.stop="applyPayment('收费')">退款
         </el-button>
         <el-button type="success"
@@ -38,7 +45,7 @@
           class="el-button--small-yh "
           type="primary"
           size="small"
-          :disabled="disabled"
+          :disabled="disabled  || viewDisabled"
           @click="editCustomer"
           :loading="buttonLoading"
         >{{form.id?'确认修改':'确认新增'}}
@@ -233,14 +240,14 @@
               <el-button
                 type="text"
                 size="small"
-                :disabled="row.actualQuantity !=0 || checkDisabled"
+                :disabled="row.actualQuantity !=0 || checkDisabled || viewDisabled"
                 @click="rowCell(row,index)"
               >{{ row.$cellEdit ? '修改完成' : '修改' }}
               </el-button>
               <el-button
                 type="text"
                 size="small"
-                :disabled="row.actualQuantity !=0 || checkDisabled"
+                :disabled="row.actualQuantity !=0 || checkDisabled || viewDisabled"
                 @click="rowDel(row,index)"
               >删除
               </el-button>
@@ -249,14 +256,14 @@
               <el-button type="primary"
                          icon="el-icon-plus"
                          size="small"
-                         :disabled=" checkDisabled"
+                         :disabled=" checkDisabled || viewDisabled"
                          @click="commoditySelection"
               >录入明细
               </el-button>
               <el-button type="warning"
                          size="small"
 
-                         :disabled="selectContact.length == 0 || checkDisabled"
+                         :disabled="selectContact.length == 0 || checkDisabled || viewDisabled"
                          @click="beforePage(false)"
               >生成收货单
               </el-button>
@@ -266,14 +273,14 @@
         <fee-info
           ref="feeInfo"
           :orderFeesList="orderFeesList"
-          :disabled="checkDisabled"
+          :disabled="checkDisabled || viewDisabled"
           @beforeFinance="beforeFinance"
           feeUrl=""
         />
         <upload-file
           ref="uploadFile"
           title="合同附件"
-          :disabled="checkDisabled"
+          :disabled="checkDisabled || viewDisabled"
           :orderFilesList="orderFilesList"
           delUrl=""
         />
@@ -362,6 +369,7 @@ export default {
       commodityData: false,
       takeDisabled:false, //收货状态
       checkDisabled:false,
+      viewDisabled:false,
       tableData: [],
       billUrl:"/purchase/contract/index",
       billType:"",
@@ -765,6 +773,11 @@ export default {
     this.getWorkDicts("payment_term").then(res =>{
       this.paymentTypeDic = res.data.data
     })
+
+    if(this.detailData.view){
+      this.viewDisabled = true
+    }
+
     if (this.detailData.id) {
       this.buttonLoading = true;
       let id = this.detailData.id.replace(/\"/g, "")
@@ -979,6 +992,9 @@ export default {
         this.oldFilesList = this.deepClone(form.orderFilesList)
       }
     },
+    openDisabled(){
+      this.viewDisabled = false
+    },
     selectionContact(row){
       this.selectContact = row;
     },

+ 7 - 0
src/views/purchase/contract/index.vue

@@ -78,6 +78,12 @@
           >删除
           </el-button>
         </template>
+        <template slot-scope="scope" slot="orderNo">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.orderNo }}</span>
+        </template>
+        <template slot-scope="scope" slot="strCorpName">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.strCorpName }}</span>
+        </template>
       </avue-crud>
     </basic-container>
     <detail-page
@@ -199,6 +205,7 @@ export default {
     beforeOpenPage(row, status) {
       this.detailData = {
         id: row.id,
+        view:true,
         status: status
       };
       this.show = false;

+ 27 - 8
src/views/salesManagement/salesContract/detailsPage.vue

@@ -9,22 +9,29 @@
       <div class="upper_right_button">
         <el-button type="primary"
                    size="small"
-                   class="el-button--small-yh"
-                   :disabled="true"
+                   v-if="viewDisabled"
+                   class="el-button--small-yh "
                    :loading="buttonLoading"
-                   @click.stop="">请核
+                   @click.stop="openDisabled()">编辑
         </el-button>
+<!--        <el-button type="primary"-->
+<!--                   size="small"-->
+<!--                   class="el-button&#45;&#45;small-yh"-->
+<!--                   :disabled="true"-->
+<!--                   :loading="buttonLoading"-->
+<!--                   @click.stop="">请核-->
+<!--        </el-button>-->
         <el-button type="warning"
                    size="small"
                    class="el-button--small-yh"
-                   :disabled="!form.id"
+                   :disabled="!form.id || viewDisabled"
                    :loading="buttonLoading"
                    @click.stop="applySettlement('收费')">生成账单
         </el-button>
         <el-button type="warning"
                    size="small"
                    class="el-button--small-yh"
-                   :disabled="!form.id"
+                   :disabled="!form.id  || viewDisabled"
                    :loading="buttonLoading"
                    @click.stop="applySettlement('申请')">退款
         </el-button>
@@ -39,7 +46,7 @@
           class="el-button--small-yh"
           type="primary"
           size="small"
-          :disabled="disabled"
+          :disabled="disabled || viewDisabled"
           :loading="buttonLoading"
           @click="editCustomer"
         >{{form.id?'确认修改':'确认新增'}}
@@ -213,11 +220,12 @@
               <el-button type="primary"
                          icon="el-icon-plus"
                          size="small"
+                         :disabled="  viewDisabled"
                          @click="newDetails"
               >录入明细</el-button>
               <el-button type="warning"
                          size="small"
-                         :disabled="selection.length < 1"
+                         :disabled="selection.length < 1  || viewDisabled"
                          @click="generateShipmentD"
               >生成发货单
               </el-button>
@@ -232,12 +240,14 @@
               <el-button
                 type="text"
                 size="small"
+                :disabled="  viewDisabled"
                 @click="rowCell(row,index)"
               >{{ row.$cellEdit ? '修改完成' : '修改' }}
               </el-button>
               <el-button
                 type="text"
                 size="small"
+                :disabled="  viewDisabled"
                 @click="rowDelList(row,index)"
               >删除
               </el-button>
@@ -247,13 +257,15 @@
         <fee-info
           ref="feeInfo"
           @beforeFinance="beforeFinance"
+          :disabled=" viewDisabled"
           :orderFeesList="orderFeesList"
           feeUrl=""
         />
         <upload-file
           ref="uploadFile"
           title="合同附件"
-          :orderFilesList="orderFilesList"
+          :disabled=" viewDisabled"
+          :orderFilesList="orderFilesList || viewDisabled"
           delUrl=""
         />
       </el-form>
@@ -338,6 +350,7 @@ export default {
       buttonLoading:false,
       dialogCommodity: false,
       applySettlementDialog:false,
+      viewDisabled:false,
       form: {},
       orderFeesList:[],
       orderFilesList:[],
@@ -708,6 +721,9 @@ export default {
     this.getWorkDicts("currency").then(res =>{
       this.currencyDic = res.data.data
     })
+    if(this.detailData.view){
+      this.viewDisabled = true
+    }
     if (this.detailData.id) {
       this.buttonLoading = true;
       let id = this.detailData.id.replace(/\"/g, "")
@@ -1141,6 +1157,9 @@ export default {
         this.totalChange()
       })
     },
+    openDisabled(){
+      this.viewDisabled = false
+    },
     backToList() {
       if(contrastObj(this.form,this.oldForm) || contrastList(this.importInventoryData,this.oldInventoryData)
         || contrastList(this.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)

+ 11 - 1
src/views/salesManagement/salesContract/index.vue

@@ -69,6 +69,12 @@
         >删除
         </el-button>
       </template>
+      <template slot-scope="scope" slot="orderNo">
+        <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.orderNo }}</span>
+      </template>
+      <template slot-scope="scope" slot="corpsName">
+        <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.corpsName }}</span>
+      </template>
     </avue-crud>
   </basic-container>
   <detail-page
@@ -99,6 +105,7 @@ export default {
       form: {},
       detailData:{},
       search: {},
+      viewDisabled:false,
       configuration:{
         multipleChoices:false,
         multiple:false,
@@ -157,7 +164,7 @@ export default {
     beforeOpenPage(row, index) {
       this.detailData = {
         id: row.id,
-        status: status
+        view:true,
       };
       this.show = false;
     },
@@ -191,6 +198,9 @@ export default {
       this.onLoad(this.page, params);
       done()
     },
+    openDisabled(){
+      this.viewDisabled = false
+    },
     searchReset() {
       console.log('1')
     },