Browse Source

费用修改新增方式

caojunjie 3 years ago
parent
commit
05a82f273a

+ 12 - 0
src/views/businessManagement/salesOrder/configuration/advantageProject.json

@@ -5,6 +5,11 @@
   "searchShow": true,
   "searchMenuSpan": 6,
   "dialogWidth": "60%",
+  "addBtn":false,
+  "editBtn":false,
+  "addRowBtn":true,
+  "cellBtn":false,
+  "cancelBtn":false,
   "tree": true,
   "border": true,
   "index": true,
@@ -17,6 +22,7 @@
       "prop": "itemId",
       "index": 1,
       "width":100,
+      "cell": true,
       "rules": [
         {
           "required": true,
@@ -29,6 +35,7 @@
       "prop": "code",
       "index": 2,
       "width":100,
+      "cell": true,
       "rules": [
         {
           "required": true,
@@ -41,6 +48,7 @@
       "prop": "corpId",
       "index": 3,
       "width":100,
+      "cell": true,
       "rules": [
         {
           "required": false,
@@ -53,6 +61,7 @@
       "prop": "amount",
       "index": 4,
       "width":100,
+      "cell": true,
       "rules": [
         {
           "required": false,
@@ -65,6 +74,7 @@
       "prop": "settlmentAmount",
       "index": 5,
       "width":100,
+      "cell": true,
       "rules": [
         {
           "required": false,
@@ -78,6 +88,7 @@
       "type": "number",
       "index": 6,
       "width":100,
+      "cell": true,
       "rules": [
         {
           "required": true,
@@ -90,6 +101,7 @@
       "prop": "remarks",
       "index": 7,
       "width":100,
+      "cell": true,
       "rules": [
         {
           "required": true,

+ 1 - 2
src/views/businessManagement/salesOrder/configuration/bankOfDeposit.json

@@ -58,8 +58,7 @@
       "action": "/api/blade-resource/oss/endpoint/put-file",
       "propsHttp": {
         "res": "data",
-        "url": "link",
-        "fileName": "originalName"
+        "url": "link"
       },
       "hide": true,
       "span": 24

+ 19 - 8
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -76,10 +76,19 @@
               :option="advantageProject"
               v-model="advantageProjectForm"
               :data="advantageProjectData"
+              ref="crudProject"
               @row-save="rowSaveProject"
               @row-update="rowUpdateProject"
               @row-del="rowDelProject"
-          ></avue-crud>
+          >
+            <template slot-scope="{row,index}" slot="menu">
+              <el-button
+                  type="text"
+                  size="small"
+                  @click="rowCellTwo(row,index)"
+              >{{row.$cellEdit?'保存':'修改'}}</el-button>
+            </template>
+          </avue-crud>
         </basic-container>
         <containerTitle title="附件上传"></containerTitle>
         <basic-container style="margin-bottom: 40px">
@@ -126,7 +135,7 @@
       </el-row>
         <span slot="footer" class="dialog-footer">
           <el-button @click="dialogVisible = false">取 消</el-button>
-          <el-button type="primary" @click="importGoods" :disabled="tableData.length>1?true:false">导入</el-button>
+          <el-button type="primary" @click="importGoods">导入</el-button>
         </span>
     </el-dialog>
   </div>
@@ -597,16 +606,18 @@ export default {
   methods: {
     //点击行可编辑
     handleRowClick(row, event, column) {
-      this.$message({
-        showClose: true,
-        message: '序号' + row.$index,
-        type: 'success',
-      });
+      console.log(row.$index)
     },
+    //商品编辑
     rowCell(row, index) {
       console.log(row)
       this.$refs.crudContact.rowCell(row, index)
     },
+    //费用编辑
+    rowCellTwo(row, index) {
+      console.log(row)
+      this.$refs.crudProject.rowCell(row, index)
+    },
     //确认导入触发
     importGoods(){
       this.contactsData = this.contactsData.concat(this.tableData)
@@ -662,7 +673,7 @@ export default {
     },
     //新增费用明细保存触发
     rowSaveProject(row, done, loading){
-      this.advantageProjectData.push(row)
+      // this.advantageProjectData.push(row)
       done()
     },
     //修改费用明细触发