|
@@ -84,19 +84,20 @@
|
|
>删除
|
|
>删除
|
|
</el-button>
|
|
</el-button>
|
|
</el-col>
|
|
</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>
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="resetQuery"></right-toolbar>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange" ref="table" :height="tableHeight">
|
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
|
+ <el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange" ref="table"
|
|
|
|
+ :height="tableHeight">
|
|
|
|
+ <el-table-column type="selection" width="55" align="center"/>
|
|
<el-table-column label="序号" type="index" width="50" fixed align="center"/>
|
|
<el-table-column label="序号" type="index" width="50" fixed align="center"/>
|
|
<el-table-column label="仓库名称" align="center" prop="fWarehouseName"/>
|
|
<el-table-column label="仓库名称" align="center" prop="fWarehouseName"/>
|
|
<el-table-column label="巡检人" align="center" prop="fInspectorName"/>
|
|
<el-table-column label="巡检人" align="center" prop="fInspectorName"/>
|
|
@@ -303,7 +304,7 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="巡检记录" align="center">
|
|
<el-table-column label="巡检记录" align="center">
|
|
- <template slot-scope="scope" style="width: 100px;">
|
|
|
|
|
|
+ <template slot-scope="scope" style="width: 100px;">
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
@@ -352,7 +353,7 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
- <template slot-scope="scope" style="width: 100px;">
|
|
|
|
|
|
+ <template slot-scope="scope" style="width: 100px;">
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
@@ -415,7 +416,8 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="备注" prop="fRemark">
|
|
<el-form-item label="备注" prop="fRemark">
|
|
- <el-input style="width: 200px;" v-model="twarehousecheckdetailList.fRemark" type="textarea" placeholder="请输入内容" autosize/>
|
|
|
|
|
|
+ <el-input style="width: 200px;" v-model="twarehousecheckdetailList.fRemark" type="textarea"
|
|
|
|
+ placeholder="请输入内容" autosize/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div style="margin-top: 20px;border: 1px solid #cccccc;padding: 5px;border-radius: 10px">
|
|
<div style="margin-top: 20px;border: 1px solid #cccccc;padding: 5px;border-radius: 10px">
|
|
@@ -444,7 +446,18 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import {listCorps,deleteMasterTable,delLog,information,secondDelete,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 {listWarehousesss} from "@/api/basicdata/warehouse";
|
|
import {getToken} from "@/utils/auth";
|
|
import {getToken} from "@/utils/auth";
|
|
|
|
|
|
@@ -457,14 +470,13 @@ export default {
|
|
headers: {
|
|
headers: {
|
|
Authorization: "Bearer " + getToken(),
|
|
Authorization: "Bearer " + getToken(),
|
|
},
|
|
},
|
|
- patrolInspection:[],
|
|
|
|
|
|
+ patrolInspection: [],
|
|
uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
|
|
uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
|
|
warehouseOptions: [],
|
|
warehouseOptions: [],
|
|
fPlanneddate: [],
|
|
fPlanneddate: [],
|
|
- fileList:[
|
|
|
|
- ],
|
|
|
|
|
|
+ fileList: [],
|
|
dialogImageUrl: '',
|
|
dialogImageUrl: '',
|
|
- dVisible:false,
|
|
|
|
|
|
+ dVisible: false,
|
|
// 遮罩层
|
|
// 遮罩层
|
|
loading: true,
|
|
loading: true,
|
|
// 选中数组
|
|
// 选中数组
|
|
@@ -475,12 +487,11 @@ export default {
|
|
multiple: true,
|
|
multiple: true,
|
|
// 显示搜索条件
|
|
// 显示搜索条件
|
|
showSearch: true,
|
|
showSearch: true,
|
|
- pictureEist:[],
|
|
|
|
|
|
+ pictureEist: [],
|
|
// 总条数
|
|
// 总条数
|
|
total: 0,
|
|
total: 0,
|
|
// 入出库状态表格数据
|
|
// 入出库状态表格数据
|
|
- logList: [
|
|
|
|
- ],
|
|
|
|
|
|
+ logList: [],
|
|
// 弹出层标题
|
|
// 弹出层标题
|
|
title: "",
|
|
title: "",
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
@@ -492,13 +503,12 @@ export default {
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
},
|
|
},
|
|
// 表单参数
|
|
// 表单参数
|
|
- form: {
|
|
|
|
- },
|
|
|
|
- formList:[],
|
|
|
|
|
|
+ form: {},
|
|
|
|
+ formList: [],
|
|
// 表单校验
|
|
// 表单校验
|
|
rules: {},
|
|
rules: {},
|
|
- twarehousecheckdetailList:{},
|
|
|
|
- picturefId:''
|
|
|
|
|
|
+ twarehousecheckdetailList: {},
|
|
|
|
+ picturefId: ''
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -508,7 +518,7 @@ export default {
|
|
let currentMonth = date.getMonth()
|
|
let currentMonth = date.getMonth()
|
|
let nextMonth = ++currentMonth
|
|
let nextMonth = ++currentMonth
|
|
let nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1) // 下个月的第一天
|
|
let nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1) // 下个月的第一天
|
|
- let oneDay = 1000*60*60*24
|
|
|
|
|
|
+ let oneDay = 1000 * 60 * 60 * 24
|
|
let lastTime = new Date(nextMonthFirstDay - oneDay) // 下个月的第一天减去一天,就是上个月的最后一天
|
|
let lastTime = new Date(nextMonthFirstDay - oneDay) // 下个月的第一天减去一天,就是上个月的最后一天
|
|
let day = lastTime.getDate()
|
|
let day = lastTime.getDate()
|
|
if (day < 10) {
|
|
if (day < 10) {
|
|
@@ -516,7 +526,7 @@ export default {
|
|
}
|
|
}
|
|
this.fPlanneddate = [year + '-' + month + '-' + '01 00:00:00', year + '-' + month + '-' + day + ' 23:59:59']
|
|
this.fPlanneddate = [year + '-' + month + '-' + '01 00:00:00', year + '-' + month + '-' + day + ' 23:59:59']
|
|
|
|
|
|
- currentLogin().then(res=>{
|
|
|
|
|
|
+ currentLogin().then(res => {
|
|
console.log(res)
|
|
console.log(res)
|
|
})
|
|
})
|
|
selectUserByRole().then(res => {
|
|
selectUserByRole().then(res => {
|
|
@@ -545,7 +555,7 @@ export default {
|
|
let currentMonth = date.getMonth()
|
|
let currentMonth = date.getMonth()
|
|
let nextMonth = ++currentMonth
|
|
let nextMonth = ++currentMonth
|
|
let nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1) // 下个月的第一天
|
|
let nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1) // 下个月的第一天
|
|
- let oneDay = 1000*60*60*24
|
|
|
|
|
|
+ let oneDay = 1000 * 60 * 60 * 24
|
|
let lastTime = new Date(nextMonthFirstDay - oneDay) // 下个月的第一天减去一天,就是上个月的最后一天
|
|
let lastTime = new Date(nextMonthFirstDay - oneDay) // 下个月的第一天减去一天,就是上个月的最后一天
|
|
let day = lastTime.getDate()
|
|
let day = lastTime.getDate()
|
|
if (day < 10) {
|
|
if (day < 10) {
|
|
@@ -553,7 +563,7 @@ export default {
|
|
}
|
|
}
|
|
this.queryParams.timeInterval = [year + '-' + month + '-' + '01 00:00:00', year + '-' + month + '-' + day + ' 23:59:59']
|
|
this.queryParams.timeInterval = [year + '-' + month + '-' + '01 00:00:00', year + '-' + month + '-' + day + ' 23:59:59']
|
|
},
|
|
},
|
|
- onSuccess(response, file, fileList){
|
|
|
|
|
|
+ onSuccess(response, file, fileList) {
|
|
console.log(fileList)
|
|
console.log(fileList)
|
|
this.pictureEist = fileList
|
|
this.pictureEist = fileList
|
|
},
|
|
},
|
|
@@ -567,94 +577,94 @@ export default {
|
|
this.pictureEist = fileList
|
|
this.pictureEist = fileList
|
|
},
|
|
},
|
|
//录入新行
|
|
//录入新行
|
|
- inputDetails(){
|
|
|
|
|
|
+ inputDetails() {
|
|
if (this.form.tWarehouseCheckItemsList === null) this.form.tWarehouseCheckItemsList = []
|
|
if (this.form.tWarehouseCheckItemsList === null) this.form.tWarehouseCheckItemsList = []
|
|
this.form.tWarehouseCheckItemsList.push({
|
|
this.form.tWarehouseCheckItemsList.push({
|
|
- fWarehousename:'',
|
|
|
|
- fWarehouseFid:this.form.fWarehouseFid,
|
|
|
|
- fLatestinspectorid:'',
|
|
|
|
- fInspectorId:this.form.fInspectorId,
|
|
|
|
- fPlanneddate:'',
|
|
|
|
- fLatestinspectdate:'',
|
|
|
|
- fInspectionrecord:'',
|
|
|
|
- updateTime:'',
|
|
|
|
- createBy:'',
|
|
|
|
- createTime:'',
|
|
|
|
- updateBy:'',
|
|
|
|
- remark:'',
|
|
|
|
|
|
+ fWarehousename: '',
|
|
|
|
+ fWarehouseFid: this.form.fWarehouseFid,
|
|
|
|
+ fLatestinspectorid: '',
|
|
|
|
+ fInspectorId: this.form.fInspectorId,
|
|
|
|
+ fPlanneddate: '',
|
|
|
|
+ fLatestinspectdate: '',
|
|
|
|
+ fInspectionrecord: '',
|
|
|
|
+ updateTime: '',
|
|
|
|
+ createBy: '',
|
|
|
|
+ createTime: '',
|
|
|
|
+ updateBy: '',
|
|
|
|
+ remark: '',
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//关闭新增图片弹窗
|
|
//关闭新增图片弹窗
|
|
- closePicture(){
|
|
|
|
|
|
+ closePicture() {
|
|
this.opentwo = false
|
|
this.opentwo = false
|
|
this.fileList = []
|
|
this.fileList = []
|
|
},
|
|
},
|
|
//图片保存
|
|
//图片保存
|
|
- preservationtwo(){
|
|
|
|
- // console.log(this.pictureEist)
|
|
|
|
|
|
+ preservationtwo() {
|
|
this.twarehousecheckdetailList.fPhotoUrl = []
|
|
this.twarehousecheckdetailList.fPhotoUrl = []
|
|
- for (let item in this.pictureEist){
|
|
|
|
- if (this.pictureEist[item].response){
|
|
|
|
|
|
+ for (let item in this.pictureEist) {
|
|
|
|
+ if (this.pictureEist[item].response) {
|
|
this.twarehousecheckdetailList.fPhotoUrl.push({
|
|
this.twarehousecheckdetailList.fPhotoUrl.push({
|
|
- url:this.pictureEist[item].response.url
|
|
|
|
|
|
+ url: this.pictureEist[item].response.url
|
|
})
|
|
})
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
this.twarehousecheckdetailList.fPhotoUrl.push({
|
|
this.twarehousecheckdetailList.fPhotoUrl.push({
|
|
- url:this.pictureEist[item].url
|
|
|
|
|
|
+ url: this.pictureEist[item].url
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.twarehousecheckdetailList.fPhotoUrl = JSON.stringify(this.twarehousecheckdetailList.fPhotoUrl)
|
|
this.twarehousecheckdetailList.fPhotoUrl = JSON.stringify(this.twarehousecheckdetailList.fPhotoUrl)
|
|
- if (!this.twarehousecheckdetailList.fId){
|
|
|
|
- addOrModifyPictureList(this.twarehousecheckdetailList,'post').then(res=>{
|
|
|
|
|
|
+ if (!this.twarehousecheckdetailList.fId) {
|
|
|
|
+ addOrModifyPictureList(this.twarehousecheckdetailList, 'post').then(res => {
|
|
console.log(res)
|
|
console.log(res)
|
|
})
|
|
})
|
|
- }else {
|
|
|
|
- addOrModifyPictureList(this.twarehousecheckdetailList,'put').then(res=>{
|
|
|
|
|
|
+ } else {
|
|
|
|
+ addOrModifyPictureList(this.twarehousecheckdetailList, 'put').then(res => {
|
|
console.log(res)
|
|
console.log(res)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- pictureList(scope){
|
|
|
|
|
|
+ pictureList(scope) {
|
|
let data = {
|
|
let data = {
|
|
- fItemFid:scope.row.fId
|
|
|
|
|
|
+ fItemFid: scope.row.fId
|
|
}
|
|
}
|
|
- savePicture(data).then(res=>{
|
|
|
|
|
|
+ savePicture(data).then(res => {
|
|
let data = res.rows
|
|
let data = res.rows
|
|
- if (data.length === 0){
|
|
|
|
|
|
+ if (data.length === 0) {
|
|
this.twarehousecheckdetailList = {
|
|
this.twarehousecheckdetailList = {
|
|
- fCheckFid:scope.row.fCheckFid,
|
|
|
|
- fItemFid:scope.row.fId,
|
|
|
|
- fWarehouseid:scope.row.fWarehouseFid, //仓库名称
|
|
|
|
- fCreateTime:'',
|
|
|
|
- fInspectorid:'',
|
|
|
|
- fRemark:'',
|
|
|
|
- fPhotoUrl:[]
|
|
|
|
|
|
+ fCheckFid: scope.row.fCheckFid,
|
|
|
|
+ fItemFid: scope.row.fId,
|
|
|
|
+ fWarehouseid: scope.row.fWarehouseFid, //仓库名称
|
|
|
|
+ fCreateTime: '',
|
|
|
|
+ fInspectorid: '',
|
|
|
|
+ fRemark: '',
|
|
|
|
+ fPhotoUrl: []
|
|
}
|
|
}
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
this.twarehousecheckdetailList = res.rows[0]
|
|
this.twarehousecheckdetailList = res.rows[0]
|
|
this.twarehousecheckdetailList.fWarehouseid = scope.row.fWarehouseFid
|
|
this.twarehousecheckdetailList.fWarehouseid = scope.row.fWarehouseFid
|
|
this.fileList = []
|
|
this.fileList = []
|
|
- for (let item in JSON.parse(res.rows[0].fPhotoUrl)){
|
|
|
|
|
|
+ for (let item in JSON.parse(res.rows[0].fPhotoUrl)) {
|
|
this.fileList.push(JSON.parse(res.rows[0].fPhotoUrl)[item])
|
|
this.fileList.push(JSON.parse(res.rows[0].fPhotoUrl)[item])
|
|
}
|
|
}
|
|
|
|
+ this.pictureEist = this.fileList
|
|
}
|
|
}
|
|
})
|
|
})
|
|
this.opentwo = true
|
|
this.opentwo = true
|
|
},
|
|
},
|
|
//查看明细
|
|
//查看明细
|
|
- viewDetails(row){
|
|
|
|
- information(row.fId).then(res =>{
|
|
|
|
|
|
+ viewDetails(row) {
|
|
|
|
+ information(row.fId).then(res => {
|
|
this.open = true
|
|
this.open = true
|
|
if (res.data.twarehousecheckitemsVOList === null) res.data.twarehousecheckitemsVOList = []
|
|
if (res.data.twarehousecheckitemsVOList === null) res.data.twarehousecheckitemsVOList = []
|
|
this.form = res.data
|
|
this.form = res.data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//明细删除第二弹窗
|
|
//明细删除第二弹窗
|
|
- singleItemDeletion(index,scope){
|
|
|
|
|
|
+ singleItemDeletion(index, scope) {
|
|
let this_ = this
|
|
let this_ = this
|
|
- if (scope.row.fId){
|
|
|
|
- secondDelete(scope.row.fId).then(res=>{
|
|
|
|
|
|
+ if (scope.row.fId) {
|
|
|
|
+ secondDelete(scope.row.fId).then(res => {
|
|
this_.$message({
|
|
this_.$message({
|
|
showClose: true,
|
|
showClose: true,
|
|
message: '删除成功',
|
|
message: '删除成功',
|
|
@@ -662,7 +672,7 @@ export default {
|
|
});
|
|
});
|
|
this_.viewDetails(this_.form)
|
|
this_.viewDetails(this_.form)
|
|
})
|
|
})
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
this_.form.tWarehouseCheckItemsList.splice(index, 1);
|
|
this_.form.tWarehouseCheckItemsList.splice(index, 1);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -681,9 +691,10 @@ export default {
|
|
this.loading = false
|
|
this.loading = false
|
|
this.total = res.total
|
|
this.total = res.total
|
|
// 根据浏览器高度设置初始高度
|
|
// 根据浏览器高度设置初始高度
|
|
- setInterval(() => {
|
|
|
|
- this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 70
|
|
|
|
- }, 300)
|
|
|
|
|
|
+ this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 70
|
|
|
|
+ // setInterval(() => {
|
|
|
|
+ // this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 70
|
|
|
|
+ // }, 300)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -747,7 +758,7 @@ export default {
|
|
if (valid) {
|
|
if (valid) {
|
|
newlyAdded(this.form).then(response => {
|
|
newlyAdded(this.form).then(response => {
|
|
this.msgSuccess("新增成功");
|
|
this.msgSuccess("新增成功");
|
|
- this.viewDetails({fId:response.data})
|
|
|
|
|
|
+ this.viewDetails({fId: response.data})
|
|
// this.open = false;
|
|
// this.open = false;
|
|
// this.getList();
|
|
// this.getList();
|
|
});
|
|
});
|