fengdong777 2 years ago
parent
commit
fabb407108
  1. 12
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTypeInAndOutBound/oilTypeInAndOutBound.js
  2. 45
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTypeYuanliao/index.js
  3. 465
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/business/rawMaterialProcure/index.vue
  4. 516
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/business/rawMaterialProcure/rawMaterialProcureAdd.vue
  5. 197
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/business/rawMaterialProcure/rawMaterialProcureInfo.vue

12
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTypeInAndOutBound/oilTypeInAndOutBound.js

@ -150,4 +150,16 @@ export default {
} }
}) })
}, },
// 查询原料记录
inventoryList: function(params) {
return request({
url: '/cyf/rawinventory/inventoryList',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json',
'token': tokens
}
})
},
} }

45
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTypeYuanliao/index.js

@ -0,0 +1,45 @@
import request from '@/utils/request'
let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 采购
// 查询分页列表
loadLogList: function(params) {
return request({
url: '/cyf/materialProcurement/listPage',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json',
'token': tokens
}
})
},
submit: function(params) {
return request({
url: '/cyf/materialProcurement/submit',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json',
'token': tokens
}
})
},
// 新增
save: function(data) {
return request({
url: '/cyf/materialProcurement/save',
method: 'post',
data: data
});
},
// 初始化
procureFetchBySid: function(sid) {
return request({
url: '/v1/warehouselocation/getWarehouseBySid/' + sid
})
},
}

465
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/business/rawMaterialProcure/index.vue

@ -1,177 +1,156 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div v-show="viewState ==1"> <div v-show="viewState ==1">
<button-bar view-title="采购管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" /> <button-bar view-title="原料采购销售管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content"> <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="listQueryform" :inline="true" :model="listQuery" class="tab-header">
<el-form-item label="采购订单编号">
<el-input v-model="listQuery.params.bankName" maxlength="20" placeholder="请输入采购订单编号" class="addinputw"
clearable />
</el-form-item>
<el-form-item label="采购日期">
<el-date-picker v-model="listQuery.params.date" type="date" :picker-options="pickerOptions" clearable
value-format="yyyy-MM-dd" placeholder="选择日期" />
</el-form-item>
<el-form-item label="商品名称">
<el-input v-model="listQuery.params.bankName" maxlength="20" placeholder="请输入采购商品名称" class="addinputw"
clearable />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleReset">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleFilter">重置</el-button>
</div>
</div>
</div>
<el-row style="margin-left: 20px;margin-right: 20px;"> <el-row style="margin-left: 20px;margin-right: 20px;">
<el-col> <el-col>
<el-tabs v-model="tabActiveName" @tab-click="handleOrder"> <el-tabs v-model="tabActiveName" @tab-click="handleOrder">
<el-tab-pane label="原油订单列表" name="uplog"> <el-tab-pane label="原料采购订单列表" name="uplog">
<div> <div class="searchcon">
<el-table v-loading="tableLoading1" :data="logList" border style="width: 100%"> <el-button size="small" class="searchbtn"
@click="clicksearchShow1">{{ searchxianshitit1 }}</el-button>
<div v-show="isSearchShow1" class="search">
<el-form ref="listQueryform1" :inline="true" :model="listQuery" class="tab-header">
<el-form-item label="订单编号">
<el-input v-model="listQuery.params.orderNumber" maxlength="20" placeholder="请输入订单编号"
class="addinputw" clearable />
</el-form-item>
<el-form-item label="日期">
<el-date-picker v-model="listQuery.params.date" type="date" :picker-options="pickerOptions"
clearable value-format="yyyy-MM-dd" placeholder="选择日期" />
</el-form-item>
<el-form-item label="商品名称">
<el-input v-model="listQuery.params.tradeName" maxlength="20" placeholder="请输入采购商品名称"
class="addinputw" clearable />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleReset1">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" size="small"
@click="handleFilter1">重置</el-button>
</div>
</div>
</div>
<div>
<el-table v-loading="tableLoading1" :data="list" border style="width: 100%">
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" /> <el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
<el-table-column label="操作" wid align="center" width="220"> <el-table-column label="操作" wid align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="toDetail(scope.row)">详情</el-button> <el-button type="primary" size="mini" @click="toDetail(scope.row)">详情</el-button>
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button> <el-button type="primary" size="mini" v-show="scope.row.state==1"
<el-button type="primary" size="mini" @click="doDel(scope.row)">删除</el-button> @click="toEdit(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" v-show="scope.row.state==1"
@click="doDel(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="订单编号" prop="orderNumber" align="center" /> <el-table-column label="订单编号" prop="orderNumber" align="center" />
<el-table-column label="合同日期" prop="contractSigningDate" width="100" align="center" /> <el-table-column label="合同日期" prop="contractSigningDate" width="100" align="center" />
<el-table-column label="商品类型" prop="typeName" width="100" align="center" /> <el-table-column label="付款日期" prop="paymentDate" width="100" align="center" />
<el-table-column label="商品编码" prop="productCode" width="80" align="center" />
<el-table-column label="商品名称" prop="tradeName" width="180" align="center" />
<el-table-column label="单价" prop="price" width="80" align="center" />
<el-table-column label="数量" prop="weight" width="100" align="center" />
<el-table-column label="单位" prop="weight" width="100" align="center" />
<el-table-column label="供应商名称" prop="supplierName" align="center" /> <el-table-column label="供应商名称" prop="supplierName" align="center" />
<el-table-column label="供应商" prop="supplierName" align="center" /> <el-table-column label="总价值" prop="totalValue" width="80" align="center" />
<el-table-column label="订单状态" prop="state" width="150" align="center" /> <el-table-column label="原料数量" prop="amount" width="100" align="center" />
</el-table> <el-table-column label="订单状态" prop="stateValue" width="150" align="center" />
</div> </el-table>
<div class="pages"> </div>
<!-- 翻页 --> <div class="pages">
<pagination v-show="logListTotal > 0" :total="logListTotal" :page.sync="logListQuery.current" <!-- 翻页 -->
:limit.sync="logListQuery.size" class="pagination" @pagination="loadLogList" /> <pagination v-show="listTotal > 0" :total="listTotal" :page.sync="listQuery.current"
</div> :limit.sync="listQuery.size" class="pagination" @pagination="loadLogList" />
</el-tab-pane> </div>
<el-tab-pane label="包装物订单列表" name="k112"> </el-tab-pane>
<div> <el-tab-pane label="原料销售订单列表" name="k112">
<el-table v-loading="tableLoading2" :data="in112List" border style="width: 100%"> <div class="searchcon">
<el-table-column fixed width="100" type="index" label="序号" :index="indexMethod2" align="center" /> <el-button size="small" class="searchbtn"
<el-table-column prop="supplierName" label="供应商名称" align="center" /> @click="clicksearchShow2">{{ searchxianshitit2 }}</el-button>
<el-table-column prop="code" label="商品编码" width="120" align="center" /> <div v-show="isSearchShow2" class="search">
<el-table-column prop="proName" label="商品名称" align="center" /> <el-form ref="listQueryform" :inline="true" :model="listQuery2" class="tab-header">
<el-table-column prop="number" label="单品数量" width="100"align="center" /> <el-form-item label="订单编号">
<el-table-column prop="orderAmount" label="订单商品价值" width="140" align="center" /> <el-input v-model="listQuery2.params.orderNumber" maxlength="20" placeholder="请输入订单编号"
<el-table-column prop="actualArrivalNumber" label="实际到货数量" width="140"align="center" /> class="addinputw" clearable />
<el-table-column prop="actualArrival" label="实际到货价值" width="120" align="center" /> </el-form-item>
<el-table-column prop="transitNumber" label="在途货数量" width="120" align="center" /> <el-form-item label="日期">
<el-table-column prop="transit" label="在途货价值" width="120"align="center" /> <el-date-picker v-model="listQuery2.params.date" type="date" :picker-options="pickerOptions"
<el-table-column prop="exceed" label="超出货价值" width="120"align="center" /> clearable value-format="yyyy-MM-dd" placeholder="选择日期" />
</el-table> </el-form-item>
</div> <el-form-item label="商品名称">
<div class="pages"> <el-input v-model="listQuery2.params.tradeName" maxlength="20" placeholder="请输入采购商品名称"
<!-- 翻页 --> class="addinputw" clearable />
<pagination v-show="in112ListTotal > 0" :total="in112ListTotal" :page.sync="in112ListQuery.current" </el-form-item>
:limit.sync="in112ListQuery.size" class="pagination" @pagination="loadIn112List" /> </el-form>
</div> <div class="btn" style="text-align: center;">
</el-tab-pane> <el-button type="primary" icon="el-icon-search" size="small" @click="handleReset2">查询</el-button>
<el-tab-pane label="原料订单列表" name="all"> <el-button type="primary" icon="el-icon-refresh" size="small"
<div> @click="handleFilter2">重置</el-button>
<el-table v-loading="tableLoading3" :data="inallList" border style="width: 100%"> </div>
<el-table-column fixed width="100" type="index" label="序号" :index="indexMethod3" align="center" />
<el-table-column prop="supplierName" label="供应商名称" align="center" />
<el-table-column prop="code" label="订单编号" align="center" />
<el-table-column prop="orderAmount" label="订单金额" align="center" />
<el-table-column prop="purchaseDate" label="订单日期" align="center" />
<el-table-column prop="arrivalDate" label="到货日期" align="center" />
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="inallListTotal > 0" :total="inallListTotal" :page.sync="inallListQuery.current"
:limit.sync="inallListQuery.size" class="pagination" @pagination="loadInallList" />
</div> </div>
</el-tab-pane> </div>
</el-tabs>
</el-col>
</el-row>
<div>
<el-table v-loading="tableLoading2" :data="list2" border style="width: 100%">
<el-table-column fixed width="100" type="index" label="序号" :index="indexMethod2" align="center" />
<el-table-column prop="supplierName" label="供应商名称" align="center" />
<el-table-column prop="code" label="商品编码" width="120" align="center" />
<el-table-column prop="proName" label="商品名称" align="center" />
<el-table-column prop="number" label="单品数量" width="100" align="center" />
<el-table-column prop="orderAmount" label="订单商品价值" width="140" align="center" />
<el-table-column prop="actualArrivalNumber" label="实际到货数量" width="140" align="center" />
<el-table-column prop="actualArrival" label="实际到货价值" width="120" align="center" />
<el-table-column prop="transitNumber" label="在途货数量" width="120" align="center" />
<el-table-column prop="transit" label="在途货价值" width="120" align="center" />
<el-table-column prop="exceed" label="超出货价值" width="120" align="center" />
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="listTotal2 > 0" :total="listTotal2" :page.sync="listQuery2.current"
:limit.sync="listQuery2.size" class="pagination" @pagination="loadLogList2" />
</div>
</el-tab-pane>
<div class="listtop"> </el-tabs>
<div class="tit">采购订单列表</div> </el-col>
<!-- 翻页分页 --> </el-row>
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</div>
<div class="">
<el-table v-loading="listLoading" :data="list" border style="width: 100%;">
<!-- <el-table-column type="selection" align="center" width="50"/> -->
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
<el-table-column label="操作" wid align="center" width="220">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toDetail(scope.row)">详情</el-button>
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" @click="doDel(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="订单编号" prop="orderNumber" align="center" />
<el-table-column label="合同日期" prop="contractSigningDate" width="100" align="center" />
<el-table-column label="商品类型" prop="typeName" width="100" align="center" />
<el-table-column label="商品编码" prop="productCode" width="80" align="center" />
<el-table-column label="商品名称" prop="tradeName" width="180" align="center" />
<el-table-column label="单价" prop="price" width="80" align="center" />
<el-table-column label="数量" prop="weight" width="100" align="center" />
<el-table-column label="单位" prop="weight" width="100" align="center" />
<el-table-column label="供应商名称" prop="supplierName" align="center" />
<el-table-column label="供应商" prop="supplierName" align="center" />
<el-table-column label="订单状态" prop="state" width="150" align="center" />
</el-table>
</div>
<div class="pages">
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div>
</div> </div>
</div> </div>
<rawMaterialProcureAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState" @reloadlist="getList" /> <oilTypeProcureAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState"
<rawMaterialProcureInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @reloadlist="getList" /> @reloadlist="loadLogList" />
<oilTypeProcureInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @reloadlist="loadLogList" />
</div> </div>
</template> </template>
<script> <script>
import req from '@/api/rawMaterialProcure/rawMaterialProcure.js' import req from '@/api/oilTypeYuanliao/index.js'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import rawMaterialProcureAdd from './rawMaterialProcureAdd.vue' import oilTypeProcureAdd from './rawMaterialProcureAdd.vue'
import rawMaterialProcureInfo from './rawMaterialProcureInfo.vue' import oilTypeProcureInfo from './rawMaterialProcureInfo.vue'
import {
parseTime
} from '@/utils/index'
export default { export default {
name: 'CustomerManagement',
components: { components: {
Pagination, Pagination,
pageye, pageye,
ButtonBar, ButtonBar,
rawMaterialProcureAdd, oilTypeProcureAdd,
rawMaterialProcureInfo, oilTypeProcureInfo,
}, },
data() { data() {
return { return {
tabActiveName: 'uplog', tabActiveName: 'uplog',
index: "0", index: "0",
isSearchShow: false, isSearchShow1: false,
searchxianshitit: '显示查询条件', searchxianshitit1: '显示查询条件',
isSearchShow2: false,
searchxianshitit2: '显示查询条件',
btndisabled: false, btndisabled: false,
tableLoading1: false, tableLoading1: false,
tableLoading2: false, tableLoading2: false,
tableLoading3: false,
btnList: [{ btnList: [{
type: 'primary', type: 'primary',
size: 'small', size: 'small',
@ -188,15 +167,31 @@
btnLabel: '关闭' btnLabel: '关闭'
} }
], ],
isSearchShow: false,
searchxianshitit: '显示查询条件',
list: [], list: [],
listTotal: 1,
listQuery: { listQuery: {
current: 1, current: 1,
size: 10, size: 10,
params: { params: {
bankName: '', orderNumber: '',
date: '',
tradeName: '',
// type: '1', // 1 2 3
state: "1", // 1 2 3 4 5 6 7
},
total: 0
},
list2: [],
listTotal2: 1,
listQuery2: {
current: 1,
size: 10,
params: {
orderNumber: '',
date: '',
tradeName: '',
type: '1', // 1 2 3 type: '1', // 1 2 3
state: "1", // 1 2 3 4 5 6 7
}, },
total: 0 total: 0
}, },
@ -212,7 +207,8 @@
this.$refs['btnbar'].setButtonList(this.btnList) this.$refs['btnbar'].setButtonList(this.btnList)
}, },
created() { created() {
this.init() this.loadLogList()
// this.loadLogList2()
// //
}, },
methods: { methods: {
@ -230,17 +226,61 @@
} }
}, },
// //
clicksearchShow() { clicksearchShow1() {
this.isSearchShow = !this.isSearchShow this.isSearchShow1 = !this.isSearchShow1
if (this.isSearchShow) { if (this.isSearchShow1) {
this.searchxianshitit = '隐藏查询条件' this.searchxianshitit1 = '隐藏查询条件'
} else {
this.searchxianshitit1 = '显示查询条件'
}
},
//
clicksearchShow2() {
this.isSearchShow2 = !this.isSearchShow2
if (this.isSearchShow2) {
this.searchxianshitit2 = '隐藏查询条件'
} else { } else {
this.searchxianshitit = '显示查询条件' this.searchxianshitit2 = '显示查询条件'
}
},
handleOrder(tab, event) {
console.log("tab", tab)
this.index = tab.index
switch (tab.index) {
//
case "0":
if (this.list.length == 0)
this.loadLogList()
break;
//
case "1":
if (this.list2.length == 0)
this.loadIn112List()
break;
default:
break;
} }
}, },
//
init() { //
this.getList() loadLogList() {
this.tableLoading1 = true
req.loadLogList(this.listQuery).then((response) => {
this.tableLoading1 = false
if (response.success) {
console.log("response.data", response.data)
this.list = response.data.records
this.listQuery.total = response.data.total
this.listTotal = response.data.total
this.listQuery.current = response.data.current
this.listQuery.size = response.data.size
} else {
this.list = []
this.listQuery.total = 0
}
})
}, },
// //
indexMethod(index) { indexMethod(index) {
@ -249,39 +289,86 @@
return pageindex return pageindex
}, },
// //
getList() { loadLogList2() {
this.listLoading = true this.tableLoading2 = true
req.listPage(this.listQuery).then((response) => { req.loadLogList2(this.listQuery2).then((response) => {
this.listLoading = false this.tableLoading2 = false
if (response.success) { if (response.success) {
this.list = response.data.records this.list2 = response.data.records
this.listQuery.total = response.data.total this.listQuery2.total = response.data.total
this.listTotal2 = response.data.total
this.listQuery2.current = response.data.current
this.listQuery2.size = response.data.size
} else { } else {
this.list = [] this.list2 = []
this.listQuery.total = 0 this.listQuery2.total = 0
} }
}) })
}, },
//
indexMethod2(index) {
var pagestart = (this.listQuery2.current - 1) * this.listQuery2.size
var pageindex = index + 1 + pagestart
return pageindex
},
// //
handleReset() { handleReset1() {
this.listQuery.current = 1 this.loadLogList()
this.getList()
}, },
// //
handleFilter() { handleFilter1() {
this.listQuery = { this.listQuery = {
current: 1, current: 1,
size: 10, size: 10,
total: 0, total: 0,
params: { params: {
bankName: "" orderNumber: '',
tradeName: '',
date: "",
type: '1',
state: "1", // 1 2 3 4 5 6 7
}
}
this.loadLogList()
},
//
handleReset2() {
this.loadIn112List()
},
//
handleFilter2() {
this.listQuery2 = {
current: 1,
size: 10,
total: 0,
params: {
orderNumber: '',
tradeName: '',
date: "",
type: '1',
state: "1", // 1 2 3 4 5 6 7
} }
} }
this.getList() this.loadIn112List()
}, },
// //
toAdd() { toAdd() {
this.viewState = 2 switch (this.index) {
//
case "0":
this.viewState = 2
break;
//
case "1":
this.viewState = 2
break;
default:
break;
}
}, },
// //
toEdit(row) { toEdit(row) {
@ -296,22 +383,44 @@
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
req.delBySids(row.sid).then((response) => { if ("0" == this.index) {
if (response.success) { req.procureDelBySids(row.sid).then((response) => {
this.$message({ if (response.success) {
showClose: true, this.$message({
type: 'success', showClose: true,
message: '删除成功' type: 'success',
}) message: '删除成功'
this.getList() })
} else { this.loadLogList()
this.$message({ } else {
showClose: true, this.$message({
type: 'error', showClose: true,
message: '删除失败' type: 'error',
}) message: '删除失败'
} })
}) }
})
}
if ("1" == this.index) {
req.procureDelBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.loadLogList()
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
}
}) })
}, },
toDetail(row) { toDetail(row) {
@ -330,4 +439,4 @@
} }
</script> </script>
<style scoped> <style scoped>
</style> </style>

516
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/business/rawMaterialProcure/rawMaterialProcureAdd.vue

@ -1,121 +1,231 @@
<template> <template>
<div> <div class="app-container">
<div class="tab-header webtop">
<!-- 标题 -->
<div>采购信息</div>
<!-- start 添加修改按钮 -->
<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> <div>
<div class="tab-header webtop">
<el-card class="box-card"> <div>采购信息</div>
<div class="item"> <div>
<span class="item_text">库房位置</span> <el-button type="primary" size="small" :disabled="submitdisabled" @click="submitData">提交</el-button>
<el-input v-model="formobj.address" placeholder="" class="item_input" style="width: 520px;" clearable /> <el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button>
</div> </div>
<div class="item"> </div>
<span class="item_text">--</span> <div class="listconadd">
<div class="item_input"> <el-form ref="dataForm" :model="formobj" label-position="top" label-width="190px" class="formadd">
<el-select v-model="formobj.province" filterable placeholder="请选择省" class="addinputw" style="width:160px" <div class="titwu">采购信息</div>
@change="getShen"> <div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
<el-option v-for="item in inputProvinceList" :key="item.sid" :label="item.name" :value="item.sid" /> <div>主体信息</div>
</el-select>
<el-select v-model="formobj.city" filterable placeholder="请选择市" class="addinputw"
style="width:160px;margin-left: 20px;margin-right: 20px;" @change="getShi">
<el-option v-for="item in inputCityList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
<el-select v-model="formobj.county" filterable placeholder="请选择县" class="addinputw" style="width:160px"
@change="getXian">
<el-option v-for="item in inputCountyList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
</div> </div>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">订单编号</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<!-- <span>{{temp.bankName}}</span> -->
<el-input v-model="formobj.orderNumber" placeholder="" style="width: 80%;" clearable />
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">合同日期</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<!-- <span>{{temp.bankAbbreviation}}</span> -->
<el-date-picker v-model="formobj.contractSigningDate" type="date" style="width: 80%;"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="请选择" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">供货商名称</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<!-- <span>{{temp.province}} - {{temp.city}} - {{temp.county}}</span> -->
<el-select v-model="formobj.supplierName" filterable placeholder="请选择供货商名称" style="width: 80%;"
@change="getSupplier">
<el-option v-for="item in supplierList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">付款日期</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<!-- <span>{{temp.address}}</span> -->
<el-date-picker v-model="formobj.paymentDate" type="date" format="yyyy-MM-dd" style="width: 80%;"
value-format="yyyy-MM-dd" placeholder="请选择" />
</el-form-item>
</el-col>
</el-row>
</div> <el-collapse v-model="activeNames">
<div class="item"> <el-collapse-item name="1">
<span class="item_text">库房面积</span> <template slot="title">
<el-input v-model="formobj.squareMeasure" placeholder="" class="item_input" style="width: 520px;" clearable /> 原料信息<span class="span" @click.stop="add()">添加</span>
</div> </template>
<div class="item"> <el-table v-loading="listLoading" :data="formobj.commodityList" border style="width: 100%;"
<span class="item_text">库房层高</span> :row-style="{height: '40px'}">
<el-input v-model="formobj.floorHeight" placeholder="" class="item_input" style="width: 520px;" clearable /> <!-- <el-table-column type="selection" align="center" width="50"/> -->
</div> <el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
<div class="item"> <el-table-column label="操作" wid align="center" width="150">
<span class="item_text">库房价格</span> <template slot-scope="scope">
<el-input v-model="formobj.price" placeholder="" class="item_input" style="width: 520px;" clearable /> <!-- <el-button type="primary" size="mini" @click="toPersonnelDetail(scope.row.sid)">查看</el-button> -->
</div> <!-- <el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button> -->
<div class="item"> <el-button type="primary" size="mini" @click="doCommoditylDel(scope.$index)">删除</el-button>
<span class="item_text">库房性质</span> </template>
<el-input v-model="formobj.properties" placeholder="" class="item_input" style="width: 520px;" clearable /> </el-table-column>
</div> <el-table-column label="原料名称" prop="crudeName" align="center">
<div class="item"> <template slot-scope="scope">
<span class="item_text">房源</span> <el-select v-model="scope.row.crudeName" filterable placeholder="请选择原油名称"
<el-input v-model="formobj.housingResources" placeholder="" class="item_input" @change="getType($event,scope.$index)">
style="width: 520px;" clearable /> <el-option v-for="item in crudeList" :key="item.sid" :label="item.name" :value="item.sid" />
</div> </el-select>
</template>
</el-table-column>
<el-table-column label="原料编码" prop="crudeNumber" align="center" />
<el-table-column label="单位" prop="sss" align="center" />
<el-table-column label="单价" prop="price" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.price" placeholder="" @input="limitInput1($event,scope.$index)"
clearable></el-input>
</template>
</el-table-column>
<el-table-column label="重量" prop="weight" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.weight" placeholder="" @input="limitInput2($event,scope.$index)"
clearable></el-input>
</template>
</el-table-column>
</el-table>
<div class="item"> </el-collapse-item>
<span class="item_text">联系人</span> </el-collapse>
<el-input v-model="formobj.contacts" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">联系电话</span>
<el-input v-model="formobj.telephone" placeholder="" maxlength="11" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">备注</span>
<el-input v-model="formobj.remarks" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
</el-card> </el-form>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import req from '@/api/rawMaterialProcure/rawMaterialProcure' import req from '@/api/oilTypeYuanliao/index'
import req2 from '@/api/oilTypeInAndOutBound/oilTypeInAndOutBound'
import req3 from '@/api/supplier/supplier'
export default { export default {
data() { data() {
return { return {
submitdisabled: false, submitdisabled: false,
crudeLists: [],
crudeList: [],
supplierLists: [],
supplierList: [],
listLoading: false,
activeNames: ['1'],
formobj: { formobj: {
sid: "", sid: "",
address: "", orderNumber: "",
squareMeasure: "", contractSigningDate: "",
floorHeight: "", paymentDate: "",
properties: "", supplierSid: "",
price: "", supplierName: "",
housingResources: "", commodityList: [],
province: '', }
city: "",
county: "",
contacts: "",
telephone: "",
remarks: ""
},
inputProvinceList: [],
inputCityList: [],
inputCountyList: [],
} }
}, },
created() { created() {
// this.huoquSheng() this.supplierInfoList()
this.crudeinfoList()
}, },
methods: { methods: {
saveOrUpdate() { supplierInfoList() {
req3.supplierList().then((res) => {
if (res.success) {
console.log(">>>>>>>>>2222222", res.data)
this.supplierLists = res.data
for (var i = 0; i < this.supplierLists.length; i++) {
console.log(">>>>>>>>>222222", this.formobj) let item = {
name: this.supplierLists[i].supplierName,
sid: this.supplierLists[i].sid,
}
this.supplierList.push(item)
}
}
})
},
crudeinfoList() {
req2.inventoryList().then((res) => {
if (res.success) {
console.log(">>>>>>>>>2222222", res.data)
this.crudeLists = res.data
for (var i = 0; i < this.crudeLists.length; i++) {
let item = {
name: this.crudeLists[i].name,
sid: this.crudeLists[i].sid,
}
this.crudeList.push(item)
}
}
})
},
/**
* 1必须为数字
* 2只能有一个小数点
* 3小数点后保留两位小数
* 4当第一位输入小数点的时候自动补全补为 0.
* 5除非是小数否则数字不能以0开头
* @param {string} value - 输入的值
* @param {string} index - 匹配的对象属性 [mkPrice | slPrice]
*/
limitInput1(value, index) {
this.formobj.commodityList[index].price =
("" + value) //
.replace(/[^\d^\.]+/g, "") //
.replace(/^0+(\d)/, "$1") // 00
.replace(/^\./, "0.") // 0.
.match(/^\d*(\.?\d{0,2})/g)[0] || ""; // 02
},
/**
* 1必须为数字
* 2只能有一个小数点
* 3小数点后保留两位小数
* 4当第一位输入小数点的时候自动补全补为 0.
* 5除非是小数否则数字不能以0开头
* @param {string} value - 输入的值
* @param {string} index - 匹配的对象属性 [mkPrice | slPrice]
*/
limitInput2(value, index) {
this.formobj.commodityList[index].weight =
("" + value) //
.replace(/[^\d^\.]+/g, "") //
.replace(/^0+(\d)/, "$1") // 00
.replace(/^\./, "0.") // 0.
.match(/^\d*(\.?\d{0,2})/g)[0] || ""; // 02
},
saveOrUpdate() {
if (this.formobj.sid) { if (this.formobj.sid) {
req.updateData(this.formobj) req.procureUpdateData(this.formobj)
.then(resp => { .then(resp => {
if (resp.success) { if (resp.success) {
this.$message({ this.$message({
@ -130,7 +240,7 @@
}) })
.catch(() => {}) .catch(() => {})
} else { } else {
req.addInfo(this.formobj) req.save(this.formobj)
.then(resp => { .then(resp => {
if (resp.success) { if (resp.success) {
this.$message({ this.$message({
@ -147,11 +257,27 @@
} }
}, },
submitData() {
req.submit(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
},
handleReturn(isreload) { handleReturn(isreload) {
console.log(">>>>>>>>>") console.log(">>>>>>>>>")
if (isreload === 'true') this.$emit('reloadlist') if (isreload === 'true') this.$emit('reloadlist')
if (this.formobj.psid) { if (this.formobj.sid) {
this.$emit('close', this.formobj.psid) this.$emit('close', this.formobj.sid)
} else { } else {
@ -159,26 +285,18 @@
} }
this.formobj = { this.formobj = {
sid: "", sid: "",
address: "", orderNumber: "",
squareMeasure: "", contractSigningDate: "",
floorHeight: "", paymentDate: "",
properties: "", supplierSid: "",
price: "", supplierName: "",
housingResources: "", commodityList: [],
province: '',
city: "",
county: "",
contacts: "",
telephone: "",
remarks: ""
} }
}, },
showAdd(sid) { showAdd() {},
this.formobj.psid = sid
},
showEdit(row) { showEdit(row) {
req.fetchBySid(row.sid) req.procureFetchBySid(row.sid)
.then(resp => { .then(resp => {
if (resp.success) { if (resp.success) {
this.formobj = resp.data this.formobj = resp.data
@ -189,141 +307,79 @@
this.formobj = row this.formobj = row
}) })
}, },
// -------------------------------------------------- getSupplier(value) {
huoquSheng() { console.log(">>>>>>>>>getType", value)
getProvince().then((res) => { const choose = this.supplierLists.filter((item) => item.sid === value)
if (res.success) { console.log(">>>>>>>>>getType", choose[0])
this.inputProvinceList = res.data this.formobj.supplierName = choose[0].supplierName
} this.formobj.supplierSid = value
})
}, },
getShen(value) { getType(value, index) {
let bb = '' console.log(">>>>>>>>>getType", value)
this.inputProvinceList.forEach((e) => { console.log(">>>>>>>>>getType", index)
if (e.sid === value) { const choose = this.crudeLists.filter((item) => item.sid === value)
bb = { console.log(">>>>>>>>>getType", choose[0])
name: e.name, this.formobj.commodityList[index].crudeNumber = choose[0].number
districtCode: e.districtCode, this.formobj.commodityList[index].crudeName = choose[0].name
sid: e.sid this.formobj.commodityList[index].typeSid = value
}
}
})
// codeprovince
this.formobj.province = bb.name
this.formobj.city = ""
this.formobj.county = ""
this.huoquShi(bb.sid)
}, },
huoquShi(sid1) {
var sid = { add() {
sid: sid1 this.formobj.commodityList.push({
}
getCity(sid).then((res) => {
if (res.success) {
this.inputCityList = res.data
}
})
},
getShi(value) {
let bb = ''
this.inputCityList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
}) })
this.formobj.city = bb.name
this.formobj.county = ""
this.huoquXian(bb.sid)
}, },
huoquXian(sid1) { doCommoditylDel(index) {
var sid = {
sid: sid1 const tip = '请确认是否删除所选记录?'
} this.$confirm(tip, '提示', {
getCounty(sid).then((res) => { confirmButtonText: '确定',
if (res.success) { cancelButtonText: '取消',
this.inputCountyList = res.data type: 'warning'
} }).then(() => {
this.formobj.commodityList.splice(index, 1);
}) })
}, },
getXian(value) {
let bb = '' //
this.inputCountyList.forEach((e) => { indexMethod(index) {
if (e.sid === value) { // var pagestart = (this.listQuery.current - 1) * this.listQuery.size
bb = { // var pageindex = index + 1 + pagestart
name: e.name, return index + 1
districtCode: e.districtCode,
sid: e.sid
}
}
})
this.formobj.county = bb.name
}, },
} }
} }
</script> </script>
<style lang="scss"> <style scoped>
.box-card { .trightb {
margin-left: 60px; display: flex;
margin-right: 60px; align-items: center;
margin-top: 20px; text-align: center;
justify-content: center;
.item { }
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
font-size: 18px;
text-align: right;
}
.item_input {
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_left_input {
width: 20%;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
}
.item_right {
flex: 1;
justify-items: center;
.item_right_list_text { .trightb_item {
font-size: 16px; padding-top: 5px;
} }
.item_right_list_delect { .span {
color: #5E94FF; margin-left: 50px;
margin-left: 20px; font-size: 15px;
font-size: 16px; font-weight: 400;
text-decoration: underline; }
}
}
} /deep/ .el-collapse-item__header {
height: 40px;
padding: 10px;
font-weight: bold;
font-size: 20px;
text-align: left;
color: #ffffff;
background-color: #0294d7;
}
/deep/ .el-collapse-item__content {
padding-bottom: 0;
} }
</style> </style>

197
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/business/rawMaterialProcure/rawMaterialProcureInfo.vue

@ -2,128 +2,93 @@
<div class="app-container"> <div class="app-container">
<div> <div>
<div class="tab-header webtop"> <div class="tab-header webtop">
<div>查看采购信息</div> <div>采购信息</div>
<div> <div>
<el-button type="primary" size="small" v-show="formobj.state<=5" :disabled="submitdisabled"
@click="submitData">提交</el-button>
<!-- <el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> -->
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button> <el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button>
</div> </div>
</div> </div>
<div class="listconadd"> <div class="listconadd">
<el-form ref="dataForm" :model="temp" label-position="top" label-width="190px" class="formadd"> <el-form ref="dataForm" :model="formobj" label-position="top" label-width="190px" class="formadd">
<div class="titwu">采购信息</div> <div class="titwu">采购信息</div>
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px"> <div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
<div>基本信息</div> <div>主体信息</div>
</div> </div>
<el-row> <el-row>
<el-col :span="4" class="trightb"> <el-col :span="4" class="trightb">
<el-form-item class="trightb_item"> <el-form-item class="trightb_item">
<span slot="label">库房位置</span> <span slot="label">合同编号</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="trightb_item"> <el-form-item class="trightb_item">
<span>{{temp.address}}</span> <span>{{formobj.orderNumber}}</span>
</el-form-item> <!-- <el-input v-model="formobj.orderNumber" placeholder="" style="width: 80%;" clearable /> -->
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">--</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.province}} - {{temp.city}} - {{temp.county}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">库房面积</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.squareMeasure}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">库房层高</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.floorHeight}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">库房价格</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.price}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">库房性质</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.properties}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">房源</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.housingResources}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" class="trightb"> <el-col :span="4" class="trightb">
<el-form-item class="trightb_item"> <el-form-item class="trightb_item">
<span slot="label">备注</span> <span slot="label">合同日期</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="trightb_item"> <el-form-item class="trightb_item">
<span>{{temp.remarks}}</span> <span>{{formobj.contractSigningDate}}</span>
<!-- <el-date-picker v-model="formobj.contractSigningDate" type="date" style="width: 80%;"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="请选择" /> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="4" class="trightb"> <el-col :span="4" class="trightb">
<el-form-item class="trightb_item"> <el-form-item class="trightb_item">
<span slot="label">联系人</span> <span slot="label">供货商名称</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="trightb_item"> <el-form-item class="trightb_item">
<span>{{temp.contacts}}</span> <span>{{formobj.supplierName}}</span>
<!-- <el-select v-model="formobj.supplierName" filterable placeholder="请选择供货商名称" style="width: 80%;"
@change="getSupplier">
<el-option v-for="item in supplierList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" class="trightb"> <el-col :span="4" class="trightb">
<el-form-item class="trightb_item"> <el-form-item class="trightb_item">
<span slot="label">联系电话</span> <span slot="label">到货日期</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="trightb_item"> <el-form-item class="trightb_item">
<span>{{temp.telephone}}</span> <span>{{formobj.arrivalDate}}</span>
<!-- <el-date-picker v-model="formobj.arrivalDate" type="date" format="yyyy-MM-dd" style="width: 80%;"
value-format="yyyy-MM-dd" placeholder="请选择" /> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-collapse v-model="activeNames">
<el-collapse-item name="1" title="商品信息">
<!-- <template slot="title" title="商品信息">
商品信息<span class="span" @click.stop="add()">添加</span>
</template> -->
<el-table v-loading="listLoading" :data="formobj.commodityList" border style="width: 100%;"
:row-style="{height: '40px'}">
<!-- <el-table-column type="selection" align="center" width="50"/> -->
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
<el-table-column label="商品名称" prop="name" align="center" />
<el-table-column label="商品编码" prop="number" align="center" />
<el-table-column label="单位" prop="sss" align="center" />
<el-table-column label="单价" prop="price" align="center" />
<el-table-column label="重量" prop="weight" align="center" />
</el-table>
</el-collapse-item>
</el-collapse>
</el-form> </el-form>
@ -133,34 +98,88 @@
</template> </template>
<script> <script>
import req from '@/api/rawMaterialProcure/rawMaterialProcure' import req from '@/api/oilTypeProcure/oilTypeProcure'
export default { export default {
name: 'CustomerManagementInfo',
data() { data() {
return { return {
temp: {} // submitdisabled: false,
listLoading: false,
activeNames: ['1'],
formobj: {
sid: "",
orderNumber: "",
contractSigningDate: "",
arrivalDate: "",
supplierSid: "",
supplierName: "",
commodityList: [],
}
} }
}, },
methods: {
submitData() {
console.log(">>>>>>>>>submit", this.formobj)
if (this.formobj.state = 5) {
//
} else {
//
req.procureAddSubmitInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
}
methods: {
showAdd(sid) { },
req.fetchBySid(sid) handleReturn(isreload) {
console.log(">>>>>>>>>")
if (isreload === 'true') this.$emit('reloadlist')
this.$emit('doback')
this.formobj = {
sid: "",
orderNumber: "",
contractSigningDate: "",
arrivalDate: "",
supplierSid: "",
supplierName: "",
commodityList: [],
}
},
showAdd(row) {
console.log(">>>>>>>>>", row)
req.procureFetchBySid(row.sid)
.then(resp => { .then(resp => {
if (resp.success) { if (resp.success) {
this.temp = resp.data this.formobj = resp.data
} }
}) })
.catch(e => { .catch(e => {
this.$emit('doback') this.formobj = row
}) })
}, },
// //
handleReturn() { indexMethod(index) {
this.$emit('doback') // var pagestart = (this.listQuery.current - 1) * this.listQuery.size
} // var pageindex = index + 1 + pagestart
return index + 1
},
} }
} }
</script> </script>

Loading…
Cancel
Save