fengdong777 2 years ago
parent
commit
a5602829c1
  1. 4
      yxt-portal-ui/.env.development
  2. 51
      yxt-portal-ui/src/layout/components/Sidebar/index.vue
  3. 4
      yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development
  4. 26
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTypeYuanliao/index.js
  5. 17
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/business/rawMaterialProcure/index.vue
  6. 29
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/business/rawMaterialProcure/rawMaterialProcureAdd.vue
  7. 139
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/business/rawMaterialProcure/rawMaterialProcureInfo.vue

4
yxt-portal-ui/.env.development

@ -5,5 +5,5 @@ ENV = 'development'
VUE_APP_BASE_API = '/api'
## 配置测试和本地开发时的 接口地址
VUE_APP_URL = "http://127.0.0.1:8112"
##VUE_APP_URL = "http://8.130.39.13:8112"
# VUE_APP_URL = "http://127.0.0.1:8112"
VUE_APP_URL = "http://8.130.39.13:8112"

51
yxt-portal-ui/src/layout/components/Sidebar/index.vue

@ -19,7 +19,7 @@
<template v-else>-->
<el-menu-item :index="item.path" :key="index">
<!-- <i :class="item.icon"></i> -->
<span slot="title">{{ item.name }}</span>
<span slot="title"><i class="icon" :class="item.icon"></i><span style="margin-left: 10px;">{{ item.name }}</span></span>
</el-menu-item>
</template>
<!--</template>-->
@ -30,10 +30,10 @@
/>-->
<el-submenu index="/workflow">
<template slot="title">
<span>工作流</span>
<span class="workflow"><i class="el-icon-menu"></i><span>工作流</span></span>
</template>
<el-menu-item index="/workflow/definition">流程定义</el-menu-item>
<el-menu-item index="/workflow/form">表单配置</el-menu-item>
<el-menu-item index="/workflow/definition"><span class="liucheng"><i class="el-icon-help"></i><span>流程定义</span></span></el-menu-item>
<el-menu-item index="/workflow/form"><span class="liucheng"><i class="el-icon-help"></i><span>表单配置</span></span></el-menu-item>
</el-submenu>
</el-menu>
@ -48,8 +48,12 @@
import variables from '@/styles/variables.scss'
import {getrolemenus} from '@/api/system/Role/role.js'
import Layout from '@/layout'
import SidebarItem from './SidebarItem'
export default {
components: {
SidebarItem,
Logo
},
data() {
return {
routes: []
@ -129,30 +133,49 @@
redirect: menus[i].path,
children: [menus[i]],
name: menus[i].meta.title,
icon: menus[i].meta.icon,
}
}
}
this.routes = menus
console.log(this.routes);
return menus
}
}
}
</script>
<style scoped>
/deep/ .el-submenu__title {
height: 28px !important;
line-height: 28px !important;
font-size: 16px!important;
}
/deep/ .el-submenu .el-menu-item {
height: 28px !important;
line-height: 28px !important;
height: 40px !important;
line-height: 40px !important;
}
/deep/ .el-menu-item {
height: 28px !important;
line-height: 28px !important;
height: 40px !important;
line-height: 40px !important;
font-size: 16px!important;
}
/deep/ .el-submenu__title {
height: 40px !important;
line-height: 40px !important;
font-size: 16px!important;
}
.icon{
color:#fff;
font-size: 18px;
line-height: 40px;
}
.workflow i{
padding-right: 5px;
}
.workflow span{
margin-left: 3px;
}
.liucheng i{
color:#fff;
font-size: 18px;
line-height: 40px;
}
</style>

4
yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development

@ -6,8 +6,8 @@ VUE_APP_BASE_API = '/api'
## 配置测试和本地开发时的 接口地址
## VUE_APP_URL = "http://cg9jzr.natappfree.cc"
##VUE_APP_URL = "http://192.168.1.177:7101"
VUE_APP_URL = "http://192.168.1.105:7101"
VUE_APP_URL = "http://192.168.1.193:7101"
# VUE_APP_URL = "http://192.168.1.193:7101"
##VUE_APP_URL = "http://8.130.39.13:8112"

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

@ -26,7 +26,18 @@ export default {
}
})
},
// 编辑原料
update: function(params) {
return request({
url: '/cyf/materialProcurement/update',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json',
'token': tokens
}
})
},
// 新增
save: function(data) {
return request({
@ -35,11 +46,18 @@ export default {
data: data
});
},
// 初始化
procureFetchBySid: function(sid) {
getMaterialProcurementBySid: function(sid) {
return request({
url: '/v1/warehouselocation/getWarehouseBySid/' + sid
url: '/cyf/materialProcurement/getMaterialProcurementBySid/' + sid
})
},
// 删除
procureDelBySids: function(sid) {
return request({
url: '/cyf/materialProcurement/delete/' + sid,
method: 'delete'
})
},
}

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

@ -46,11 +46,11 @@
</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="paymentDate" width="100" align="center" />
<el-table-column label="合同日期" prop="contractSigningDate" width="120" align="center" />
<el-table-column label="到货日期" prop="arrivalDate" width="120" 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="amount" width="100" align="center" />
<el-table-column label="总价值" prop="totalValue" width="120" align="center" />
<el-table-column label="原料数量" prop="amount" width="120" align="center" />
<el-table-column label="订单状态" prop="stateValue" width="150" align="center" />
</el-table>
</div>
@ -176,8 +176,7 @@
orderNumber: '',
date: '',
tradeName: '',
// type: '1', // 1 2 3
state: "1", // 1 2 3 4 5 6 7
// state: "1", // 1 2 3 4 5 6 7
},
total: 0
},
@ -190,8 +189,8 @@
orderNumber: '',
date: '',
tradeName: '',
type: '1', // 1 2 3
state: "1", // 1 2 3 4 5 6 7
type: '3', // 1 2 3
// state: "1", // 1 2 3 4 5 6 7
},
total: 0
},
@ -425,7 +424,7 @@
},
toDetail(row) {
this.viewState = 4
this.$refs['divInfo'].showAdd(row.sid)
this.$refs['divInfo'].showAdd(row)
},
resetState() {
this.viewState = 1

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

@ -57,13 +57,13 @@
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">付款日期</span>
<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%;"
<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-col>
@ -85,15 +85,15 @@
<el-button type="primary" size="mini" @click="doCommoditylDel(scope.$index)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="原料名称" prop="crudeName" align="center">
<el-table-column label="原料名称" prop="name" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.crudeName" filterable placeholder="请选择原名称"
<el-select v-model="scope.row.name" filterable placeholder="请选择原名称"
@change="getType($event,scope.$index)">
<el-option v-for="item in crudeList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
</template>
</el-table-column>
<el-table-column label="原料编码" prop="crudeNumber" 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">
<template slot-scope="scope">
@ -139,7 +139,7 @@
sid: "",
orderNumber: "",
contractSigningDate: "",
paymentDate: "",
arrivalDate: "",
supplierSid: "",
supplierName: "",
commodityList: [],
@ -225,7 +225,7 @@
},
saveOrUpdate() {
if (this.formobj.sid) {
req.procureUpdateData(this.formobj)
req.update(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
@ -274,20 +274,20 @@
.catch(() => {})
},
handleReturn(isreload) {
console.log(">>>>>>>>>")
if (isreload === 'true') this.$emit('reloadlist')
if (this.formobj.sid) {
this.$emit('close', this.formobj.sid)
} else {
this.$emit('doback')
}
this.$emit('doback')
this.formobj = {
sid: "",
orderNumber: "",
contractSigningDate: "",
paymentDate: "",
arrivalDate: "",
supplierSid: "",
supplierName: "",
commodityList: [],
@ -296,12 +296,11 @@
},
showAdd() {},
showEdit(row) {
req.procureFetchBySid(row.sid)
req.getMaterialProcurementBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = row
@ -319,9 +318,9 @@
console.log(">>>>>>>>>getType", index)
const choose = this.crudeLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getType", choose[0])
this.formobj.commodityList[index].crudeNumber = choose[0].number
this.formobj.commodityList[index].crudeName = choose[0].name
this.formobj.commodityList[index].typeSid = value
this.formobj.commodityList[index].number = choose[0].number
this.formobj.commodityList[index].name = choose[0].name
this.formobj.commodityList[index].sid = value
},
add() {

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

@ -64,12 +64,101 @@
<el-col :span="8">
<el-form-item class="trightb_item">
<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-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">
<el-date-picker v-model="formobj.paymentDate" type="date" style="width: 80%;" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" placeholder="请选择" />
<!-- <span>{{formobj.supplierName}}</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>{{formobj.arrivalDate}}</span> -->
<el-input v-model="formobj.payment" placeholder="" @input="limitInput($event)" style="width: 80%;"
clearable />
</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">
<el-input v-model="formobj.payer" placeholder="" style="width: 80%;" clearable />
<!-- <span>{{formobj.supplierName}}</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>{{formobj.arrivalDate}}</span> -->
<el-input v-model="formobj.payerBank" placeholder="" style="width: 80%;" clearable />
</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">
<el-input v-model="formobj.payee" placeholder="" style="width: 80%;" clearable />
<!-- <span>{{formobj.supplierName}}</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>{{formobj.arrivalDate}}</span> -->
<el-input v-model="formobj.payeeBank" placeholder="" style="width: 80%;" clearable />
</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="20">
<el-form-item class="trightb_item">
<el-input v-model="formobj.paymentSummary" placeholder="" type="textarea" :rows="5" style="width: 100%;"
clearable />
<!-- <span>{{formobj.supplierName}}</span> -->
</el-form-item>
</el-col>
</el-row>
<el-collapse v-model="activeNames">
<el-collapse-item name="1" title="商品信息">
<!-- <template slot="title" title="商品信息">
@ -98,7 +187,7 @@
</template>
<script>
import req from '@/api/oilTypeProcure/oilTypeProcure'
import req from '@/api/oilTypeYuanliao/index.js'
export default {
data() {
@ -113,20 +202,43 @@
arrivalDate: "",
supplierSid: "",
supplierName: "",
paymentDate: "",
payment: "",
payer: "",
state: "",
payerBank: "",
payee: "",
payeeBank: "",
paymentSummary: "",
commodityList: [],
}
}
},
methods: {
/**
* 1必须为数字
* 2只能有一个小数点
* 3小数点后保留两位小数
* 4当第一位输入小数点的时候自动补全补为 0.
* 5除非是小数否则数字不能以0开头
* @param {string} value - 输入的值
* @param {string} index - 匹配的对象属性 [mkPrice | slPrice]
*/
limitInput(value) {
this.formobj.payment =
("" + value) //
.replace(/[^\d^\.]+/g, "") //
.replace(/^0+(\d)/, "$1") // 00
.replace(/^\./, "0.") // 0.
.match(/^\d*(\.?\d{0,2})/g)[0] || ""; // 02
},
submitData() {
console.log(">>>>>>>>>submit", this.formobj)
if (this.formobj.state = 5) {
if (this.formobj.state == 5) {
//
} else {
//
req.procureAddSubmitInfo(this.formobj)
req.submit(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
@ -145,9 +257,7 @@
},
handleReturn(isreload) {
console.log(">>>>>>>>>")
if (isreload === 'true') this.$emit('reloadlist')
this.$emit('doback')
this.formobj = {
sid: "",
@ -156,13 +266,20 @@
arrivalDate: "",
supplierSid: "",
supplierName: "",
paymentDate: "",
payment: "",
payer: "",
payerBank: "",
payee: "",
payeeBank: "",
paymentSummary: "",
commodityList: [],
}
},
showAdd(row) {
console.log(">>>>>>>>>", row)
req.procureFetchBySid(row.sid)
req.getMaterialProcurementBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
@ -187,7 +304,7 @@
.trightb {
display: flex;
align-items: center;
text-align: ;
text-align: center;
justify-content: center;
}

Loading…
Cancel
Save