7 changed files with 1064 additions and 3 deletions
@ -0,0 +1,46 @@ |
|||
import request from '@/utils/request' |
|||
// 库房提供的采购订单表
|
|||
export default { |
|||
|
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
url: '/v1/purchaserequisition/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 保存新增记录
|
|||
saveOrUpdate: function(params) { |
|||
return request({ |
|||
url: '/v1/purchaserequisition/save', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 通过sid删除一条或多条记录
|
|||
delBySids: function(data) { |
|||
return request({ |
|||
url: '/v1/purchaserequisition/delBySids', |
|||
method: 'delete', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 通过sid查询一条记录
|
|||
fetchBySid: function(sid) { |
|||
return request({ |
|||
url: '/v1/purchaserequisition/fetchDetailsBySid/' + sid |
|||
}) |
|||
}, |
|||
// 提交
|
|||
doSubmit: function(params) { |
|||
return request({ |
|||
url: '/supervise/v1/kfpurchaserequisition/doSubmit', |
|||
method: 'post', |
|||
data: params |
|||
}) |
|||
} |
|||
} |
@ -0,0 +1,308 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar ref="btnbar" view-title="采购申请管理" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow"> |
|||
{{ searchxianshitit }} |
|||
</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="queryParams" :inline="true" :model="queryParams" class="tab-header"> |
|||
<el-form-item label="审核状态"> |
|||
<el-input v-model="queryParams.params.createSid" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="订单编号"> |
|||
<el-input v-model="queryParams.params.modifySid" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="填单人"> |
|||
<el-input v-model="queryParams.params.buyerName" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="填单日期"> |
|||
<el-date-picker v-model="queryParams.params.applyStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="queryParams.params.applyStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
</el-form-item> |
|||
<el-form-item label="供应商名称"> |
|||
<el-input v-model="queryParams.params.contacts" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="要货单位"> |
|||
<el-input v-model="queryParams.params.telephone" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="完成状态"> |
|||
<el-select v-model="queryParams.params.completionStatusKey" filterable placeholder="请选择" clearable> |
|||
<el-option v-for="item in state_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="到货日期"> |
|||
<el-date-picker v-model="queryParams.params.applyStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="queryParams.params.applyStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
|||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- 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="loadList"/> |
|||
</div> |
|||
<!-- End 项目列表头部 --> |
|||
<!-- Start 项目列表 --> |
|||
<div class=""> |
|||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" @selection-change="handleSelectionChange"> |
|||
<el-table-column fixed width="50" type="selection" align="center"/> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center"/> |
|||
<el-table-column fixed width="180" label="操作" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="toEdit(scope.row)">办理</el-button> |
|||
<el-button type="primary" size="mini">撤回</el-button> |
|||
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="createSid" label="状态" align="center" width="120"/> |
|||
<el-table-column prop="code" label="订单编号" align="center" width="150"/> |
|||
<el-table-column prop="buyerName" label="填单人" align="center" width="120"/> |
|||
<el-table-column label="填单日期" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.purchaseDate.substring(0, scope.row.purchaseDate.length - 9) }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="supplierName" label="供应商单位" header-align="center" align="left"/> |
|||
<el-table-column prop="packageTotalPrice" label="订单金额(元)" align="center"/> |
|||
<el-table-column prop="purchasingDeptName" label="要货单位" align="center"/> |
|||
<el-table-column prop="arrivalDate" label="到货日期" align="center" width="120"/> |
|||
<el-table-column prop="completionStatus" label="完成状态" align="center" width="120"/> |
|||
</el-table> |
|||
</div> |
|||
<!-- End 项目列表 --> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" @pagination="loadList"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End 查询和其列表部分 --> |
|||
<!-- 新增修改部分组件 --> |
|||
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList"/> |
|||
<divInfo v-show="viewState == 4" ref="divInfo" @doback="resetState" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/supervise/purchaseapplicationmanagement' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import divAdd from './purchaseapplicationmanagementAdd' |
|||
import divInfo from './purchaseapplicationmanagementInfo' |
|||
|
|||
export default { |
|||
name: 'PurchaseApplicationManagement', |
|||
components: { |
|||
ButtonBar, |
|||
Pagination, |
|||
pageye, |
|||
divAdd, |
|||
divInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
tableLoading: false, |
|||
dataList: [], |
|||
state_list: [ |
|||
{ |
|||
dictKey: 0, |
|||
dictValue: '未完成' |
|||
} |
|||
], |
|||
btnList: [ |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'plus', |
|||
btnKey: 'toAdd', |
|||
btnLabel: '新增' |
|||
}, |
|||
{ |
|||
type: 'danger', |
|||
size: 'small', |
|||
icon: 'del', |
|||
btnKey: 'doDel', |
|||
btnLabel: '删除' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
queryParams: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
code: '', |
|||
buyerName: '', |
|||
purchaseStartDate: '', |
|||
purchaseEndDate: '', |
|||
supplierName: '', |
|||
purchasingDeptName: '', |
|||
arrivalStartDate: '', |
|||
arrivalEndDate: '', |
|||
completionStatusKey: '' |
|||
} |
|||
}, |
|||
sids: [] |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
created() { |
|||
this.loadList() |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
switch (btnKey) { |
|||
case 'toAdd': |
|||
this.toAdd() |
|||
break |
|||
case 'doDel': |
|||
this.doDel() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
loadList() { |
|||
this.tableLoading = true |
|||
req.listPage(this.queryParams).then((resp) => { |
|||
this.tableLoading = false |
|||
if (resp.success) { |
|||
const data = resp.data |
|||
this.queryParams.total = data.total |
|||
this.dataList = data.records |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
this.dataList = [] |
|||
this.queryParams.total = 0 |
|||
} |
|||
}).catch(() => { |
|||
this.tableLoading = false |
|||
}) |
|||
}, |
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
row.forEach((element) => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
dosearch() { |
|||
this.queryParams.current = 1 |
|||
this.loadList() |
|||
}, |
|||
resetQuery() { |
|||
this.queryParams = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
code: '', |
|||
buyerName: '', |
|||
purchaseDateStart: '', |
|||
purchaseDateEnd: '', |
|||
supplierName: '', |
|||
purchasingDeptName: '', |
|||
arrivalDateStart: '', |
|||
arrivalDateEnd: '', |
|||
completionStatusKey: '' |
|||
} |
|||
} |
|||
this.loadList() |
|||
}, |
|||
toAdd() { |
|||
this.viewState = 2 |
|||
this.$refs['divadd'].showAdd() |
|||
}, |
|||
toEdit(row) { |
|||
this.viewState = 3 |
|||
this.$refs['divadd'].showEdit(row) |
|||
}, |
|||
toInfo(row) { |
|||
this.viewState = 4 |
|||
this.$refs['divInfo'].showInfo(row) |
|||
}, |
|||
doDel() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) |
|||
return |
|||
} |
|||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|||
this.$confirm(tip, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: 'Loading', |
|||
spinner: 'el-icon-loading', |
|||
background: 'rgba(0, 0, 0, 0.7)' |
|||
}) |
|||
req.delBySids(this.sids).then(resp => { |
|||
loading.close() |
|||
if (resp.success) { |
|||
this.$message({ type: 'success', message: resp.msg, showClose: true }) |
|||
this.loadList() |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
} |
|||
}).catch(e => { |
|||
loading.close() |
|||
}) |
|||
}).catch(() => { |
|||
}) |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,405 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!-- 标题按钮部分开始 --> |
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>{{ viewTitle }}</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"> |
|||
<el-button type="text" @click="handleDownload"><span style="border-bottom: 1px solid blue">下载Excel示例表样</span></el-button> |
|||
<div style="margin-left: 10px;margin-right: 10px"> |
|||
<el-upload |
|||
ref="upload" |
|||
class="avatar-uploade" |
|||
accept=".xls" |
|||
:action="updateAction" |
|||
name="filename" |
|||
:file-list="fileList" |
|||
:on-success="handleSuccess" |
|||
:multiple="false" |
|||
:show-file-list="false" |
|||
:limit="1"> |
|||
<el-button type="primary" size="small">导入采购订单表</el-button> |
|||
</el-upload> |
|||
</div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled">提交审核</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</div> |
|||
<!-- 标题按钮部分结束 --> |
|||
<!-- Start 新增修改部分 --> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="right" class="formadd"> |
|||
<div class="title"> |
|||
<div>采购订单信息</div> |
|||
</div> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>订单编号</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.code }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>填单人</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.buyerName }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>供货单位</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.supplierName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>仓位</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.warehousePosition }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>采购员</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.buyerName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>入库单位</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.purchasingDeptName }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>要货单位</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.purchasingDeptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>入库仓位</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.warehousePosition }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>填单日期</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.purchaseDate }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>到货日期</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.arrivalDate }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>单据到效期</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.expiryDate }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>完成状态</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.completionStatus }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title"> |
|||
<div>采购商品明细</div> |
|||
<div><span style="padding-right: 20px">合计数量:{{ totalQuantity }}</span><span>合计金额:{{ amountInTotal }}</span></div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.pros" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed label="序号" width="80px" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column fixed label="操作" width="100px" align="center" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button size="mini" type="danger" @click="dataDelete(scope.$index)">删除 |
|||
</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="商品代码" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.proCode }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="商品名称" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.proName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="规格型号" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.content }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="数量" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.number }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="包装数量" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.packageNumber }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="包内数量" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.packageInsideNumber }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="包装规格" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.packageSpec }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="单位" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.unit }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="包装价格(元)" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.packagePrice }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="包合计(元)" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.packageTotalPrice }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="单价(元)" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.unitPrice }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="含税单价(元)" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.unitPriceTax }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="合计(元)" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.totalPrice }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="商品品类名称" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.category }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="商品品类编码" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.categoryKey }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="品牌名称" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.brand }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="品牌编码" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.brandCode }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="发货日期" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.issuanceDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="零售金额" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.retailAmount }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
<!-- End 添加修改部分 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/supervise/purchaseapplicationmanagement' |
|||
export default { |
|||
name: 'PurchaseApplicationManagementAdd', |
|||
data() { |
|||
return { |
|||
submitdisabled: false, |
|||
viewTitle: '', |
|||
tableKey: 0, |
|||
index: 0, |
|||
updateAction: process.env.VUE_APP_BASE_API + '/v1/purchaserequisition/importBrandSort', |
|||
fileList: [], |
|||
totalQuantity: '', // 合计数量 |
|||
amountInTotal: '', // 合计金额 |
|||
formobj: { |
|||
sid: '', |
|||
code: '', // 单号 |
|||
buyerName: '', // 采购人姓名 |
|||
buyerCode: '', // 采购人编码 |
|||
purchaseDate: '', // 采购日期 |
|||
arrivalDate: '', // 到货日期 |
|||
purchasingOrgName: '', // 采购组织名称 |
|||
purchasingOrgCode: '', // 采购组织编码 |
|||
purchasingDeptCode: '', // 采购部门名称 |
|||
purchasingDeptName: '', // 采购部门编码 |
|||
supplierName: '', // 供应商名称 |
|||
supplierCode: '', // 供应商编码 |
|||
logisticsCompanyName: '', // 物流公司名称 |
|||
logisticsCompanyCode: '', // 物流公司编码 |
|||
expiryDate: '', // 单据到效期 |
|||
warehousePosition: '', // 仓位 |
|||
warehousePositionCode: '', // 仓位code |
|||
newCode: '', // 新订单编号 |
|||
oldCode: '', // 旧订单编号 |
|||
completionStatus: '', // 完成状态 |
|||
completionStatusKey: '', // 完成状态key |
|||
pros: [] // 采购商品明细列表 |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
created() {}, |
|||
methods: { |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = { |
|||
sid: '', |
|||
code: '', // 单号 |
|||
buyerName: '', // 采购人姓名 |
|||
buyerCode: '', // 采购人编码 |
|||
purchaseDate: '', // 采购日期 |
|||
arrivalDate: '', // 到货日期 |
|||
purchasingOrgName: '', // 采购组织名称 |
|||
purchasingOrgCode: '', // 采购组织编码 |
|||
purchasingDeptCode: '', // 采购部门名称 |
|||
purchasingDeptName: '', // 采购部门编码 |
|||
supplierName: '', // 供应商名称 |
|||
supplierCode: '', // 供应商编码 |
|||
logisticsCompanyName: '', // 物流公司名称 |
|||
logisticsCompanyCode: '', // 物流公司编码 |
|||
expiryDate: '', // 单据到效期 |
|||
warehousePosition: '', // 仓位 |
|||
warehousePositionCode: '', // 仓位code |
|||
newCode: '', // 新订单编号 |
|||
oldCode: '', // 旧订单编号 |
|||
completionStatus: '', // 完成状态 |
|||
completionStatusKey: '', // 完成状态key |
|||
pros: [] // 采购商品明细列表 |
|||
} |
|||
this.totalQuantity = '' |
|||
this.amountInTotal = '' |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
}, |
|||
showAdd() { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '【审核编号】' |
|||
}, |
|||
showEdit(row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '【审核编号】' |
|||
req.fetchBySid(row.sid).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
if (this.formobj.pros.length > 0) { |
|||
this.totalQuantity = this.formobj.pros.length |
|||
var aa = 0 |
|||
for (var i = 0; i < this.formobj.pros.length; i++) { |
|||
if (this.formobj.pros[i].totalPrice !== '') { |
|||
aa = parseFloat(aa) + parseFloat(this.formobj.pros[i].totalPrice) |
|||
} |
|||
} |
|||
this.amountInTotal = aa |
|||
} |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
} |
|||
}).catch(e => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
handleDownload() { |
|||
window.location.href = process.env.VUE_APP_BASE_API + '/v1/purchaserequisition/yb' |
|||
}, |
|||
handleSuccess(resp, file, fileList) { |
|||
if (resp.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '导入成功' }) |
|||
this.formobj = resp.data |
|||
if (this.formobj.pros.length > 0) { |
|||
this.totalQuantity = this.formobj.pros.length |
|||
var aa = 0 |
|||
for (var i = 0; i < this.formobj.pros.length; i++) { |
|||
if (this.formobj.pros[i].totalPrice !== '') { |
|||
aa = parseFloat(aa) + parseFloat(this.formobj.pros[i].totalPrice) |
|||
} |
|||
} |
|||
this.amountInTotal = aa |
|||
} |
|||
} else { |
|||
this.$message({ showClose: true, type: 'error', message: resp.msg }) |
|||
} |
|||
}, |
|||
dataDelete(index) { |
|||
const tip = '请确认是否删除所选记录?' |
|||
this.$confirm(tip, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.formobj.pros.splice(index, 1) |
|||
}) |
|||
}, |
|||
saveOrUpdate() { |
|||
this.$refs['form_obj'].validate(valid => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.saveOrUpdate(this.formobj).then((resp) => { |
|||
this.submitdisabled = false |
|||
if (resp.success) { |
|||
this.$message({ showClose: true, type: 'success', message: resp.msg }) |
|||
this.handleReturn('true') |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.title { |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
</style> |
@ -0,0 +1,278 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!-- 标题按钮部分开始 --> |
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>{{ viewTitle }}</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</div> |
|||
<!-- 标题按钮部分结束 --> |
|||
<!-- Start 新增修改部分 --> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="right" class="formadd"> |
|||
<div class="title"> |
|||
<div>采购订单信息</div> |
|||
</div> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>订单编号</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.code }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>填单人</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.buyerName }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>供货单位</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.supplierName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>仓位</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.warehousePosition }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>采购员</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.buyerName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>入库单位</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.purchasingDeptName }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>要货单位</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.purchasingDeptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>入库仓位</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.warehousePosition }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>填单日期</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.purchaseDate }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>到货日期</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.arrivalDate }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>单据到效期</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.expiryDate }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>完成状态</span> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item><span>{{ formobj.completionStatus }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title"> |
|||
<div>采购商品明细</div> |
|||
<div><span style="padding-right: 20px">合计数量:{{ totalQuantity }}</span><span>合计金额:{{ amountInTotal }}</span></div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.pros" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed label="序号" width="80px" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column fixed label="操作" width="100px" align="center" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button size="mini" type="danger" @click="dataDelete(scope.$index)">删除 |
|||
</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="商品代码" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.proCode }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="商品名称" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.proName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="规格型号" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.content }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="数量" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.number }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="包装数量" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.packageNumber }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="包内数量" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.packageInsideNumber }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="包装规格" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.packageSpec }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="单位" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.unit }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="包装价格(元)" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.packagePrice }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="包合计(元)" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.packageTotalPrice }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="单价(元)" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.unitPrice }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="含税单价(元)" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.unitPriceTax }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="合计(元)" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.totalPrice }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="商品品类名称" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.category }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="商品品类编码" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.categoryKey }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="品牌名称" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.brand }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="品牌编码" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.brandCode }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="发货日期" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.issuanceDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="零售金额" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.retailAmount }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
<!-- End 添加修改部分 --> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/supervise/purchaseapplicationmanagement' |
|||
export default { |
|||
name: 'PurchaseApplicationManagementInfo', |
|||
data() { |
|||
return { |
|||
submitdisabled: false, |
|||
viewTitle: '', |
|||
tableKey: 0, |
|||
index: 0, |
|||
totalQuantity: '', // 合计数量 |
|||
amountInTotal: '', // 合计金额 |
|||
formobj: {}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
created() {}, |
|||
methods: { |
|||
handleReturn() { |
|||
this.formobj = {} |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
}, |
|||
showInfo(row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '【审核编号】详情' |
|||
req.fetchBySid(row.sid).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
if (this.formobj.pros.length > 0) { |
|||
this.totalQuantity = this.formobj.pros.length |
|||
var aa = 0 |
|||
for (var i = 0; i < this.formobj.pros.length; i++) { |
|||
if (this.formobj.pros[i].totalPrice !== '') { |
|||
aa = parseFloat(aa) + parseFloat(this.formobj.pros[i].totalPrice) |
|||
} |
|||
} |
|||
this.amountInTotal = aa |
|||
} |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
} |
|||
}).catch(e => { |
|||
this.formobj = row |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.title { |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
</style> |
Loading…
Reference in new issue