Kaynağa Gözat

综合协议完成

caojunjie 4 yıl önce
ebeveyn
işleme
c1acc5c0d4

+ 68 - 1
src/api/synthesis/index.js

@@ -49,7 +49,46 @@ export function expenseQuery(data) {
         params:data
     })
 }
-
+// 查询从从表
+export function saveFromQuery(data) {
+    return request({
+        url: 'feeagreement/WarehouseFeeAgreementTypeBusinessDetail/list',
+        method: 'get',
+        params:data
+    })
+}
+// 查询从从从表
+export function queryFromTable(data) {
+    return request({
+        url: 'feeagreement/WarehouseFeeAgreementTypeBusinessDetailFormula/list',
+        method: 'get',
+        params:data
+    })
+}
+// 保存从从表
+export function saveFrompreservation(data) {
+    return request({
+        url: 'feeagreement/WarehouseFeeAgreementTypeBusinessDetail/saveAndUpdateBatchTWarehouseFeeAgreementTypeBusinessDetail',
+        method: 'post',
+        data:data
+    })
+}
+// 保存从从从表
+export function slaveTableInterface(data) {
+    return request({
+        url: 'feeagreement/WarehouseFeeAgreementTypeBusinessDetailFormula/saveAndUpdateBatch',
+        method: 'post',
+        data:data
+    })
+}
+// 保存业务类型
+export function businessPreservation(method,data) {
+    return request({
+        url: 'feeagreement/feeagreementtype',
+        method: method,
+        data:data
+    })
+}
 // 查询明细
 export function submitSave(data) {
     return request({
@@ -65,3 +104,31 @@ export function deleteMainTable(fId) {
         method: 'delete',
     })
 }
+// 删除从表
+export function deleteFrom(fId) {
+    return request({
+        url: 'feeagreement/WarehouseFeeAgreementTypeBusiness/'+fId,
+        method: 'delete',
+    })
+}
+// 删除从从表
+export function slaveTable(fId) {
+    return request({
+        url: 'feeagreement/WarehouseFeeAgreementTypeBusinessDetail/'+fId,
+        method: 'delete',
+    })
+}
+// 删除从从从表
+export function slaveTableTwo(fId) {
+    return request({
+        url: 'feeagreement/WarehouseFeeAgreementTypeBusinessDetailFormula/'+fId,
+        method: 'delete',
+    })
+}
+// 删除业务类型
+export function deleteBusiness(fId) {
+    return request({
+        url: 'feeagreement/feeagreementtype/'+fId,
+        method: 'delete',
+    })
+}

+ 654 - 136
src/views/agreement/synthesis/index.vue

@@ -1,11 +1,11 @@
 <template>
   <div>
     <div class="app-container" v-if="dialogVisibleTwo">
-      <el-form label-position="right" label-width="80px" :model="form">
+      <el-form label-position="right" label-width="80px" :model="queryParams">
         <el-row>
           <el-col :span="6">
             <el-form-item label="协议名称">
-              <el-input v-model="form.name"
+              <el-input v-model="queryParams.fName"
                         size="small"
                         style="width: 200px"></el-input>
             </el-form-item>
@@ -13,7 +13,7 @@
           <el-col :span="6">
             <el-form-item label="客户名称">
               <el-select
-                  v-model="form.region"
+                  v-model="queryParams.fCorpId"
                   clearable
                   filterable
                   size="small"
@@ -30,26 +30,24 @@
             </el-form-item>
           </el-col>
           <el-col :span="6">
-            <el-form-item label="业务类型">
-              <el-input v-model="form.type"
-                        size="small"
-                        style="width: 200px"></el-input>
+            <el-form-item label="有效期起">
+              <el-date-picker
+                  v-model="queryParams.fBegindate"
+                  type="date"
+                  value-format="yyyy-MM-dd 00:00:00"
+                  placeholder="选择日期">
+              </el-date-picker>
             </el-form-item>
           </el-col>
           <el-col :span="6">
-            <el-col :span="6">
-              <el-form-item label="截止日期">
-                <el-date-picker
-                    style="width: 250px"
-                    v-model="form.name"
-                    size="small"
-                    type="daterange"
-                    range-separator="至"
-                    start-placeholder="开始日期"
-                    end-placeholder="结束日期">
-                </el-date-picker>
-              </el-form-item>
-            </el-col>
+            <el-form-item label="有效期至">
+              <el-date-picker
+                  v-model="queryParams.fEnddate"
+                  value-format="yyyy-MM-dd 23:59:59"
+                  type="date"
+                  placeholder="选择日期">
+              </el-date-picker>
+            </el-form-item>
           </el-col>
         </el-row>
       </el-form>
@@ -71,7 +69,6 @@
               size="mini"
               :disabled="single"
               @click="handleUpdate"
-              v-hasPermi="['warehouseBusiness:inStock:edit']"
           >修改
           </el-button>
         </el-col>
@@ -161,7 +158,6 @@
                 type="text"
                 icon="el-icon-edit"
                 @click="handleUpdate(scope.row, false)"
-                v-hasPermi="['warehouseBusiness:inStock:edit']"
             >修改
             </el-button>
             <el-button
@@ -169,7 +165,6 @@
                 type="text"
                 icon="el-icon-delete"
                 @click="handleDelete(scope.row)"
-                v-hasPermi="['warehouseBusiness:inStock:remove']"
             >删除
             </el-button>
           </template>
@@ -336,67 +331,83 @@
           </el-col>
         </el-row>
       </el-form>
-      <el-menu v-show="dialogVisibleTwo === false" :default-active="activeIndex" class="el-menu-demo" mode="horizontal"
-               @select="handleSelect">
-        <el-menu-item
-            v-for="(item,index) in classType"
-            :key="item.fId"
-            :index="index.toString()">{{ item.fName }}
-        </el-menu-item>
-      </el-menu>
-      <el-row :gutter="10" style="margin: 10px auto">
-        <el-col :span="1.5">
-          <el-button
-              type="primary"
-              icon="el-icon-plus"
-              size="mini"
-              @click="entryDetails"
-          >录入明细
-          </el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button
-              type="warning"
-              icon="el-icon-download"
-              size="mini"
-              @click="submit"
-          >保存
-          </el-button>
-        </el-col>
-        <div style="margin: 0 12px;float: right">
-          <el-button
-              icon="el-icon-setting"
-              size="mini"
-              circle
-              @click="showSettingTwo = !showSettingTwo"
-          ></el-button>
-        </div>
-      </el-row>
-      <el-table
-          v-loading="loadingTwo"
-          :data="dataList"
-          @selection-change="handleSelectionChangeTwo"
-      >
-        <el-table-column type="selection" width="50" fixed align="center"/>
-        <el-table-column
-            type="index"
-            label="行号"
-            width="50"
-            align="center"
-            fixed
-        />
-        <el-table-column
-            v-for="(item, index) in getRowListTwo"
-            :key="index"
-            :label="item.name"
-            :width="item.width"
-            :prop="item.label"
-            align="center"
-            :fixed="item.fixed"
-            :show-overflow-tooltip="true"
-            sortable
+
+
+      <div style="width: 14%;float: left;margin-top: 10px;">
+        <el-button
+            type="primary"
+            icon="el-icon-plus"
+            plain
+            size="mini" @click="newBusiness">新增业务类型
+        </el-button>
+        <el-menu v-show="dialogVisibleTwo === false"
+                 :default-active="activeIndex"
+                 style="border: solid 1px #e6e6e6;margin-top: 10px"
+                 class="el-menu-demo"
+                 aria-setsize="mini"
+                 mode="vertical"
+                 @select="handleSelect">
+          <el-menu-item
+              v-for="(item,index) in classType"
+              :key="item.fId"
+              :index="index.toString()">{{ item.fName }}
+          </el-menu-item>
+        </el-menu>
+      </div>
+      <div style="width: 86%;float: right">
+        <el-row :gutter="10" style="margin: 10px auto">
+          <el-col :span="1.5">
+            <el-button
+                type="primary"
+                icon="el-icon-plus"
+                size="mini"
+                @click="entryDetails"
+            >录入明细
+            </el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+                type="warning"
+                icon="el-icon-download"
+                size="mini"
+                @click="submit"
+            >保存
+            </el-button>
+          </el-col>
+          <div style="margin: 0 12px;float: right">
+            <el-button
+                icon="el-icon-setting"
+                size="mini"
+                circle
+                @click="showSettingTwo = !showSettingTwo"
+            ></el-button>
+          </div>
+        </el-row>
+        <el-table
+            v-loading="loadingTwo"
+            :data="dataList"
+            @selection-change="handleSelectionChangeTwo"
         >
-          <template slot-scope="scope">
+          <el-table-column type="selection" width="50" fixed align="center"/>
+          <el-table-column
+              type="index"
+              label="行号"
+              width="50"
+              align="center"
+              fixed
+          />
+          <el-table-column
+              v-for="(item, index) in getRowListTwo"
+              :key="index"
+              :label="item.name"
+              :width="item.width"
+              :prop="item.label"
+              align="center"
+              :fixed="item.fixed"
+              :show-overflow-tooltip="true"
+              sortable
+          >
+            <template slot-scope="scope">
             <span v-if="item.label == 'fFeeItem'">
               <el-select
                   v-model="scope.row[item.label]"
@@ -414,7 +425,7 @@
                 ></el-option>
               </el-select>
             </span>
-            <span v-else-if="item.label == 'fTFeeAgreementTypeFId'">
+              <span v-else-if="item.label == 'fTFeeAgreementTypeFId'">
             <el-select
                 v-model="scope.row[item.label]"
                 clearable
@@ -431,10 +442,10 @@
                 ></el-option>
               </el-select>
           </span>
-            <span v-else-if="item.label == 'fComputingMethod'">
+              <span v-else-if="item.label == 'fComputingMethod'">
             <el-input v-model="scope.row[item.label]" placeholder="请输入内容" size="small"></el-input>
           </span>
-            <span v-else-if="item.label == 'fReceiptPaymentType'">
+              <span v-else-if="item.label == 'fReceiptPaymentType'">
             <el-select
                 v-model="scope.row[item.label]"
                 clearable
@@ -447,36 +458,39 @@
                 <el-option label="付" value="C"></el-option>
               </el-select>
           </span>
-            <span v-else-if="item.label == 'fGetValue'">
+              <span v-else-if="item.label == 'fGetValue'">
               <el-input v-model="scope.row[item.label]" size="small" placeholder="请输入内容"></el-input>
             </span>
-            <span v-else>{{ scope.row[item.label] }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column
-            label="操作"
-            align="center"
-            class-name="small-padding fixed-width"
-            min-width="180"
-            fixed="right"
-        >
-          <template slot-scope="scope">
-            <el-button
-                size="mini"
-                type="text"
-                icon="el-icon-edit"
-            >查看
-            </el-button>
-            <el-button
-                size="mini"
-                type="text"
-                icon="el-icon-delete"
-                v-hasPermi="['warehouseBusiness:inStock:remove']"
-            >删除
-            </el-button>
-          </template>
-        </el-table-column>
-      </el-table>
+              <span v-else>{{ scope.row[item.label] }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+              label="操作"
+              align="center"
+              class-name="small-padding fixed-width"
+              min-width="180"
+              fixed="right"
+          >
+            <template slot-scope="scope">
+              <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-edit"
+                  @click="openFromTable(scope.row)"
+              >查看
+              </el-button>
+              <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-delete"
+                  @click="deleteFromTable(scope.$index,scope.row)"
+              >删除
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+
       <el-dialog
           title="自定义列显示"
           :visible.sync="showSettingTwo"
@@ -551,6 +565,245 @@
           <el-button type="primary" @click="save()">确 定</el-button>
         </span>
       </el-dialog>
+      <el-dialog
+          title="新增业务"
+          :visible.sync="businessOpen"
+          width="50%"
+          :show-close="false">
+        <el-button type="primary" style="margin-bottom: 10px" size="small" @click="entryBusiness">新增</el-button>
+        <el-table
+            :data="businessData"
+            style="width: 100%">
+          <el-table-column
+              prop="fName"
+              align="center"
+              label="业务名称">
+          </el-table-column>
+          <el-table-column
+              label="操作"
+              align="center"
+              width="160"
+              class-name="small-padding fixed-width"
+              min-width="100"
+              fixed="right"
+          >
+            <template slot-scope="scope">
+              <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-edit"
+                  @click="modifyBusiness(scope.$index,scope.row)"
+              >修改
+              </el-button>
+              <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-delete"
+                  @click="deleteBusiness(scope.$index,scope.row)"
+              >删除
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="businessOpen = false">取 消</el-button>
+        </span>
+      </el-dialog>
+      <el-dialog
+          width="30%"
+          :visible.sync="innerVisible"
+          append-to-body>
+        <el-form>
+          <el-form-item label="费用协议类别名称" prop="fName">
+            <el-input
+                v-model="businessOrder.fName"
+                placeholder="请输入费用协议类别名称"
+                clearable
+                size="small"
+            />
+          </el-form-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="innerVisible = false">取 消</el-button>
+          <el-button type="primary" @click="businessSinglePreservation">保 存</el-button>
+        </span>
+      </el-dialog>
+      <el-dialog
+          title="费用协议"
+          :visible.sync="fromSchedule"
+          :show-close="false"
+          width="80%">
+        <el-button type="primary" style="margin-bottom: 10px" size="small" @click="entryDetailsTwo">录入明细</el-button>
+        <el-table
+            :data="tableData"
+            style="width: 100%">
+          <el-table-column label="尺寸" prop="fSize">
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.fSize" placeholder="请输入尺寸"/>
+            </template>
+          </el-table-column>
+          <el-table-column label="箱型" prop="fBoxModel">
+            <template slot-scope="scope">
+              <el-select v-model="scope.row.fBoxModel" placeholder="请选择箱型">
+                <el-option
+                    v-for="dict in fBoxModelOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="parseInt(dict.dictValue)"
+                ></el-option>
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column label="费率" prop="fRate">
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.fRate" placeholder="请输入费率"/>
+            </template>
+          </el-table-column>
+          <el-table-column label="币种" prop="fCurrency">
+            <template slot-scope="scope">
+              <el-select v-model="scope.row.fCurrency" placeholder="请选择币种">
+                <el-option
+                    v-for="dict in fCurrencyOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column label="计量单位" prop="fFeeUnitId">
+            <template slot-scope="scope">
+              <el-select v-model="scope.row.fFeeUnitId" placeholder="请选择计价单位">
+                <el-option
+                    v-for="dict in fFeeUnitIdOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="parseInt(dict.dictValue)"
+                ></el-option>
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column label="免费数量" prop="fFreeNum">
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.fFreeNum" placeholder="请输入免费部分"/>
+            </template>
+          </el-table-column>
+          <el-table-column label="最大金额" prop="fMaxAmount">
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.fMaxAmount" placeholder="请输入最大金额"/>
+            </template>
+          </el-table-column>
+          <el-table-column label="是否包干" prop="fIsContract">
+            <template slot-scope="scope">
+              <el-select v-model="scope.row.fIsContract" placeholder="请选择是否包干 Y是N否">
+                <el-option
+                    v-for="dict in fIsContractOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column label="费率说明" prop="fRemark">
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.fRemark" placeholder="请输入费率"/>
+            </template>
+          </el-table-column>
+          <el-table-column
+              label="操作"
+              align="center"
+              class-name="small-padding fixed-width"
+              min-width="180"
+              fixed="right"
+          >
+            <template slot-scope="scope">
+              <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-edit"
+                  @click="viewFromTable(scope.row)"
+              >查看
+              </el-button>
+              <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-delete"
+                  @click="deleteSlaveTable(scope.$index,scope.row)"
+              >删除
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="fromSchedule = false">取 消</el-button>
+          <el-button type="primary" @click="saveFrom">保 存</el-button>
+        </span>
+      </el-dialog>
+      <el-dialog
+          title="费用明细"
+          :visible.sync="fromTableOpen"
+          :show-close="false"
+          width="70%">
+        <el-button type="primary" style="margin-bottom: 10px" size="small" @click="inputFromSlave">录入明细</el-button>
+        <el-table
+            :data="formData"
+            stripe
+            style="width: 100%">
+          <el-table-column
+              label="属性"
+              prop="fAttribute">
+            <template slot-scope="scope">
+              <el-select v-model="scope.row.fAttribute" placeholder="请选择属性">
+                <el-option
+                    v-for="dict in fAttributeOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="parseInt(dict.dictValue)"
+                ></el-option>
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column label="公式" prop="fFormula">
+            <template slot-scope="scope">
+              <el-select v-model="scope.row.fFormula" placeholder="请选择公式">
+                <el-option
+                    v-for="dict in fFormulaOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="parseInt(dict.dictValue)"
+                ></el-option>
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column label="值" prop="fValue">
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.fValue" placeholder="请输入值"/>
+            </template>
+          </el-table-column>
+          <el-table-column
+              label="操作"
+              align="center"
+              class-name="small-padding fixed-width"
+              min-width="100"
+              fixed="right"
+          >
+            <template slot-scope="scope">
+              <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-delete"
+                  @click="deleteFromTableTwo(scope.$index,scope.row)"
+              >删除
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="fromTableOpen = false">取 消</el-button>
+          <el-button type="primary" @click="saveFromTableSaving">确 定</el-button>
+        </span>
+      </el-dialog>
     </div>
   </div>
 </template>
@@ -564,25 +817,44 @@ import {
   listCorps,
   listCorpsTwo,
   detailed,
+  queryFromTable,
   costType,
   typeClassificationQuery,
   submitSave,
   expenseQuery,
-  deleteMainTable
+  deleteMainTable,
+  deleteBusiness,
+  saveFromQuery,
+  saveFrompreservation,
+  slaveTableInterface,
+  businessPreservation,
+  deleteFrom,
+  slaveTableTwo,
+  slaveTable
 } from "@/api/synthesis/index";
-import AddOrUpdate from "@/views/Warehousing/inStock/AddOrUpdate";
-import {delWarehouseFeeAgreementTypeBusiness} from "@/api/feeagreement/WarehouseFeeAgreementTypeBusiness";
 
 export default {
   name: "index",
   data() {
     return {
       activeIndex: '0',
+      fromTableOpen: false,
+      tableData: [],
+      formData: [],
+      fromTableFid: '',
+      fBoxModelOptions: [],
+      fCurrencyOptions: [],
+      fFeeUnitIdOptions: [],
+      fIsContractOptions: [],
+      businessOpen: false,
+      fromSchedule: false,
+      fromFid: '',
       fMblnoOptions: [],
       dialogVisibleTwo: true,
       showSetting: false,
       showSettingTwo: false,
       getRowListTwo: [],
+      businessData:[],
       // 显示搜索条件
       showSearch: true,
       queryParams: {
@@ -662,14 +934,18 @@ export default {
       ],
       setRowList: [],
       setRowListTwo: [],
+      businessOrder:{},
       single: true,
       allCheck: false,
+      innerVisible: false,
       allCheckTwo: false,
       total: 0,
       fIsValidOptions: [],
       fIsCommitOptions: [],
       fIsStandardOptions: [],
-      fFeeItem:[],
+      fAttributeOptions: [],
+      fFormulaOptions: [],
+      fFeeItem: [],
       // 表单参数
       form: {},
       classType: [],
@@ -683,6 +959,24 @@ export default {
   },
   components: {draggable},
   created() {
+    this.getDicts("fee_agreement_attribute").then(response => {
+      this.fAttributeOptions = response.data;
+    });
+    this.getDicts("fee_agreement_formula").then(response => {
+      this.fFormulaOptions = response.data;
+    });
+    this.getDicts("fee_agreement_unit").then(response => {
+      this.fFeeUnitIdOptions = response.data;
+    });
+    this.getDicts("data_cntrId").then(response => {
+      this.fBoxModelOptions = response.data;
+    });
+    this.getDicts("currency").then(response => {
+      this.fCurrencyOptions = response.data;
+    });
+    this.getDicts("sys_yes_no").then(response => {
+      this.fIsContractOptions = response.data;
+    });
     this.getDicts("sys_yes_no").then(response => {
       this.fIsValidOptions = response.data;
     });
@@ -695,12 +989,12 @@ export default {
     listCorpsTwo({type: 1}).then((response) => {
       this.fMblnoOptions = response.rows;
     });
-    expenseQuery({fFeetype:1}).then(res=>{
+    expenseQuery({fFeetype: 1}).then(res => {
       console.log(res)
       this.fFeeItem = res.rows
     })
     costType().then(res => {
-      this.classType = res.rows
+      this.businessData = this.classType = res.rows
       console.log(res.rows)
     })
     this.setRowList = this.tableDate;
@@ -710,26 +1004,115 @@ export default {
   },
   methods: {
     handleClose(done) {
-
+    },
+    //录入业务
+    entryBusiness(){
+      this.businessOrder = {
+        fName: "",
+      }
+      this.innerVisible = true
+    },
+    businessSinglePreservation(){
+      if (this.businessOrder.fId){
+        businessPreservation('PUT',this.businessOrder).then(res=>{
+          costType().then(res => {
+            this.businessData = this.classType = res.rows
+            this.innerVisible = false
+            this.$message.success('修改成功');
+            console.log(res.rows)
+          })
+        })
+      }else {
+        businessPreservation('post',this.businessOrder).then(res=>{
+          costType().then(res => {
+            this.businessData = this.classType = res.rows
+            this.innerVisible = false
+            this.$message.success('新增成功');
+            console.log(res.rows)
+          })
+        })
+      }
     },
     //录入明细
-    entryDetails(){
+    entryDetails() {
       this.dataList.push({
-        fFeeItem:'',
-        fTFeeAgreementTypeFId:this.classType[this.activeIndex].fId,
-        fComputingMethod:'',
-        fReceiptPaymentType:'',
-        fGetValue:'',
+        fFeeItem: '',
+        fTFeeAgreementTypeFId: this.classType[this.activeIndex].fId,
+        fComputingMethod: '',
+        fReceiptPaymentType: '',
+        fGetValue: '',
+      })
+    },
+    //录入明细二
+    entryDetailsTwo() {
+      this.tableData.push({
+        fWarehouseFeeAgreementTypeFId: this.form.fId,//主表id
+        fWarehouseFeeAgreementTypeBusinessFId: this.fromFid,//从表id
+        fRate: '',
+        fSize: '',
+        fBoxModel: '',
+        fCurrency: '',
+        fFeeUnitId: '',
+        fFreeNum: '',
+        fMaxAmount: '',
+        fIsContract: '',
+        fRemark: ''
+      })
+    },
+    //录入明细三
+    inputFromSlave() {
+      this.formData.push({
+        fWarehouseFeeAgreementTypeFId: this.form.fId,
+        fWarehouseFeeAgreementTypeBusinessFId: this.fromFid,
+        fWarehouseFeeAgreementTypeBusinessDetailFId: this.fromTableFid,
+        fAttribute:'',
+        fFormula:'',
+        fValue:''
+      })
+    },
+    //从从保存
+    saveFrom() {
+      console.log(this.tableData);
+      saveFrompreservation(this.tableData).then(res => {
+        saveFromQuery({
+          fWarehouseFeeAgreementTypeFId: this.form.fId,
+          fWarehouseFeeAgreementTypeBusinessFId: this.fromFid
+        }).then(res => {
+          this.tableData = res.rows
+          // this.fromSchedule = true
+          // this.fromFid = row.fId
+          console.log(res)
+        })
       })
     },
     //提交保存
-    submit(){
+    submit() {
       let data = this.form
-      data.tWarehouseFeeAgreementTypeBusinessList  = this.dataList
+      data.tWarehouseFeeAgreementTypeBusinessList = this.dataList
       console.log(data)
-      submitSave(data).then(res=>{
-        console.log(res)
-      })
+      if (this.classType.length === 0) {
+        this.$message({
+          message: '请新增协议类型',
+          type: 'warning'
+        });
+      } else {
+        submitSave(data).then(res => {
+          console.log(res)
+          detailed(res.data).then(res => {
+            console.log(res)
+            this.form = res.data
+            typeClassificationQuery({
+              fTFeeAgreementTypeFId: this.classType[this.activeIndex].fId,
+              fWarehouseFeeAgreementTypeFId: this.form.fId
+            }).then(res => {
+              this.dataList = res.rows
+            })
+            // this.dataList = res.data.tWarehouseFeeAgreementTypeBusinessList
+            delete this.form.tWarehouseFeeAgreementTypeBusinessList
+            console.log(this.form)
+          })
+        })
+      }
     },
     goBack() {
       this.$confirm("是否确定返回列表?", "提示", {
@@ -751,10 +1134,34 @@ export default {
     handleSelect(key, keyPath) {
       console.log(key, keyPath);
       this.activeIndex = key
-      typeClassificationQuery({fTFeeAgreementTypeFId: this.classType[key].fId,fWarehouseFeeAgreementTypeFId:this.form.fId}).then(res => {
+      typeClassificationQuery({
+        fTFeeAgreementTypeFId: this.classType[key].fId,
+        fWarehouseFeeAgreementTypeFId: this.form.fId
+      }).then(res => {
         this.dataList = res.rows
       })
     },
+    //新增业务
+    newBusiness() {
+      this.businessOpen = true
+      this.businessData = this.classType
+    },
+    // 从从表新增
+    openFromTable(row) {
+      if (row.fId) {
+        saveFromQuery({
+          fWarehouseFeeAgreementTypeFId: this.form.fId,
+          fWarehouseFeeAgreementTypeBusinessFId: row.fId
+        }).then(res => {
+          this.tableData = res.rows
+          this.fromSchedule = true
+          this.fromFid = row.fId
+          console.log(res)
+        })
+      } else {
+        this.$message.error('请保存后再点查看');
+      }
+    },
     //查询列数据
     getRow() {
       let that = this;
@@ -864,6 +1271,38 @@ export default {
         console.log(res)
       })
     },
+    /** 查看从从按钮操作 */
+    viewFromTable(row) {
+      console.log(row)
+      if (row.fId){
+        queryFromTable({
+          fWarehouseFeeAgreementTypeFId: this.form.fId,
+          fWarehouseFeeAgreementTypeBusinessFId: this.fromFid,
+          fWarehouseFeeAgreementTypeBusinessDetailFId: row.fId
+        }).then(res => {
+          this.formData = res.rows
+          this.fromTableFid = row.fId
+          this.fromTableOpen = true
+          console.log(res)
+        })
+      }else {
+        this.$message.error('请保存后再点查看');
+      }
+    },
+
+    //从从从保存
+    saveFromTableSaving(){
+      slaveTableInterface(this.formData).then(res=>{
+        queryFromTable({
+          fWarehouseFeeAgreementTypeFId: this.form.fId,
+          fWarehouseFeeAgreementTypeBusinessFId: this.fromFid,
+          fWarehouseFeeAgreementTypeBusinessDetailFId: this.fromTableFid
+        }).then(res => {
+          this.formData = res.rows
+          console.log(res)
+        })
+      })
+    },
     /** 修改按钮操作 */
     handleUpdate(row, state) {
       this.setRowListTwo = this.getListOfDetailRows;
@@ -874,8 +1313,11 @@ export default {
       detailed(row.fId).then(res => {
         console.log(res)
         this.form = res.data
-        if (this.classType.length > 0){
-          typeClassificationQuery({fTFeeAgreementTypeFId: this.classType[0].fId,fWarehouseFeeAgreementTypeFId:this.form.fId}).then(res => {
+        if (this.classType.length > 0) {
+          typeClassificationQuery({
+            fTFeeAgreementTypeFId: this.classType[0].fId,
+            fWarehouseFeeAgreementTypeFId: this.form.fId
+          }).then(res => {
             this.dataList = res.rows
           })
         }
@@ -892,19 +1334,95 @@ export default {
     handleSelectionChangeTwo(selection) {
       console.log(selection)
     },
+
+    /** 修改业务类型 */
+    modifyBusiness(index,row){
+      this.innerVisible = true
+      this.businessOrder = row
+    },
+    /** 删除业务类型 */
+    deleteBusiness(index,row){
+      console.log(index,row)
+      if (row.fId){
+        this.$confirm('是否确认删除业务类型编号为"' + row.fId + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function () {
+          return deleteBusiness(row.fId);
+        }).then(() => {
+          this.businessData.splice(index, 1);
+          this.classType.splice(index, 1);
+          this.msgSuccess("删除成功");
+        })
+      }else {
+        this.businessData.splice(index, 1);
+      }
+    },
     /** 删除按钮操作 */
     handleDelete(row) {
       this.$confirm('是否确认删除费用协议从表编号为"' + row.fId + '"的数据项?', "警告", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning"
-      }).then(function() {
+      }).then(function () {
         return deleteMainTable(row.fId);
       }).then(() => {
         this.getList();
         this.msgSuccess("删除成功");
       })
     },
+    /** 删除从按钮操作 */
+    deleteFromTable(index,row) {
+      if (row.fId){
+        this.$confirm('是否确认删除费用协议从表编号为"' + row.fId + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function () {
+          return deleteFrom(row.fId);
+        }).then(() => {
+          this.dataList.splice(index, 1);
+          this.msgSuccess("删除成功");
+        })
+      }else {
+        this.dataList.splice(index, 1);
+      }
+    },
+    /** 删除从从按钮操作 */
+    deleteSlaveTable(index,row) {
+      if (row.fId){
+        this.$confirm('是否确认删除费用协议从表编号为"' + row.fId + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function () {
+          return slaveTable(row.fId);
+        }).then(() => {
+          this.tableData.splice(index, 1);
+          this.msgSuccess("删除成功");
+        })
+      }else {
+        this.tableData.splice(index, 1);
+      }
+    },
+    /** 删除从从从按钮操作 */
+    deleteFromTableTwo(index,row) {
+      if (row.fId){
+        this.$confirm('是否确认删除费用协议从表编号为"' + row.fId + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function () {
+          return slaveTableTwo(row.fId);
+        }).then(() => {
+          this.formData.splice(index, 1);
+          this.msgSuccess("删除成功");
+        })
+      }else {
+        this.formData.splice(index, 1);
+      }
+    },
     /** 新增按钮操作 */
     handleAdd() {
       this.setRowListTwo = this.getListOfDetailRows;

+ 4 - 0
src/views/feeagreement/WarehouseFeeAgreementTypeBusinessDetail/index.vue

@@ -435,15 +435,19 @@
     },
     created() {
       this.getList();
+      //1
       this.getDicts("fee_agreement_unit").then(response => {
         this.fFeeUnitIdOptions = response.data;
       });
+      //1
       this.getDicts("data_cntrId").then(response => {
         this.fBoxModelOptions = response.data;
       });
+      //1
       this.getDicts("currency").then(response => {
         this.fCurrencyOptions = response.data;
       });
+      //1
       this.getDicts("sys_yes_no").then(response => {
         this.fIsContractOptions = response.data;
       });

+ 4 - 4
src/views/system/user/index.vue

@@ -293,13 +293,13 @@
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item  label="用户名称" prop="userName" v-if="form.userId == undefined">
+            <el-form-item  label="用户名称" prop="userName">
               <el-input v-model="form.userName" placeholder="请输入用户名称" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item v-if="form.userId == undefined" label="用户密码" prop="password">
-              <el-input v-model="form.password" placeholder="请输入用户密码" type="password" />
+            <el-form-item label="用户密码" prop="password">
+              <el-input v-model="form.password" placeholder="请输入用户密码"/>
             </el-form-item>
           </el-col>
         </el-row>
@@ -594,7 +594,7 @@ export default {
         this.form.roleIds = response.roleIds;
         this.open = true;
         this.title = "修改用户";
-        this.form.password = "";
+        // this.form.password = "";
       });
     },
     /** 重置密码按钮操作 */