Merge branch 'main-20240105' of http://139.224.253.31:3000/hym/lyr-one-mobile into main-20240105
commit
8e5da8c9a4
@ -0,0 +1,37 @@
|
||||
import request from '@/plugin/axios'
|
||||
|
||||
// 创建供应商合同
|
||||
export function getFieldTemplate(type) {
|
||||
return request({
|
||||
url: '/bs/field-template/type/' + type,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function addFieldTemplate(data) {
|
||||
return request({
|
||||
url: '/bs/field-template/addField',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function deleteField(field,type) {
|
||||
return request({
|
||||
url: '/bs/field-template/'+field+'/'+type,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
export function queryOption(field,type) {
|
||||
return request({
|
||||
url: '/bs/field-template/option/'+field+'/'+type,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function queryFieldTemplate(type) {
|
||||
return request({
|
||||
url: '/bs/field-template/type/'+type,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
<!-- 修改支付方式 -->
|
||||
<template>
|
||||
<div>
|
||||
<van-popup v-model="newIsShow" position="bottom" :close-on-click-overlay="false" @close="hanleCancel" get-container="#app" closeable>
|
||||
<div class="det-form-header">付款确认</div>
|
||||
<div class="det-form">
|
||||
<van-form ref="form" :show-error-message="false" validate-trigger="" :submit-on-enter="false">
|
||||
<van-field label="是否核销" name="cancelAfterVerification" required input-align="right" label-width="9em" :rules="[{ required: true, message: '请选择是否核销' }]">
|
||||
<template #input>
|
||||
<van-radio-group v-model="form.cancelAfterVerification" direction="horizontal">
|
||||
<van-radio :name="1">是</van-radio>
|
||||
<van-radio :name="0">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="附件" input-align="right" label-width="9em">
|
||||
<template #input>
|
||||
<UploadFile @onConfirm="handleUpload" @onShow="handleOnShow" typeStr="PayConfirmToast" :fileList="fileList" />
|
||||
</template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
<div class="dept-form-footer">
|
||||
<van-button class="btn" native-type="buttton" @click.stop="hanleCancel" :loading="loading">取消</van-button>
|
||||
<van-button class="btn" type="info" native-type="buttton" @click.stop="handleSave" :loading="loading">确定</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import { confirmApi } from "@/api/bs/paymentApply";
|
||||
export default {
|
||||
props: {
|
||||
isShow: Boolean,
|
||||
pId: [String, Number], // 列表id,
|
||||
},
|
||||
name: '',
|
||||
components: {
|
||||
UploadFile: () => import('@/components/UploadFile')
|
||||
},
|
||||
activated() {
|
||||
console.log('this.isShow...', this.isShow);
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
form: {
|
||||
cancelAfterVerification: null
|
||||
},
|
||||
fileList: [],
|
||||
newIsShow: false
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
isShow: {
|
||||
handler(val) {
|
||||
if (val) {
|
||||
this.handleInitForm()
|
||||
}
|
||||
this.newIsShow = val
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
roleFlag: state => state.common.user.info.roleFlag
|
||||
}),
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleOnShow() {
|
||||
this.$emit('onShow')
|
||||
},
|
||||
handleUpload(list) {
|
||||
this.fileList = list
|
||||
},
|
||||
handleInitForm() {
|
||||
this.$nextTick(() => {
|
||||
this.form.cancelAfterVerification = null
|
||||
this.fileList = []
|
||||
this.$refs.form.resetValidation()
|
||||
})
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.form.validate().then(() => {
|
||||
this.loading = true
|
||||
let form = {
|
||||
id: this.pId,
|
||||
files: this.fileList
|
||||
}
|
||||
confirmApi(form).then(() => {
|
||||
this.loading = false
|
||||
this.$sm('付款确认成功!')
|
||||
this.$emit('onCompelete')
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}).catch((err) => {
|
||||
if (err && err.length > 0 && err[0].name) {
|
||||
if (err[0].name === 'cancelAfterVerification') {
|
||||
this.$fm(err[0].message)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
hanleCancel() {
|
||||
this.$emit('onClose')
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
// @import './index.scss';
|
||||
@import '~@/assets/style/order/btnPublic.scss';
|
||||
</style>
|
Loading…
Reference in New Issue