Browse Source

Merge remote-tracking branch 'origin/master'

master
God 2 years ago
parent
commit
1314f65c1c
  1. 9
      anrui-scm/anrui-scm-ui/src/api/shangzhuang/shangzhuang.js
  2. 9
      anrui-scm/anrui-scm-ui/src/views/guache/guachetaizhang/guachetaizhangAdd.vue
  3. 40
      anrui-scm/anrui-scm-ui/src/views/shangzhuang/shangzhuangtaizhangguanli/shangzhuangtaizhangAdd.vue
  4. 134
      anrui-scm/anrui-scm-ui/src/views/shangzhuang/shangzhuangtaizhangguanli/shangzhuangtaizhangguanli.vue

9
anrui-scm/anrui-scm-ui/src/api/shangzhuang/shangzhuang.js

@ -65,7 +65,7 @@ export default {
// 主车车架号(上装台账管理)
selExistingCar: function(data) {
return request({
url: '/base/v1/basevehicle/selExistingCar',
url: '/base/v1/basevehicle/selVehByStockState',
method: 'post',
params: data
})
@ -79,4 +79,11 @@ export default {
headers: { 'Content-Type': 'application/json' }
})
},
// 出库
vehinstallOut: function(data) {
return request({
url: '/base/v1/basevehinstall/vehinstallOut/' + data,
method: 'post'
})
}
}

9
anrui-scm/anrui-scm-ui/src/views/guache/guachetaizhang/guachetaizhangAdd.vue

@ -615,10 +615,12 @@ export default {
this.submitdisabled = true
this.getUrl()
req.save(this.formobj).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.submitdisabled = false
this.handleReturn('true')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
@ -639,14 +641,16 @@ export default {
this.submitdisabled = true
this.getUrl()
req.update(this.formobj, this.formobj.sid).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.submitdisabled = false
this.handleReturn('true')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
@ -717,6 +721,7 @@ export default {
}
this.imgList = []
this.imgList2 = []
this.submitdisabled = false
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}

40
anrui-scm/anrui-scm-ui/src/views/shangzhuang/shangzhuangtaizhangguanli/shangzhuangtaizhangAdd.vue

@ -4,7 +4,7 @@
<div class="tab-header webtop">
<div>入库上装信息</div>
<div>
<el-button type="primary" size="small" @click="handleSave()">保存</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleSave()">保存</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
@ -297,22 +297,29 @@ export default {
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
const tip = '请确认是否保存此次所填信息'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.submitdisabled = true
req.save(this.formobj).then((resp) => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.submitdisabled = false
this.handleReturn('true')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
})
} else {
return false
}
})
},
@ -356,6 +363,7 @@ export default {
moreConfig: ''
}
}
this.submitdisabled = false
this.$refs['form_obj'].resetFields()
this.$emit('doback')
},

134
anrui-scm/anrui-scm-ui/src/views/shangzhuang/shangzhuangtaizhangguanli/shangzhuangtaizhangguanli.vue

@ -61,7 +61,7 @@
<!--Start 项目列表头部-->
<div class="listtop">
<div class="tit">上装库存台账列表</div>
<pageye v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="init"/>
<pageye v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/>
</div>
<!--End 项目列表头部-->
<!--Start 项目列表-->
@ -96,13 +96,13 @@
<div class="pages">
<div class="tit"/>
<!-- 翻页 -->
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="init"/>
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/>
</div>
</div>
</div>
<!--End 查询和其列表部分-->
<!--新增修改部分组件-->
<shangzhuangtaizhangAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="init"/>
<shangzhuangtaizhangAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="loadList"/>
<!--详情部分组件-->
<shangzhangtaizhangInfo v-show="viewState == 4" ref="divinfo" @doback="resetState"/>
</div>
@ -137,6 +137,13 @@ export default {
btnKey: 'toAdd',
btnLabel: '入库'
},
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toLeave',
btnLabel: '出库'
},
{
type: 'danger',
size: 'small',
@ -240,8 +247,8 @@ export default {
case 'toAdd':
this.toAdd()
break
case 'toEdit':
this.toEdit()
case 'toLeave':
this.toLeave()
break
case 'doDel':
this.doDel()
@ -253,6 +260,58 @@ export default {
break
}
},
//
indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart
return pageindex
},
handleSelectionChange(val) {
const aa = []
val.forEach((element) => {
aa.push(element.sid)
})
this.multipleSelection = aa
},
loadList() {
this.tableLoading = true
req.pagelist(this.queryParams).then((resp) => {
this.tableLoading = false
if (resp.success) {
const data = resp.data
this.queryParams.total = data.total
this.dataList = data.records
} else {
this.queryParams.total = 0
this.dataList = []
}
}).catch(() => {
this.tableLoading = false
})
},
dosearch() {
this.queryParams.current = 1
this.loadList()
},
resetQuery() {
this.queryParams = {
current: 1,
size: 5,
total: 0,
params: {
vehicleTypeKey: '',
installNameKey: '',
refitMethodKey: '',
refitFactorySid: '',
colorKey: '',
plateMaterial: '',
createOrgSid: '',
vinNo: '',
noticeModel: ''
}
}
this.init()
},
toAdd() {
this.viewState = 2
this.$refs['divAdd'].showAdd(this.queryParams.params.createOrgSid)
@ -270,11 +329,6 @@ export default {
})
return
}
const _this = this
const sids = []
this.multipleSelection.forEach((row) => {
sids.push(row.sid)
})
const tip = '请确认是否删除所选 ' + this.multipleSelection.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
@ -287,64 +341,32 @@ export default {
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.delete(sids).then((resp) => {
req.delete(this.multipleSelection).then((resp) => {
loading.close()
_this.$message({
this.$message({
type: 'success',
message: resp.msg,
showClose: true
})
_this.init()
this.loadList()
}).catch((e) => {
loading.close()
})
}).catch(() => {
})
},
dosearch() {
this.queryParams.current = 1
this.init()
},
resetQuery() {
this.queryParams = {
current: 1,
size: 5,
total: 0,
params: {
vehicleTypeKey: '',
installNameKey: '',
refitMethodKey: '',
refitFactorySid: '',
colorKey: '',
plateMaterial: '',
createOrgSid: '',
vinNo: '',
noticeModel: ''
}
toLeave() {
if (this.multipleSelection.length !== 1) {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行出库操作' })
return
} else {
req.vehinstallOut(this.multipleSelection[0]).then((resp) => {
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: '出库成功' })
this.loadList()
}
})
}
this.init()
},
loadList() {
const _this = this
this.tableLoading = true
req.pagelist(this.queryParams).then((resp) => {
_this.tableLoading = false
const data = resp.data
_this.queryParams.total = data.total
_this.dataList = data.records
}).catch(() => {
_this.tableLoading = false
})
},
handleSelectionChange(val) {
console.log(val)
this.multipleSelection = val
},
//
indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart
return pageindex
},
toInfo(row) {
this.$refs['divinfo'].showInfo(row)

Loading…
Cancel
Save