4 changed files with 151 additions and 720 deletions
@ -1,69 +1,30 @@ |
|||||
import request from '@/utils/request' |
import request from '@/utils/request' |
||||
|
|
||||
export default { |
export default { |
||||
// 查询分页列表
|
// 查询分页列表 -- 库存查询
|
||||
listPage: function(params) { |
listPage: function(data) { |
||||
return request({ |
return request({ |
||||
url: '/inventory/wmsinventory/listPage', |
url: '/apiadmin/inventory/wmsinventory/listPage', |
||||
method: 'post', |
method: 'post', |
||||
data: params, |
|
||||
headers: { 'Content-Type': 'application/json' } |
|
||||
}) |
|
||||
}, |
|
||||
saveOrUpdate: function(data) { |
|
||||
return request({ |
|
||||
url: '/inventory/wmsinventory/updateWmsInventory', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { 'Content-Type': 'application/json' } |
|
||||
}) |
|
||||
}, |
|
||||
init: function(data) { |
|
||||
return request({ |
|
||||
url: '/riskcenter/v1/loancaseappealapply/details', |
|
||||
method: 'post', |
|
||||
params: data |
|
||||
}) |
|
||||
}, |
|
||||
fetchBySid: function(data) { |
|
||||
return request({ |
|
||||
url: '/inventory/wmsinventory/init', |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}) |
|
||||
}, |
|
||||
// 导出
|
|
||||
exportExcel: function(data) { |
|
||||
return request({ |
|
||||
url: '/inventory/wmsinventory/exportExcel', |
|
||||
method: 'post', |
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
|
||||
data: data, |
data: data, |
||||
headers: { 'Content-Type': 'application/json' } |
headers: { 'Content-Type': 'application/json' } |
||||
}) |
}) |
||||
}, |
}, |
||||
|
// 库存查询 -- 删除
|
||||
deleteBySids: function(data) { |
deleteBySids: function(data) { |
||||
return request({ |
return request({ |
||||
url: '/inventory/wmsinventory/delBySids', |
url: '/riskcenter/v1/LoanLawsuitApply/deleteBySids', |
||||
method: 'DELETE', |
method: 'DELETE', |
||||
data: data, |
data: data, |
||||
headers: { 'Content-Type': 'application/json' } |
headers: { 'Content-Type': 'application/json' } |
||||
}) |
}) |
||||
}, |
}, |
||||
saveSettlebill: function(data) { |
// 库存出入库记录
|
||||
return request({ |
getWmsInventoryRecordList: function(data) { |
||||
url: '/inventory/wmsinventorysettlebill/saveSettlebill', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { 'Content-Type': 'application/json' } |
|
||||
}) |
|
||||
}, |
|
||||
getBillList: function(data) { |
|
||||
return request({ |
return request({ |
||||
url: '/inventory/wmsinventory/getBillList', |
url: '/wms/apiadmin/inventory/wmsinventoryrecord/getWmsInventoryRecordList', |
||||
method: 'post', |
method: 'get', |
||||
data: data, |
params: data |
||||
headers: { 'Content-Type': 'application/json' } |
|
||||
}) |
}) |
||||
} |
} |
||||
} |
} |
||||
|
@ -1,194 +0,0 @@ |
|||||
<template> |
|
||||
<div class="app-container"> |
|
||||
<div v-show="viewState == 1"> |
|
||||
<div class="tab-header webtop"> |
|
||||
<div>{{ viewTitle }}</div> |
|
||||
<div> |
|
||||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="listconadd"> |
|
||||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|
||||
<el-collapse v-model="activeNames"> |
|
||||
<el-collapse-item title="商品信息" name="1"> |
|
||||
</el-collapse-item> |
|
||||
<el-collapse-item title="库存信息" name="2"> |
|
||||
<el-row style="border-top: 1px solid #e0e3eb"> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">仓库</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.warehouseName }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">供应商</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.billObjName }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">数量</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.count }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">销售价格1</div> |
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.price1" clearablea placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">销售价格2</div> |
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.price2" clearablea placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">销售价格3</div> |
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.price3" clearablea placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">销售价格4</div> |
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.price4" clearablea placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">销售价格5</div> |
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.price5" clearablea placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">销售底价</div> |
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.minimumPrice" clearablea placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">货位</div> |
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.warehouseArea" clearablea placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">折扣标志</div> |
|
||||
<el-form-item> |
|
||||
<el-switch class="addinputInfo" v-model="formobj.isShowDiscount" active-color="#13ce66" inactive-color="#ff4949" active-value="1" inactive-value="0"> |
|
||||
</el-switch> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">三包价格</div> |
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.freePrice" clearablea placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">首保价格</div> |
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.firstMaintainPrice" clearablea placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">排序</div> |
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.sortNo" clearablea placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-collapse-item> |
|
||||
</el-collapse> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import req from '@/api/storage/inventory' |
|
||||
|
|
||||
export default { |
|
||||
name: 'InventoryAdd', |
|
||||
data() { |
|
||||
return { |
|
||||
viewTitle: '', |
|
||||
viewState: 1, |
|
||||
submitdisabled: false, |
|
||||
activeNames: '2', |
|
||||
formobj: { |
|
||||
sid: '', |
|
||||
warehouseName: '', |
|
||||
billObjName: '', |
|
||||
count: '', |
|
||||
price1: '', |
|
||||
price2: '', |
|
||||
price3: '', |
|
||||
price4: '', |
|
||||
price5: '', |
|
||||
minimumPrice: '', |
|
||||
warehouseArea: '', |
|
||||
isShowDiscount: '', |
|
||||
freePrice: '', |
|
||||
firstMaintainPrice: '', |
|
||||
sortNo: '' |
|
||||
}, |
|
||||
rules: {} |
|
||||
} |
|
||||
}, |
|
||||
methods: { |
|
||||
showEdit(row) { |
|
||||
this.viewTitle = '【编辑】' |
|
||||
this.$nextTick(() => { |
|
||||
this.$refs['form_obj'].clearValidate() |
|
||||
}) |
|
||||
req.fetchBySid({ sid: row.sid }).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.formobj = res.data |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
saveOrUpdate() { |
|
||||
this.$refs['form_obj'].validate((valid) => { |
|
||||
if (valid) { |
|
||||
this.submitdisabled = true |
|
||||
req.saveOrUpdate(this.formobj).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|
||||
this.handleReturn('true') |
|
||||
} else { |
|
||||
this.submitdisabled = false |
|
||||
} |
|
||||
}).catch(() => { |
|
||||
this.submitdisabled = false |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
handleReturn(isreload) { |
|
||||
if (isreload === 'true') this.$emit('reloadlist') |
|
||||
this.formobj = { |
|
||||
sid: '', |
|
||||
warehouseName: '', |
|
||||
billObjName: '', |
|
||||
count: '', |
|
||||
price1: '', |
|
||||
price2: '', |
|
||||
price3: '', |
|
||||
price4: '', |
|
||||
price5: '', |
|
||||
minimumPrice: '', |
|
||||
warehouseArea: '', |
|
||||
isShowDiscount: '', |
|
||||
freePrice: '', |
|
||||
firstMaintainPrice: '', |
|
||||
sortNo: '' |
|
||||
} |
|
||||
this.submitdisabled = false |
|
||||
this.$refs['form_obj'].resetFields() |
|
||||
this.$emit('doback') |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style scoped> |
|
||||
.span-sty { |
|
||||
width: 130px !important; |
|
||||
} |
|
||||
.addinputInfo { |
|
||||
margin-left: 120px !important; |
|
||||
} |
|
||||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|
||||
margin-left: 120px !important; |
|
||||
width: calc(100% - 115px); |
|
||||
} |
|
||||
</style> |
|
@ -1,173 +0,0 @@ |
|||||
<template> |
|
||||
<div class="app-container"> |
|
||||
<div v-show="viewState == 1"> |
|
||||
<div class="tab-header webtop"> |
|
||||
<div>{{ viewTitle }}</div> |
|
||||
<div> |
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="listconadd"> |
|
||||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|
||||
<el-collapse v-model="activeNames"> |
|
||||
<el-collapse-item title="商品信息" name="1"> |
|
||||
</el-collapse-item> |
|
||||
<el-collapse-item title="库存信息" name="2"> |
|
||||
<el-row style="border-top: 1px solid #e0e3eb"> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">仓库</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.warehouseName }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">供应商</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.billObjName }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">数量</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.count }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">销售价格1</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.price1 }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">销售价格2</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.price2 }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">销售价格3</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.price3 }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">销售价格4</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.price4 }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">销售价格5</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.price5 }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">销售底价</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.minimumPrice }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">货位</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.warehouseArea }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">折扣标志</div> |
|
||||
<el-form-item> |
|
||||
<el-switch class="addinputInfo" v-model="formobj.isShowDiscount" active-color="#13ce66" inactive-color="#ff4949" active-value="1" inactive-value="0"> |
|
||||
</el-switch> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">三包价格</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.freePrice }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">首保价格</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.firstMaintainPrice }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">排序</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.sortNo }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-collapse-item> |
|
||||
</el-collapse> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import req from '@/api/storage/inventory' |
|
||||
|
|
||||
export default { |
|
||||
name: 'InventoryInfo', |
|
||||
data() { |
|
||||
return { |
|
||||
viewTitle: '', |
|
||||
viewState: 1, |
|
||||
activeNames: '2', |
|
||||
formobj: { |
|
||||
sid: '', |
|
||||
warehouseName: '', |
|
||||
billObjName: '', |
|
||||
count: '', |
|
||||
price1: '', |
|
||||
price2: '', |
|
||||
price3: '', |
|
||||
price4: '', |
|
||||
price5: '', |
|
||||
minimumPrice: '', |
|
||||
warehouseArea: '', |
|
||||
isShowDiscount: '', |
|
||||
freePrice: '', |
|
||||
firstMaintainPrice: '', |
|
||||
sortNo: '' |
|
||||
}, |
|
||||
rules: {} |
|
||||
} |
|
||||
}, |
|
||||
methods: { |
|
||||
showInfo(row) { |
|
||||
this.viewTitle = '详情' |
|
||||
this.$nextTick(() => { |
|
||||
this.$refs['form_obj'].clearValidate() |
|
||||
}) |
|
||||
req.fetchBySid({ sid: row.sid }).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.formobj = res.data |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
handleReturn() { |
|
||||
this.formobj = { |
|
||||
sid: '', |
|
||||
warehouseName: '', |
|
||||
billObjName: '', |
|
||||
count: '', |
|
||||
price1: '', |
|
||||
price2: '', |
|
||||
price3: '', |
|
||||
price4: '', |
|
||||
price5: '', |
|
||||
minimumPrice: '', |
|
||||
warehouseArea: '', |
|
||||
isShowDiscount: '', |
|
||||
freePrice: '', |
|
||||
firstMaintainPrice: '', |
|
||||
sortNo: '' |
|
||||
} |
|
||||
this.$refs['form_obj'].resetFields() |
|
||||
this.$emit('doback') |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style scoped> |
|
||||
.span-sty { |
|
||||
width: 130px !important; |
|
||||
} |
|
||||
.addinputInfo { |
|
||||
margin-left: 120px !important; |
|
||||
} |
|
||||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|
||||
margin-left: 120px !important; |
|
||||
width: calc(100% - 115px); |
|
||||
} |
|
||||
</style> |
|
Loading…
Reference in new issue