This commit is contained in:
cun-nan 2024-10-15 14:27:49 +08:00
parent 15d9031179
commit 977648f815
5 changed files with 129 additions and 68 deletions

View File

@ -32,7 +32,7 @@ module.exports = {
productionSourceMap: false,
// webpack-dev-server 相关配置
devServer: {
host: '192.168.31.178',
host: '0.0.0.0',
port: port,
open: true,
proxy: {

View File

@ -1,11 +1,10 @@
# \u57FA\u672C\u914D\u7F6E
server.port=8080
env.profile=dev
#env.properties.path=D:/workspaces/oil-stations/fuintBackend/configure/
env.properties.path=D:/workspaces/oil-stations/fuintBackend/configure/
#env.properties.path=F:/work/oilSystem/fuintBackend/configure/
#env.properties.path=D:/oil/new-oil/oilSystem/fuintBackend/configure/
env.properties.path=D:/code/bulidmap/oil-station/fuintBackend/configure
#env.properties.path=D:/Code/yuzhan/oil-station/fuintBackend/configure
#env.properties.path=D:/work/oilSystem/fuintBackend/configure/
#env.properties.path=/www/wwwroot/shenlanshuke/oilAdmin/
# \u6570\u636E\u5E93\u914D\u7F6E
@ -18,6 +17,7 @@ spring.task.scheduling.pool.size=5
logging.level.com.fuint=info
multipart.max-file-size=20mb
multipart.max-request-size=20mb
# \u6700\u5927\u4E0A\u4F20\u6587\u4EF6
spring.servlet.multipart.max-file-size=10MB
spring.servlet.multipart.max-request-size=10MB

View File

@ -411,7 +411,7 @@
width="542px"
center
>
<accountPending></accountPending>
<accountPending :amount="oilGunClearing.amount" @changeAmount="changeAmount"></accountPending>
<span slot="footer" class="dialog-footer">
<el-button @click="accountPending = false"> </el-button>
<el-button type="primary" @click="accountPending = false"> </el-button>
@ -617,7 +617,9 @@ export default {
//
oilGun: '',
//
oilGunClearing: '',
oilGunClearing: {
amount:0
},
//
goodsList: [],
restaurants: [],
@ -1803,11 +1805,25 @@ export default {
}
},
changeAmount(val){
console.log(val,1807)
},
/**
* 设置选中的支付方式
* @param value
*/
setindex(value) {
if (value=='after_pay'){
if (this.getGoodsNum>0){
this.$message.error("商品订单不支持挂账")
return
}
if (this.oilGunClearing.amount<=0){
this.$message.error("请选择挂账订单")
return;
}
this.accountPending = true
}
console.log('支付方式',value);
this.payType = value
//

View File

@ -1,43 +1,26 @@
<script >
<script>
import {listCreditUnit} from "../../../../api/cashier/creditunit";
export default {
props:['amount'],
data() {
return {
ruleForm: {
name: '',
region: '',
date1: '',
date2: '',
delivery: false,
type: [],
resource: '',
desc: ''
},
ruleForm: {},
unitList:[],
rules: {
name: [
{ required: true, message: '请输入活动名称', trigger: 'blur' },
{ min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
unitName: [
{required: true, message: '请输入挂账单位名称', trigger: 'blur'},
],
region: [
{ required: true, message: '请选择活动区域', trigger: 'change' }
amount: [
{required: true, message: '请输入活动名称', trigger: 'blur'},
],
date1: [
{ type: 'date', required: true, message: '请选择日期', trigger: 'change' }
],
date2: [
{ type: 'date', required: true, message: '请选择时间', trigger: 'change' }
],
type: [
{ type: 'array', required: true, message: '请至少选择一个活动性质', trigger: 'change' }
],
resource: [
{ required: true, message: '请选择活动资源', trigger: 'change' }
],
desc: [
{ required: true, message: '请填写活动形式', trigger: 'blur' }
]
}
};
},
created() {
this.getUnitList()
this.ruleForm.amount = this.amount
},
methods: {
submitForm(formName) {
this.$refs[formName].validate((valid) => {
@ -51,45 +34,107 @@ export default {
},
resetForm(formName) {
this.$refs[formName].resetFields();
},
//
getUnitList() {
let obj = {};
let _this = this;
listCreditUnit().then(response => {
response.data.forEach(item => {
obj = item;
obj.value = `${item.unitName}${item.personCredit} ${item.contactMobile}`
_this.unitList.push(obj)
})
})
},
//
changeUnit(val) {
this.ruleForm.creditUnitId = val.id;
this.ruleForm.creditLimit = val.creditLimit
this.ruleForm.residueCreditLimit = val.residueCreditLimit
this.$emit('changeAmount',this.ruleForm)
return val.id
},
async querySearch1(queryString, cb) {
await this.getUnitList();
let _this = this;
let obj = {};
let results = _this.unitList
if (queryString) {
_this.unitList.forEach(item => {
results = [];
if (item.unitName.includes(queryString)) {
obj = item;
obj.value = `${item.unitName}${item.personCredit} ${item.contactMobile}`
results.push(obj)
return;
}
if (item.personCredit.includes(queryString)) {
obj = item;
obj.value = `${item.unitName}${item.personCredit} ${item.contactMobile}`
results.push(obj)
return;
}
if (item.contactMobile.includes(queryString)) {
obj = item;
obj.value = `${item.unitName}${item.personCredit} ${item.contactMobile}`
results.push(obj)
return;
}
})
}
cb(results);
},
changeAmount(){
this.$emit('changeAmount',this.ruleForm)
this.$forceUpdate()
},
}
}
</script>
<template>
<div>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="挂账单位" prop="region" style="width: 396px">
<el-select v-model="ruleForm.region" placeholder="请选择挂账单位">
<el-option label="挂账单位一" value="shanghai"></el-option>
<el-option label="挂账单位二" value="beijing"></el-option>
</el-select>
<div>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px" class="demo-ruleForm">
<el-form-item label="挂账单位" prop="unitName">
<el-autocomplete
popper-class="my-autocomplete"
v-model="ruleForm.unitName"
:fetch-suggestions="querySearch1"
:trigger-on-focus="false"
style="width: 100%"
placeholder="请选择挂账单位"
@select="changeUnit">
<template slot-scope="{ item }">
<div style="display: flex;justify-content: space-between">
{{ item.unitName }}{{ item.personCredit }} {{ item.contactMobile }}
</div>
</template>
</el-autocomplete>
</el-form-item>
<el-form-item label="可用额度" prop="name" style="width: 396px">
<el-input v-model="ruleForm.name">
<el-form-item label="可用额度" prop="residueCreditLimit">
<el-input v-model="ruleForm.residueCreditLimit" disabled>
<template slot="append"></template>
</el-input>
<div class="hui-size">可用额度为挂账人的最大可用额度,如挂账金额大于可用额度,将无法进行挂账</div>
</el-form-item>
<el-form-item label="挂帐金额" prop="name" style="width: 396px">
<el-input v-model="ruleForm.name">
<el-form-item label="挂帐金额" prop="amount">
<el-input v-model="ruleForm.amount" @input="changeAmount()">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="备注" prop="desc" style="width: 396px">
<el-input type="textarea" v-model="ruleForm.desc"></el-input>
</el-form-item>
<el-form-item>
<el-form-item label="备注" prop="remark">
<el-input type="textarea" v-model="ruleForm.remark"></el-input>
</el-form-item>
</el-form>
</div>
</div>
</template>
<style scoped lang="scss">
.hui-size{
.hui-size {
font-size: 12px;
color: #999999;
}

View File

@ -5,8 +5,8 @@ module.exports = {
// baseUrl: 'https://www.tuofeng.cc/oilAdmin/',
// baseUrl: 'https://oilapi.youkerr.com/oilAdmin/',
// baseUrl: 'https://8q4f124343.yicp.fun/',
// baseUrl: 'http://192.168.31.95:8080/',
baseUrl: 'http://localhost:8080/',
baseUrl: 'http://47.94.122.58:8080/',
// baseUrl: 'http://localhost:8080/',
// baseUrl: 'http://192.168.1.5:8002/cdJdc',
imagesUrl: 'http://www.nuoyunr.com/lananRsc',
// 应用信息