Procházet zdrojové kódy

提交费用修改接口

caojunjie před 4 roky
rodič
revize
4902ef5ca6

+ 1 - 1
src/api/fleet/ftmsorderbillscarstwo.js

@@ -90,7 +90,7 @@ export function selectStowage(query) {
 // 查询车队派车列表
 export function listFtmsorderbillscars(query) {
     return request({
-        url: '/fleet/ftmsorderbillscars/query',
+        url: '/fleet/ftmsorderbillscars/queryModify',
         method: 'get',
         params: query
     })

+ 24 - 9
src/api/warehouseCheck/index.js

@@ -15,17 +15,24 @@ export function delLog(fId) {
         method: 'delete',
     })
 }
+// 删除主表
+export function deleteMasterTable(fId) {
+    return request({
+        url: 'warehouse/check/'+ fId,
+        method: 'delete',
+    })
+}
 // 查询明细
 export function information(query) {
     return request({
-        url: '/warehouse/check/'+query,
+        url: 'warehouse/check/'+query,
         method: 'get'
     })
 }
 //新增
 export function newlyAdded(data) {
     return request({
-        url: '/warehouse/check/saveCheckAndItems',
+        url: 'warehouse/check/saveCheckAndItems',
         method: 'post',
         data:data
     })
@@ -33,25 +40,26 @@ export function newlyAdded(data) {
 // 获取对应角色的用户
 export function selectUserByRole() {
     return request({
-        url: '/system/user/selectUserByRole',
+        url: 'system/user/selectUserByRole',
         method: 'get',
         params: {
-            roleName:'仓储经理'
+            roleName:'巡检员'
         }
     })
 }
 //图片详情点开
-export function savePicture(fId) {
+export function savePicture(data) {
     return request({
-        url: '/warehouse/checkitemsdetails/'+fId,
-        method: 'get'
+        url: 'warehouse/checkitemsdetails/list',
+        method: 'get',
+        params:data
     })
 }
 //图片页面新增修改
-export function addOrModifyPictureList(data) {
+export function addOrModifyPictureList(data,method) {
     return request({
         url: 'warehouse/checkitemsdetails',
-        method: 'PUT',
+        method: method,
         data:data
     })
 }
@@ -62,3 +70,10 @@ export function currentLogin() {
         method: 'get'
     })
 }
+//第二页面列表删除
+export function secondDelete(fId) {
+    return request({
+        url: 'warehouse/checkitems/'+fId,
+        method: 'delete'
+    })
+}

+ 13 - 2
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -540,10 +540,21 @@
           </div>
 
           <el-row>
-            <el-col :span="24">
+            <el-col :span="12">
               <el-form-item label="备注" prop="remark">
                 <el-input
-                    style="width: 91.5%"
+                    style="width: 80%"
+                    v-model="form.remark"
+                    type="textarea"
+                    :disabled="browseStatus || form.warehouseStatus > 3"
+                    placeholder="请输入内容"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="备注" prop="remark">
+                <el-input
+                    style="width: 80%"
                     v-model="form.remark"
                     type="textarea"
                     :disabled="browseStatus || form.warehouseStatus > 3"

+ 133 - 74
src/views/track/costModification/index.vue

@@ -264,77 +264,77 @@
       </el-collapse-transition>
     </el-form>
     <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <!--        <el-button size="mini" @click="handleQuery(null)">全 部</el-button>-->
-        <el-badge
-            :value="buttonValue.quantity"
-            type="warning"
-            style="margin-right: 10px"
-        >
-          <el-button size="mini" @click="handleQuery()">全 部</el-button>
-        </el-badge>
-      </el-col>
-      <el-col :span="1.5">
-        <el-badge
-            :value="buttonValue.planDate"
-            type="warning"
-            style="margin-right: 10px"
-        >
-          <el-button size="mini" @click="handleQuery('planDate')"
-          >未接单</el-button
-          >
-        </el-badge></el-col
-      >
-      <el-col :span="1.5">
-        <el-badge
-            :value="buttonValue.acceptDate"
-            type="warning"
-            style="margin-right: 10px"
-        >
-          <el-button size="mini" @click="handleQuery('acceptDate')"
-          >未提箱</el-button
-          >
-        </el-badge></el-col
-      >
-      <el-col :span="1.5"
-      ><el-badge
-          :value="buttonValue.loadDate"
-          type="warning"
-          style="margin-right: 10px"
-      ><el-button size="mini" @click="handleQuery('loadDate')"
-      >未装卸货</el-button
-      ></el-badge
-      ></el-col
-      >
+<!--      <el-col :span="1.5">-->
+<!--        &lt;!&ndash;        <el-button size="mini" @click="handleQuery(null)">全 部</el-button>&ndash;&gt;-->
+<!--        <el-badge-->
+<!--            :value="buttonValue.quantity"-->
+<!--            type="warning"-->
+<!--            style="margin-right: 10px"-->
+<!--        >-->
+<!--          <el-button size="mini" @click="handleQuery()">全 部</el-button>-->
+<!--        </el-badge>-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-badge-->
+<!--            :value="buttonValue.planDate"-->
+<!--            type="warning"-->
+<!--            style="margin-right: 10px"-->
+<!--        >-->
+<!--          <el-button size="mini" @click="handleQuery('planDate')"-->
+<!--          >未接单</el-button-->
+<!--          >-->
+<!--        </el-badge></el-col-->
+<!--      >-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-badge-->
+<!--            :value="buttonValue.acceptDate"-->
+<!--            type="warning"-->
+<!--            style="margin-right: 10px"-->
+<!--        >-->
+<!--          <el-button size="mini" @click="handleQuery('acceptDate')"-->
+<!--          >未提箱</el-button-->
+<!--          >-->
+<!--        </el-badge></el-col-->
+<!--      >-->
+<!--      <el-col :span="1.5"-->
+<!--      ><el-badge-->
+<!--          :value="buttonValue.loadDate"-->
+<!--          type="warning"-->
+<!--          style="margin-right: 10px"-->
+<!--      ><el-button size="mini" @click="handleQuery('loadDate')"-->
+<!--      >未装卸货</el-button-->
+<!--      ></el-badge-->
+<!--      ></el-col-->
+<!--      >-->
 
-      <el-col :span="1.5"
-      ><el-badge
-          :value="buttonValue.mdLoadDate"
-          type="warning"
-          style="margin-right: 10px"
-      >
-        <el-button size="mini" @click="handleQuery('mdLoadDate')"
-        >未还卸柜</el-button
-        ></el-badge
-      >
-      </el-col>
-      <el-col :span="1.5"
-      ><el-badge
-          :value="buttonValue.unLoadDate"
-          type="warning"
-          style="margin-right: 10px"
-      ><el-button size="mini" @click="handleQuery('unLoadDate')"
-      >未回单</el-button
-      ></el-badge
-      ></el-col
-      >
-      <el-col :span="1.5"
-      ><el-badge type="warning" style="margin-right: 10px"
-      ><el-button size="mini" @click="handleQuery('receiptDate')"
-      >已完成</el-button
-      ></el-badge
-      ></el-col
-      >
+<!--      <el-col :span="1.5"-->
+<!--      ><el-badge-->
+<!--          :value="buttonValue.mdLoadDate"-->
+<!--          type="warning"-->
+<!--          style="margin-right: 10px"-->
+<!--      >-->
+<!--        <el-button size="mini" @click="handleQuery('mdLoadDate')"-->
+<!--        >未还卸柜</el-button-->
+<!--        ></el-badge-->
+<!--      >-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5"-->
+<!--      ><el-badge-->
+<!--          :value="buttonValue.unLoadDate"-->
+<!--          type="warning"-->
+<!--          style="margin-right: 10px"-->
+<!--      ><el-button size="mini" @click="handleQuery('unLoadDate')"-->
+<!--      >未回单</el-button-->
+<!--      ></el-badge-->
+<!--      ></el-col-->
+<!--      >-->
+<!--      <el-col :span="1.5"-->
+<!--      ><el-badge type="warning" style="margin-right: 10px"-->
+<!--      ><el-button size="mini" @click="handleQuery('receiptDate')"-->
+<!--      >已完成</el-button-->
+<!--      ></el-badge-->
+<!--      ></el-col-->
+<!--      >-->
       <div class="tabSetting">
         <div style="margin-right: 20px">
           <el-button
@@ -600,7 +600,66 @@ export default {
       drag: false,
       setRowList: [],
       getRowList: [],
-      tableDate: [
+      tableDate:[
+        {
+          surface: "1",
+          label: "carregNo",
+          name: "车号",
+          checked: 0,
+          width: 100,
+        },{
+          surface: "2",
+          label: "driverName",
+          name: "司机",
+          checked: 0,
+          width: 100,
+        },{
+          surface: "3",
+          label: "transType",
+          name: "运输方式",
+          checked: 0,
+          width: 100,
+        },{
+          surface: "4",
+          label: "orderNo",
+          name: "运单号",
+          checked: 0,
+          width: 100,
+        },{
+          surface: "5",
+          label: "corpId",
+          name: "托运人",
+          checked: 0,
+          width: 100,
+        },{
+          surface: "6",
+          label: "billType",
+          name: "贸易方式",
+          checked: 0,
+          width: 100,
+        },{
+          surface: "7",
+          label: "loadAddr",
+          name: "提箱场站",
+          checked: 0,
+          width: 100,
+        },{
+          surface: "8",
+          label: "mdLoadAddr",
+          name: "装货地",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "9",
+          label: "unLoadAddr",
+          name: "卸货地",
+          checked: 0,
+          width: 100,
+        },
+
+      ],
+      tableDateList: [
         {
           surface: "1",
           label: "billKind",
@@ -953,7 +1012,7 @@ export default {
     getRow() {
       let that = this;
       this.data = {
-        tableName: "状态跟踪",
+        tableName: "费用修改",
         userId: Cookies.get("userName"),
       };
       select(this.data).then((res) => {
@@ -976,7 +1035,7 @@ export default {
     },
     delRow() {
       this.data = {
-        tableName: "状态跟踪",
+        tableName: "费用修改",
         userId: Cookies.get("userName"),
       };
       resetModule(this.data).then((res) => {
@@ -991,7 +1050,7 @@ export default {
     save() {
       this.showSetting = false;
       this.data = {
-        tableName: "状态跟踪",
+        tableName: "费用修改",
         userId: Cookies.get("userName"),
         sysTableSetList: this.setRowList,
       };

+ 310 - 238
src/views/warehouseBusiness/warehouseCheck/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="app-container">
+  <div class="app-container" v-if="!open">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="仓库名称" prop="fWarehouseid">
         <el-select
@@ -54,7 +54,6 @@
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
-
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
@@ -85,18 +84,17 @@
         >删除
         </el-button>
       </el-col>
-      <el-col :span="1.5">
-        <el-button
-            type="warning"
-            icon="el-icon-download"
-            size="mini"
-            @click="handleExport"
-        >导出
-        </el-button>
-      </el-col>
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--            type="warning"-->
+<!--            icon="el-icon-download"-->
+<!--            size="mini"-->
+<!--            @click="handleExport"-->
+<!--        >导出-->
+<!--        </el-button>-->
+<!--      </el-col>-->
       <right-toolbar :showSearch.sync="showSearch" @queryTable="resetQuery"></right-toolbar>
     </el-row>
-
     <el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="序号" type="index" width="50" fixed align="center"/>
@@ -118,7 +116,7 @@
           <span>{{ parseTime(scope.row.fCreateTime, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="更新人" align="center" prop="fUpdateBy"/>
+      <el-table-column label="更新人" align="center" prop="fUpdateByName"/>
       <el-table-column label="最新时间" align="center" prop="fUpdateTime" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.fUpdateTime, '{y}-{m}-{d}') }}</span>
@@ -126,8 +124,8 @@
       </el-table-column>
       <el-table-column label="系统编号" align="center" prop="fSystemNo"/>
       <el-table-column label="备注" align="center" prop="fRemark"/>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template slot-scope="scope"  style="width: 100px;">
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160">
+        <template slot-scope="scope">
           <el-button
               size="mini"
               type="text"
@@ -145,7 +143,6 @@
         </template>
       </el-table-column>
     </el-table>
-
     <pagination
         v-show="total>0"
         :total="total"
@@ -153,206 +150,222 @@
         :limit.sync="queryParams.pageSize"
         @pagination="getList"
     />
-
+  </div>
+  <div class="app-container" v-else>
     <!-- 添加或修改入出库状态对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="80%" append-to-body :close-on-press-escape="false" :close-on-click-modal="false">
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px"
-               style="display:flex;flex-wrap: wrap;justify-content: space-between">
-        <el-form-item label="仓库名称" prop="fWarehouseFid">
-          <el-select
-              v-model="form.fWarehouseFid"
-              filterable
-              placeholder="请选择仓库名称"
-          >
-            <el-option
-                v-for="(item, index) in warehouseOptions"
-                :key="index.fId"
-                :label="item.fName"
-                :value="item.fId"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="巡检日期起" prop="fInspectorBeginDatetime">
-          <el-date-picker
-              style="width: 100%;"
-              v-model="form.fInspectorBeginDatetime"
-              value-format="yyyy-MM-dd HH:mm:ss"
-              type="datetime"
-              placeholder="选择日期时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="巡检日期止" prop="fInspectorEndDatetime">
-          <el-date-picker
-              style="width: 100%;"
-              v-model="form.fInspectorEndDatetime"
-              value-format="yyyy-MM-dd HH:mm:ss"
-              type="datetime"
-              placeholder="选择日期时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="巡检人" prop="fInspectorId">
-          <el-select
-              v-model="form.fInspectorId"
-              filterable
-              placeholder="请选择巡检人"
-          >
-            <el-option
-                v-for="(item, index) in patrolInspection"
-                :key="index.userId"
-                :label="item.userName"
-                :value="item.userId"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="备注" prop="fRemark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" autosize/>
-        </el-form-item>
-      </el-form>
-      <div style="width: 100%;margin: 10px auto">
-        <el-button type="primary" size="mini" @click="inputDetails">录入明细</el-button>
-      </div>
-      <div style="width: 100%;">
-        <el-table
-            :data="form.tWarehouseCheckItemsList"
-            style="width: 100%">
-          <el-table-column label="序号" type="index" width="50" fixed align="center"/>
-          <el-table-column label="仓库名称" align="center" prop="fWarehouseFid">
-            <template slot-scope="scope">
-              <el-select
-                  v-model="scope.row.fWarehouseFid"
-                  filterable
-                  placeholder="请选择仓库名称"
-              >
-                <el-option
-                    v-for="(item, index) in warehouseOptions"
-                    :key="index.fId"
-                    :label="item.fName"
-                    :value="item.fId"
-                ></el-option>
-              </el-select>
-            </template>
-          </el-table-column>
-          <el-table-column label="巡检人" align="center" prop="fInspectorId">
-            <template slot-scope="scope">
-              <el-select
-                  v-model="scope.row.fInspectorId"
-                  filterable
-                  placeholder="请选择巡检人"
-              >
-                <el-option
-                    v-for="(item, index) in patrolInspection"
-                    :key="index.userId"
-                    :label="item.userName"
-                    :value="item.userId"
-                ></el-option>
-              </el-select>
-            </template>
-          </el-table-column>
-          <el-table-column label="计划日期" align="center" prop="fInspectionDatetime">
-            <template slot-scope="scope">
-              <el-date-picker
-                  style="width: 100%;"
-                  v-model="scope.row.fInspectionDatetime"
-                  value-format="yyyy-MM-dd HH:mm:ss"
-                  type="datetime"
-                  placeholder="选择日期时间">
-              </el-date-picker>
-            </template>
-          </el-table-column>
-          <el-table-column label="最新巡检日期" align="center" prop="fUpdateTime">
-            <template slot-scope="scope">
-              <el-date-picker
-                  style="width: 100%;"
-                  v-model="scope.row.fUpdateTime"
-                  value-format="yyyy-MM-dd HH:mm:ss"
-                  type="datetime"
-                  placeholder="选择日期时间">
-              </el-date-picker>
-            </template>
-          </el-table-column>
-          <el-table-column label="最新巡检人" align="center" prop="fUpdateBy">
-            <template slot-scope="scope">
-              <el-select
-                  disabled
-                  v-model="scope.row.fUpdateBy"
-                  filterable
-                  placeholder="最新巡检人"
-              >
-                <el-option
-                    v-for="(item, index) in patrolInspection"
-                    :key="index.userId"
-                    :label="item.userName"
-                    :value="item.userId"
-                ></el-option>
-              </el-select>
-            </template>
-          </el-table-column>
-          <el-table-column label="巡检记录" align="center">
-            <template slot-scope="scope"  style="width: 100px;">
-              <el-button
-                  size="mini"
-                  type="text"
-                  :disabled="!scope.row.fId"
-                  @click="pictureList(scope)"
-                  icon="el-icon-document"
-              >详情
-              </el-button>
-            </template>
-          </el-table-column>
-          <!--          <el-table-column label="录入人" align="center" prop="createBy">-->
-          <!--            <template slot-scope="scope">-->
-          <!--              <el-input v-model="scope.row.createBy" placeholder="请输入内容"></el-input>-->
-          <!--            </template>-->
-          <!--          </el-table-column>-->
-          <!--          <el-table-column label="录入日期" align="center" prop="createTime">-->
-          <!--            <template slot-scope="scope">-->
-          <!--              <el-date-picker-->
-          <!--                  style="width: 100%;"-->
-          <!--                  v-model="scope.row.createTime"-->
-          <!--                  value-format="yyyy-MM-dd"-->
-          <!--                  type="date"-->
-          <!--                  placeholder="选择日期">-->
-          <!--              </el-date-picker>-->
-          <!--            </template>-->
-          <!--          </el-table-column>-->
-          <!--          <el-table-column label="更新人" align="center" prop="updateBy">-->
-          <!--            <template slot-scope="scope">-->
-          <!--              <el-input v-model="scope.row.updateBy" placeholder="请输入内容"></el-input>-->
-          <!--            </template>-->
-          <!--          </el-table-column>-->
-          <!--          <el-table-column label="更新日期" align="center" prop="updateTime">-->
-          <!--            <template slot-scope="scope">-->
-          <!--              <el-date-picker-->
-          <!--                  style="width: 100%;"-->
-          <!--                  v-model="scope.row.updateTime"-->
-          <!--                  value-format="yyyy-MM-dd"-->
-          <!--                  type="date"-->
-          <!--                  placeholder="选择日期">-->
-          <!--              </el-date-picker>-->
-          <!--            </template>-->
-          <!--          </el-table-column>-->
-          <el-table-column label="备注" align="center" prop="fRemark">
-            <template slot-scope="scope">
-              <el-input v-model="scope.row.fRemark" placeholder="请输入备注"></el-input>
-            </template>
-          </el-table-column>
-          <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-            <template slot-scope="scope"  style="width: 100px;">
-              <el-button
-                  size="mini"
-                  type="text"
-                  icon="el-icon-delete"
-              >移出
-              </el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">保 存</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
+    <el-button type="danger" size="mini" @click="cancel">返回列表</el-button>
+    <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="仓库名称" prop="fWarehouseFid">
+            <el-select
+                v-model="form.fWarehouseFid"
+                filterable
+                style="width: 260px;"
+                placeholder="请选择仓库名称"
+            >
+              <el-option
+                  v-for="(item, index) in warehouseOptions"
+                  :key="index.fId"
+                  :label="item.fName"
+                  :value="item.fId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="巡检日期起" prop="fInspectorBeginDatetime">
+            <el-date-picker
+                style="width: 260px;"
+                v-model="form.fInspectorBeginDatetime"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                type="datetime"
+                placeholder="选择日期时间">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="巡检日期止" prop="fInspectorEndDatetime">
+            <el-date-picker
+                style="width: 260px;"
+                v-model="form.fInspectorEndDatetime"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                type="datetime"
+                placeholder="选择日期时间">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="巡检人" prop="fInspectorId">
+            <el-select
+                v-model="form.fInspectorId"
+                filterable
+                style="width: 260px;"
+                placeholder="请选择巡检人"
+            >
+              <el-option
+                  v-for="(item, index) in patrolInspection"
+                  :key="index.userId"
+                  :label="item.userName"
+                  :value="item.userId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="备注" prop="fRemark">
+            <el-input v-model="form.remark" type="textarea" style="width: 260px;" placeholder="请输入内容" autosize/>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+    <div style="width: 100%;margin: 10px auto">
+      <el-button type="primary" size="mini" @click="inputDetails">录入明细</el-button>
+      <el-button type="success" size="mini" @click="submitForm">保 存</el-button>
+    </div>
+    <div style="width: 100%;">
+      <el-table
+          :data="form.tWarehouseCheckItemsList"
+          style="width: 100%">
+        <el-table-column label="序号" type="index" width="50" fixed align="center"/>
+        <el-table-column label="仓库名称" align="center" prop="fWarehouseFid">
+          <template slot-scope="scope">
+            <el-select
+                v-model="scope.row.fWarehouseFid"
+                filterable
+                placeholder="请选择仓库名称"
+            >
+              <el-option
+                  v-for="(item, index) in warehouseOptions"
+                  :key="index.fId"
+                  :label="item.fName"
+                  :value="item.fId"
+              ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column label="巡检人" align="center" prop="fInspectorId">
+          <template slot-scope="scope">
+            <el-select
+                v-model="scope.row.fInspectorId"
+                filterable
+                placeholder="请选择巡检人"
+            >
+              <el-option
+                  v-for="(item, index) in patrolInspection"
+                  :key="index.userId"
+                  :label="item.userName"
+                  :value="item.userId"
+              ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column label="计划日期" align="center" prop="fInspectionDatetime">
+          <template slot-scope="scope">
+            <el-date-picker
+                style="width: 100%;"
+                v-model="scope.row.fInspectionDatetime"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                type="datetime"
+                placeholder="选择日期时间">
+            </el-date-picker>
+          </template>
+        </el-table-column>
+        <el-table-column label="最新巡检日期" align="center" prop="fUpdateTime">
+          <template slot-scope="scope">
+            <el-date-picker
+                style="width: 100%;"
+                disabled
+                v-model="scope.row.fUpdateTime"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                type="datetime"
+                placeholder="选择日期时间">
+            </el-date-picker>
+          </template>
+        </el-table-column>
+        <el-table-column label="最新巡检人" align="center" prop="fUpdateBy">
+          <template slot-scope="scope">
+            <el-select
+                disabled
+                v-model="scope.row.fUpdateBy"
+                filterable
+                placeholder="最新巡检人"
+            >
+              <el-option
+                  v-for="(item, index) in patrolInspection"
+                  :key="index.userId"
+                  :label="item.userName"
+                  :value="item.userId"
+              ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column label="巡检记录" align="center">
+          <template slot-scope="scope"  style="width: 100px;">
+            <el-button
+                size="mini"
+                type="text"
+                :disabled="!scope.row.fId"
+                @click="pictureList(scope)"
+                icon="el-icon-document"
+            >详情
+            </el-button>
+          </template>
+        </el-table-column>
+        <!--          <el-table-column label="录入人" align="center" prop="createBy">-->
+        <!--            <template slot-scope="scope">-->
+        <!--              <el-input v-model="scope.row.createBy" placeholder="请输入内容"></el-input>-->
+        <!--            </template>-->
+        <!--          </el-table-column>-->
+        <!--          <el-table-column label="录入日期" align="center" prop="createTime">-->
+        <!--            <template slot-scope="scope">-->
+        <!--              <el-date-picker-->
+        <!--                  style="width: 100%;"-->
+        <!--                  v-model="scope.row.createTime"-->
+        <!--                  value-format="yyyy-MM-dd"-->
+        <!--                  type="date"-->
+        <!--                  placeholder="选择日期">-->
+        <!--              </el-date-picker>-->
+        <!--            </template>-->
+        <!--          </el-table-column>-->
+        <!--          <el-table-column label="更新人" align="center" prop="updateBy">-->
+        <!--            <template slot-scope="scope">-->
+        <!--              <el-input v-model="scope.row.updateBy" placeholder="请输入内容"></el-input>-->
+        <!--            </template>-->
+        <!--          </el-table-column>-->
+        <!--          <el-table-column label="更新日期" align="center" prop="updateTime">-->
+        <!--            <template slot-scope="scope">-->
+        <!--              <el-date-picker-->
+        <!--                  style="width: 100%;"-->
+        <!--                  v-model="scope.row.updateTime"-->
+        <!--                  value-format="yyyy-MM-dd"-->
+        <!--                  type="date"-->
+        <!--                  placeholder="选择日期">-->
+        <!--              </el-date-picker>-->
+        <!--            </template>-->
+        <!--          </el-table-column>-->
+        <el-table-column label="备注" align="center" prop="fRemark">
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.fRemark" placeholder="请输入备注"></el-input>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope"  style="width: 100px;">
+            <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="singleItemDeletion(scope.$index,scope)"
+            >删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <div slot="footer" class="dialog-footer">
+    </div>
     <el-dialog
         title="图片明细"
         :visible.sync="opentwo"
@@ -364,6 +377,7 @@
           <el-select
               v-model="twarehousecheckdetailList.fWarehouseid"
               filterable
+              disabled
               placeholder="请选择仓库名称"
               style="width: 200px;"
           >
@@ -378,13 +392,12 @@
         <el-form-item label="巡检日期" prop="fCreateTime">
           <el-date-picker
               style="width: 200px;"
+              disabled
               v-model="twarehousecheckdetailList.fCreateTime"
               type="date"
               value-format="yyyy-MM-dd"
               placeholder="选择日期">
           </el-date-picker>
-
-
         </el-form-item>
         <el-form-item label="巡检人" prop="fInspectorid">
           <el-select
@@ -405,31 +418,33 @@
           <el-input style="width: 200px;" v-model="twarehousecheckdetailList.fRemark" type="textarea" placeholder="请输入内容" autosize/>
         </el-form-item>
       </el-form>
-      <div style="background-color: #1c84c6">
+      <div style="margin-top: 20px;border: 1px solid #cccccc;padding: 5px;border-radius: 10px">
         <el-upload
             :headers="headers"
             :action="uploadImgUrl"
             :on-success="onSuccess"
             list-type="picture-card"
             :file-list="fileList"
+            accept=".jpeg,.jpg,.png,.svg,.webp"
+            :limit="100"
             :on-preview="handlePictureCardPreview"
             :on-remove="handleRemove">
           <i class="el-icon-plus"></i>
         </el-upload>
-        <el-dialog :visible.sync="dVisible">
+        <el-dialog :visible.sync="dVisible" append-to-body>
           <img width="100%" :src="dialogImageUrl" alt="">
         </el-dialog>
       </div>
       <span slot="footer" class="dialog-footer">
-    <el-button @click="opentwo = false">取 消</el-button>
-    <el-button type="primary" @click="preservationtwo">保 存2</el-button>
+    <el-button @click="closePicture">取 消</el-button>
+    <el-button type="primary" @click="preservationtwo">保 存</el-button>
   </span>
     </el-dialog>
   </div>
 </template>
 
 <script>
-import {listCorps,delLog,information,newlyAdded,savePicture,selectUserByRole,addOrModifyPictureList,currentLogin} from '@/api/warehouseCheck/index'
+import {listCorps,deleteMasterTable,delLog,information,secondDelete,newlyAdded,savePicture,selectUserByRole,addOrModifyPictureList,currentLogin} from '@/api/warehouseCheck/index'
 import {listWarehousesss} from "@/api/basicdata/warehouse";
 import {getToken} from "@/utils/auth";
 
@@ -445,7 +460,8 @@ export default {
       uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
       warehouseOptions: [],
       fPlanneddate: [],
-      fileList:[],
+      fileList:[
+      ],
       dialogImageUrl: '',
       dVisible:false,
       // 遮罩层
@@ -513,10 +529,12 @@ export default {
     },
     //录入新行
     inputDetails(){
+      if (this.form.tWarehouseCheckItemsList === null) this.form.tWarehouseCheckItemsList = []
       this.form.tWarehouseCheckItemsList.push({
         fWarehousename:'',
+        fWarehouseFid:this.form.fWarehouseFid,
         fLatestinspectorid:'',
-        fInspectorid:'',
+        fInspectorId:this.form.fInspectorId,
         fPlanneddate:'',
         fLatestinspectdate:'',
         fInspectionrecord:'',
@@ -527,22 +545,60 @@ export default {
         remark:'',
       })
     },
+    //关闭新增图片弹窗
+    closePicture(){
+      this.opentwo = false
+      this.fileList = []
+    },
+    //图片保存
     preservationtwo(){
+      // console.log(this.pictureEist)
+      this.twarehousecheckdetailList.fPhotoUrl = []
       for (let item in this.pictureEist){
-        this.twarehousecheckdetailList.fPhotoUrl[item] = this.pictureEist[item].response.url
+        if (this.pictureEist[item].response){
+          this.twarehousecheckdetailList.fPhotoUrl.push({
+            url:this.pictureEist[item].response.url
+          })
+        }else {
+          this.twarehousecheckdetailList.fPhotoUrl.push({
+            url:this.pictureEist[item].url
+          })
+        }
       }
       this.twarehousecheckdetailList.fPhotoUrl = JSON.stringify(this.twarehousecheckdetailList.fPhotoUrl)
-      addOrModifyPictureList(this.twarehousecheckdetailList).then(res=>{
-        console.log(res)
-      })
+      if (!this.twarehousecheckdetailList.fId){
+        addOrModifyPictureList(this.twarehousecheckdetailList,'post').then(res=>{
+          console.log(res)
+        })
+      }else {
+        addOrModifyPictureList(this.twarehousecheckdetailList,'put').then(res=>{
+          console.log(res)
+        })
+      }
     },
     pictureList(scope){
-      savePicture(scope.row.fId).then(res=>{
-        console.log(res)
-        if (!res.data){
-          this.twarehousecheckdetailList.fCheckFid = scope.row.fCheckFid
-          this.twarehousecheckdetailList.fItemFid = scope.row.fId
-          this.twarehousecheckdetailList.fPhotoUrl = []
+      let data = {
+        fItemFid:scope.row.fId
+      }
+      savePicture(data).then(res=>{
+        let data = res.rows
+        if (data.length === 0){
+          this.twarehousecheckdetailList = {
+            fCheckFid:scope.row.fCheckFid,
+            fItemFid:scope.row.fId,
+            fWarehouseid:scope.row.fWarehouseFid, //仓库名称
+            fCreateTime:'',
+            fInspectorid:'',
+            fRemark:'',
+            fPhotoUrl:[]
+          }
+        }else {
+          this.twarehousecheckdetailList = res.rows[0]
+          this.twarehousecheckdetailList.fWarehouseid = scope.row.fWarehouseFid
+          this.fileList = []
+          for (let item in JSON.parse(res.rows[0].fPhotoUrl)){
+            this.fileList.push(JSON.parse(res.rows[0].fPhotoUrl)[item])
+          }
         }
       })
       this.opentwo = true
@@ -552,11 +608,25 @@ export default {
       information(row.fId).then(res =>{
         this.open = true
         if (res.data.twarehousecheckitemsVOList === null) res.data.twarehousecheckitemsVOList = []
-        this.formList = res.data.twarehousecheckitemsVOList
-        delete res.data.twarehousecheckitemsVOList
         this.form = res.data
       })
     },
+    //明细删除第二弹窗
+    singleItemDeletion(index,scope){
+      let this_ = this
+      if (scope.row.fId){
+        secondDelete(scope.row.fId).then(res=>{
+          this_.$message({
+            showClose: true,
+            message: '删除成功',
+            type: 'success'
+          });
+          this_.viewDetails(this_.form)
+        })
+      }else {
+        this_.form.tWarehouseCheckItemsList.splice(index, 1);
+      }
+    },
     //拆分计划日期
     planDateMethod() {
       if (this.fPlanneddate) {
@@ -577,6 +647,7 @@ export default {
     // 取消按钮
     cancel() {
       this.open = false;
+      this.getList();
       this.reset();
     },
     // 表单重置
@@ -633,8 +704,9 @@ export default {
         if (valid) {
           newlyAdded(this.form).then(response => {
             this.msgSuccess("新增成功");
+            this.viewDetails({fId:response.data})
             // this.open = false;
-            this.getList();
+            // this.getList();
           });
         }
       });
@@ -647,7 +719,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(function () {
-        return delLog(fIds);
+        return deleteMasterTable(fIds);
       }).then(() => {
         this.getList();
         this.msgSuccess("删除成功");