Browse Source

客户、调账

master
Zhao Qiqi 3 years ago
parent
commit
ab40f0f763
  1. 26
      anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/kehudangan/kehudanganAdd.vue
  2. 2
      anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/kehudangan/kehudanganinfo.vue
  3. 38
      anrui-scm/anrui-scm-ui/src/api/supplychain/tiaozhangshenqing.js
  4. 87
      anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanli.vue
  5. 150
      anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliAdd.vue

26
anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/kehudangan/kehudanganAdd.vue

@ -192,8 +192,9 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="idnumber"> <el-form-item prop="idnumber">
<el-input v-model="temp.idnumber" style="width:50%" maxlength="20" placeholder="请输入证件号码" <el-input v-model="temp.idnumber" style="width:50%" maxlength="18 || 9" placeholder="请输入证件号码"
class="addinputw" clearable/> class="addinputw" clearable
@keyup.native="temp.idnumber = oninput(temp.idnumber)"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -458,7 +459,8 @@ export default {
}; };
var identitycard = (rules, value, callback) => { var identitycard = (rules, value, callback) => {
const card = const card =
/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/ /[^0-9.]/
// /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
if (value) { if (value) {
if (!card.test(value)) { if (!card.test(value)) {
callback(new Error('请输入身份证号码')) callback(new Error('请输入身份证号码'))
@ -610,7 +612,7 @@ export default {
idnumber: [ idnumber: [
{ {
required: true, required: true,
validator: identitycard, // validator: identitycard,
trigger: 'blur', trigger: 'blur',
}, },
], ],
@ -635,6 +637,22 @@ export default {
// //
}, },
methods: { methods: {
oninput(val, limit = 0) {
val = val.replace(/[^\d.]/g, '') //
val = val.replace(/^00/, '0.') //0
// val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); //
// /^0\d+/.test(val) ? val = val.slice(1) : '' //0
// const str = '^(\\d+)\\.(\\d{' + limit + '}).*$'
// const reg = new RegExp(str)
// if (limit === 0) {
// //
// val = val.replace(reg, '$1')
// } else {
// //
// val = val.replace(reg, '$1.$2')
// }
return val
},
// //
init() { init() {
this.getShuJUZiDian() this.getShuJUZiDian()

2
anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/kehudangan/kehudanganinfo.vue

@ -301,7 +301,7 @@
<el-form-item> <el-form-item>
<div class="yihang"> <div class="yihang">
<el-checkbox-group v-if="aseType.length > 0" v-model="aseTypeBox"> <el-checkbox-group v-if="aseType.length > 0" v-model="aseTypeBox">
<el-checkbox v-for="item in aseType" :key="item.divtkey" :label="item.divtkey">{{ item.dictValue }}</el-checkbox> <el-checkbox disabled v-for="item in aseType" :key="item.divtkey" :label="item.divtkey">{{ item.dictValue }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<div class="mw"> <div class="mw">

38
anrui-scm/anrui-scm-ui/src/api/supplychain/tiaozhangshenqing.js

@ -1 +1,39 @@
import request from '@/utils/request' import request from '@/utils/request'
// 获取调账列表
export function listPage(data) {
return request({
url: '/base/v1/baseaccadjapply/listPage',
data,
method: 'post',
headers: { 'Content-Type': 'application/json' }
})
}
// 批量删除调账列表数据
export function delBySids(data) {
return request({
url: '/base/v1/baseaccadjapply/delBySids',
data,
method: 'DELETE',
headers: { 'Content-Type': 'application/json' }
})
}
// 获取调账列表
export function save(data) {
return request({
url: '/base/v1/baseaccadjapply/save',
data,
method: 'post',
headers: { 'Content-Type': 'application/json' }
})
}
// 获取调账列表
export function fetchDetailsBySid(data) {
return request({
url: '/base/v1/baseaccadjapply/fetchDetailsBySid/' + data,
method: 'get',
})
}

87
anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanli.vue

@ -10,29 +10,29 @@
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form :inline="true" class="tab-header"> <el-form :inline="true" class="tab-header">
<el-form-item label="调帐类型"> <el-form-item label="调帐类型">
<el-select v-model="listQuery.params.purchaseType" placeholder="请选择" clearable class="addinputw"> <el-select v-model="listQuery.params.accadjTypeKey" placeholder="请选择" clearable class="addinputw">
<el-option v-for="item in purchaseType_list" :key="item.dictKey" :label="item.dictValue" <el-option v-for="item in accadjType_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictKey"/> :value="item.dictKey"/>
</el-select> </el-select>
<!-- <el-input v-model="listQuery.params.vin" placeholder="请输入车架号" clearable/>--> <!-- <el-input v-model="listQuery.params.vin" placeholder="请输入车架号" clearable/>-->
</el-form-item> </el-form-item>
<el-form-item label="调出分公司"> <el-form-item label="调出分公司">
<el-select v-model="listQuery.params.purchaseType" placeholder="请选择" clearable class="addinputw"> <el-select v-model="listQuery.params.callOutOrgSid" placeholder="请选择" clearable class="addinputw">
<el-option v-for="item in purchaseType_list" :key="item.dictKey" :label="item.dictValue" <el-option v-for="item in useOrg_list" :key="item.sid" :label="item.name"
:value="item.dictKey"/> :value="item.sid"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="调入分公司"> <el-form-item label="调入分公司">
<el-select v-model="listQuery.params.purchaseType" placeholder="请选择" clearable class="addinputw"> <el-select v-model="listQuery.params.callInOrgSid" placeholder="请选择" clearable class="addinputw">
<el-option v-for="item in purchaseType_list" :key="item.dictKey" :label="item.dictValue" <el-option v-for="item in useOrg_list" :key="item.sid" :label="item.name"
:value="item.dictKey"/> :value="item.sid"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="申请日期:"> <el-form-item label="申请日期:">
<el-date-picker v-model="listQuery.params.applicationStartDate" class="filter-item" type="date" <el-date-picker v-model="listQuery.params.applyStartDate" class="filter-item" type="date"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="请选择"/> format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="请选择"/>
<label></label> <label></label>
<el-date-picker v-model="listQuery.params.applicationEndDate" class="filter-item" type="date" <el-date-picker v-model="listQuery.params.applyEndDate" class="filter-item" type="date"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="请选择"/> format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="请选择"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -61,10 +61,10 @@
<el-button size="mini" type="primary" @click="handleCheck(row)">查看</el-button> <el-button size="mini" type="primary" @click="handleCheck(row)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="140px" prop="vin" label="申请日期" align="center"/> <el-table-column width="140px" prop="applyDate" label="申请日期" align="center"/>
<el-table-column width="120px" prop="model" label="调账类型" align="center"/> <el-table-column width="120px" prop="accadjTypeValue" label="调账类型" align="center"/>
<el-table-column prop="purchaseType" label="调出分公司" align="center"/> <el-table-column prop="callOutOrgName" label="调出分公司" align="center"/>
<el-table-column prop="dispatchedDate" label="调入分公司" align="center"/> <el-table-column prop="callInOrgName" label="调入分公司" align="center"/>
</el-table> </el-table>
</div> </div>
<!--End 项目列表--> <!--End 项目列表-->
@ -99,8 +99,10 @@ import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import tiaozhangshenqingguanliAdd from '@/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliAdd' import tiaozhangshenqingguanliAdd from '@/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliAdd'
import tiaozhangshenqingguanliInfo from '@/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliInfo' import tiaozhangshenqingguanliInfo from '@/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliInfo'
import { deleteCarTransfer } from '@/api/supplychain/cunfangdidianbiangeng' import { listPage,delBySids } from '@/api/supplychain/tiaozhangshenqing.js'
import { selectCarInspectedList, typeValues } from '@/api/supplychain/yancheguanli' import { getPathSidByUserSid, getOrg } from '@/api/cheliang/basevehiclemodel'
import { typeValues } from '@/api/supplychain/yancheguanli'
export default { export default {
name: 'tiaozhangshenqingguanli', name: 'tiaozhangshenqingguanli',
@ -119,8 +121,7 @@ export default {
tableLoading: false, tableLoading: false,
dataList: [], dataList: [],
useOrg_list: [], useOrg_list: [],
modelName_list: [], accadjType_list: [],
purchaseType_list: [],
useOrg: '', // 使 useOrg: '', // 使
useOrgSid: '', // 使sid useOrgSid: '', // 使sid
listQuery: { listQuery: {
@ -128,10 +129,12 @@ export default {
size: 10, size: 10,
total: 0, total: 0,
params: { params: {
vin: '', applyStartDate: '',
model: '', applyEndDate: '',
purchaseType: '', accadjTypeKey: '',
userSid: window.sessionStorage.getItem('userSid') callOutOrgSid: '',
callInOrgSid: '',
createOrgSid: '' // window.sessionStorage.getItem('orgSid'),
} }
}, },
btnList: [ btnList: [
@ -161,8 +164,9 @@ export default {
} }
}, },
created() { created() {
this.getList() this.getPathSid()
this.getType() this.getType()
this.getListOrgAll()
}, },
mounted() { mounted() {
this.$refs['btnbar'].setButtonList(this.btnList) this.$refs['btnbar'].setButtonList(this.btnList)
@ -212,7 +216,7 @@ export default {
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
// const sids = this.sids.join() // const sids = this.sids.join()
deleteCarTransfer(this.sids).then(resp => { delBySids(this.sids).then(resp => {
if (resp.success) { if (resp.success) {
loading.close() loading.close()
_this.$message({ type: 'success', message: resp.msg, showClose: true }) _this.$message({ type: 'success', message: resp.msg, showClose: true })
@ -245,6 +249,16 @@ export default {
this.sids = aa this.sids = aa
console.log('勾选的数据', this.sids) console.log('勾选的数据', this.sids)
}, },
getPathSid() {
const userSid = window.sessionStorage.getItem('userSid')
getPathSidByUserSid({ userSid: userSid }).then((res) => {
if (res.code === '200') {
this.listQuery.params.createOrgSid = res.data
this.useOrg = res.data
this.getList()
}
})
},
getList() { getList() {
this.listQuery.current = 1 this.listQuery.current = 1
this.loadList() this.loadList()
@ -255,18 +269,20 @@ export default {
size: 10, size: 10,
total: 0, total: 0,
params: { params: {
vin: '', applyStartDate: '',
model: '', applyEndDate: '',
purchaseType: '', accadjTypeKey: '',
userSid: window.sessionStorage.getItem('userSid') callOutOrgSid: '',
callInOrgSid: '',
createOrgSid: '' // window.sessionStorage.getItem('orgSid'),
} }
} }
this.getList() this.getPathSid()
}, },
loadList() { loadList() {
const _this = this const _this = this
this.tableLoading = true this.tableLoading = true
selectCarInspectedList(this.listQuery) listPage(this.listQuery)
.then(resp => { .then(resp => {
_this.tableLoading = false _this.tableLoading = false
const data = resp.data const data = resp.data
@ -286,10 +302,17 @@ export default {
}, },
getType() { getType() {
typeValues({ typeValues({
type: 'purchaseOrderType ' type: 'accadjType '
}).then((response) => { }).then((response) => {
if (response.code === '200' && response.data) { if (response.code === '200' && response.data) {
this.purchaseType_list = response.data this.accadjType_list = response.data
}
})
},
getListOrgAll() {
getOrg().then((res) => {
if (res.success) {
this.useOrg_list = res.data
} }
}) })
}, },

150
anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliAdd.vue

@ -11,7 +11,7 @@
type="primary" type="primary"
size="small" size="small"
:disabled="submitdisabled" :disabled="submitdisabled"
@click="dialogStatus === 'add' ? saveAdd() : saveEdit()" @click="handleCreate"
>保存 >保存
</el-button> </el-button>
<el-button type="primary" size="small" :disabled="disabled" @click="handleSubmit()">提交 <el-button type="primary" size="small" :disabled="disabled" @click="handleSubmit()">提交
@ -128,7 +128,8 @@
<script> <script>
import tiaozhangcheliangList from '@/views/supplychain/tiaozhangshenqingguanli/relation/tiaozhangcheliangList' import tiaozhangcheliangList from '@/views/supplychain/tiaozhangshenqingguanli/relation/tiaozhangcheliangList'
import req from '@/api/supplychain/purchasereturntowarehouse' import req from '@/api/supplychain/purchasereturntowarehouse'
import { getPathSidByUserSid } from '@/api/cheliang/basevehiclemodel' import {fetchDetailsBySid,save} from '@/api/supplychain/tiaozhangshenqing.js'
import { getOrg, getPathSidByUserSid } from '@/api/cheliang/basevehiclemodel'
import { typeValues } from '@/api/cheliang/dictcommons' import { typeValues } from '@/api/cheliang/dictcommons'
export default { export default {
@ -145,15 +146,25 @@ export default {
list: [], list: [],
depositVehicleList: [], depositVehicleList: [],
accadjTypeValue_list: [], accadjTypeValue_list: [],
// ==========
useOrg: '',
accadjType_list: [],
useOrg_list: [],
// //
temp: { temp: {
sid: '', // sid sid: '',
applicationCode: '', createBySid: '', // sid
name: '', applyDate: '', //
createTime: '', accadjTypeKey: '', // key
money: '', accadjTypeValue: '', // value
userSid: '', // sid callOutOrgSid: '', // sid
detailsList: [] callOutOrgName: '', //
callInOrgSid: '', // sid
callInOrgName: '', //
useOrgSid: '', // 使sid
createOrgSid: '', // sid
nodeState: '', //
accSids: [] // sid
}, },
rules: { rules: {
// money: [{ required: true, message: '', trigger: 'blur' }] // money: [{ required: true, message: '', trigger: 'blur' }]
@ -182,6 +193,32 @@ export default {
} }
return val return val
}, },
// sid
getPathSid() {
const userSid = window.sessionStorage.getItem('userSid')
getPathSidByUserSid({ userSid: userSid }).then((res) => {
if (res.code === '200') {
this.useOrg = res.data
this.getList()
}
})
},
getType() {
typeValues({
type: 'accadjType '
}).then((response) => {
if (response.code === '200' && response.data) {
this.accadjType_list = response.data
}
})
},
getListOrgAll() {
getOrg().then((res) => {
if (res.success) {
this.useOrg_list = res.data
}
})
},
// //
handletiaozhangcheliang() { handletiaozhangcheliang() {
this.isXuanche = true this.isXuanche = true
@ -214,34 +251,26 @@ export default {
console.log('row', row) console.log('row', row)
this.list.splice(index, 1) this.list.splice(index, 1)
}, },
// sid
getPathSid() {
const userSid = window.sessionStorage.getItem('userSid')
getPathSidByUserSid({ userSid: userSid }).then((res) => {
if (res.code === '200') {
this.branchOfficeSid = res.data
}
})
},
getType() {
typeValues({}).then((res) => {
if (res.code === '200') {
this.manPurOrderType_list = res.data
}
})
},
// === // ===
handleReturn(isreload) { handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist') if (isreload === 'true') this.$emit('reloadlist')
this.temp = { this.temp = {
sid: '', sid: '',
applicationCode: '', createBySid: '', // sid
name: '', applyDate: '', //
createTime: '', accadjTypeKey: '', // key
userSid: '', accadjTypeValue: '', // value
detailsList: [] callOutOrgSid: '', // sid
}, callOutOrgName: '', //
this.list = [] callInOrgSid: '', // sid
callInOrgName: '', //
useOrgSid: '', // 使sid
createOrgSid: '', // sid
nodeState: '', //
accSids: [] // sid
}
this.list = []
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
this.$emit('doback') this.$emit('doback')
}, },
@ -261,6 +290,9 @@ export default {
}) })
this.dialogStatus = 'add' this.dialogStatus = 'add'
this.viewTitle = '【新增】分公司间调账申请' this.viewTitle = '【新增】分公司间调账申请'
this.getPathSid()
this.getType()
this.getListOrgAll()
}, },
showEdit(row) { showEdit(row) {
@ -269,7 +301,7 @@ export default {
}) })
this.dialogStatus = 'edit' this.dialogStatus = 'edit'
this.viewTitle = '【编辑】分公司间调账申请' this.viewTitle = '【编辑】分公司间调账申请'
req.detailsInfo({ fetchDetailsBySid({
sid: row.sid sid: row.sid
}).then(resp => { }).then(resp => {
if (resp.success) { if (resp.success) {
@ -284,39 +316,17 @@ export default {
}).catch(e => { }).catch(e => {
this.submitdisabled = false this.submitdisabled = false
}) })
if (nodeState == '' || nodeState == '发起订单') { this.getPathSid()
this.disabled = false this.getType()
} else { this.getListOrgAll()
this.disabled = true
}
}, },
saveAdd() { handleCreate() {
const _this = this const _this = this
this.$refs['dataForm'].validate(valid => { this.$refs['dataForm'].validate(valid => {
if (valid) { if (valid) {
this.submitdisabled = true this.submitdisabled = true
this.temp.detailsList = this.list this.temp.detailsList = this.list
req.save(this.temp).then(resp => { save(this.temp).then(resp => {
this.submitdisabled = false
if (resp.success) {
if (resp.success) {
_this.handleReturn('true')
}
}
}).catch(() => {
this.submitdisabled = false
})
} else {
return false
}
})
},
saveEdit() {
const _this = this
this.$refs['dataForm'].validate(valid => {
if (valid) {
this.submitdisabled = true
req.save(this.temp).then(resp => {
this.submitdisabled = false this.submitdisabled = false
if (resp.success) { if (resp.success) {
if (resp.success) { if (resp.success) {
@ -331,6 +341,26 @@ export default {
} }
}) })
}, },
// saveEdit() {
// const _this = this
// this.$refs['dataForm'].validate(valid => {
// if (valid) {
// this.submitdisabled = true
// req.save(this.temp).then(resp => {
// this.submitdisabled = false
// if (resp.success) {
// if (resp.success) {
// _this.handleReturn('true')
// }
// }
// }).catch(() => {
// this.submitdisabled = false
// })
// } else {
// return false
// }
// })
// },
handleSubmit() { handleSubmit() {
const _this = this const _this = this
this.$refs['dataForm'].validate(valid => { this.$refs['dataForm'].validate(valid => {

Loading…
Cancel
Save