Browse Source

Merge remote-tracking branch 'origin/master'

master
yxt_djz 3 years ago
parent
commit
203642a147
  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. 4
      anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempDto.java
  4. 18
      anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempService.java
  5. 38
      anrui-scm/anrui-scm-ui/src/api/supplychain/tiaozhangshenqing.js
  6. 87
      anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanli.vue
  7. 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 :span="8">
<el-form-item prop="idnumber">
<el-input v-model="temp.idnumber" style="width:50%" maxlength="20" placeholder="请输入证件号码"
class="addinputw" clearable/>
<el-input v-model="temp.idnumber" style="width:50%" maxlength="18 || 9" placeholder="请输入证件号码"
class="addinputw" clearable
@keyup.native="temp.idnumber = oninput(temp.idnumber)"/>
</el-form-item>
</el-col>
</el-row>
@ -458,7 +459,8 @@ export default {
};
var identitycard = (rules, value, callback) => {
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 (!card.test(value)) {
callback(new Error('请输入身份证号码'))
@ -610,7 +612,7 @@ export default {
idnumber: [
{
required: true,
validator: identitycard,
// validator: identitycard,
trigger: 'blur',
},
],
@ -635,6 +637,22 @@ export default {
//
},
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() {
this.getShuJUZiDian()

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

@ -301,7 +301,7 @@
<el-form-item>
<div class="yihang">
<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>
<div class="mw">

4
anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempDto.java

@ -9,7 +9,6 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.List;
/**
@ -34,7 +33,7 @@ public class CrmCustomerTempDto implements Dto {
@ApiModelProperty(value = "当前登录用户的sid")
private String userSid;
@ApiModelProperty(value = "客户类型(个人/企业)", required = true)
@ApiModelProperty(value = "客户类型(1个人/2企业)", required = true)
@NotBlank(message = "客户类型为必选项")
private String customerType;
@ -56,7 +55,6 @@ public class CrmCustomerTempDto implements Dto {
@ApiModelProperty("联系电话")
@NotBlank(message = "联系电话为必填项")
@Pattern(regexp = "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\\d{8}$", message = "手机号码格式不正确")
private String mobile;
@ApiModelProperty("微信号码")

18
anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempService.java

@ -656,6 +656,22 @@ public class CrmCustomerTempService extends MybatisBaseService<CrmCustomerTempMa
if (StringUtils.isBlank(mobile)) {
return rb.setMsg("请输入联系电话");
}
if ("1".equals(dto.getCustomerType())) {
if (!weixin.matches("^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\\d{8}$")) {
return rb.setMsg("手机号格式不正确");
}
if (StringUtils.isNotBlank(dto.getIDNumber())) {
if (!weixin.matches("^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$")) {
return rb.setMsg("证件号码格式不正确");
}
}
} else {
if (StringUtils.isNotBlank(dto.getIDNumber())) {
if (dto.getIDNumber().length() != 9 && dto.getIDNumber().length() != 18) {
return rb.setMsg("证件号码格式不正确");
}
}
}
if (StringUtils.isNotBlank(weixin)) {
if (!weixin.matches("^[a-zA-Z]{1}[-_a-zA-Z0-9]{5,19}$") && !weixin.matches("^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\\d{8}$")) {
return rb.setMsg("微信号格式不正确");
@ -807,7 +823,7 @@ public class CrmCustomerTempService extends MybatisBaseService<CrmCustomerTempMa
if (customerTemp == null) {
return rb.setMsg("该客户信息不存在");
}
BeanUtil.copyProperties(dto,customerTemp);
BeanUtil.copyProperties(dto, customerTemp);
baseMapper.updateById(customerTemp);
// int count = updateBySid(dto, sid);
//更新运营信息

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

@ -1 +1,39 @@
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">
<el-form :inline="true" class="tab-header">
<el-form-item label="调帐类型">
<el-select v-model="listQuery.params.purchaseType" placeholder="请选择" clearable class="addinputw">
<el-option v-for="item in purchaseType_list" :key="item.dictKey" :label="item.dictValue"
<el-select v-model="listQuery.params.accadjTypeKey" placeholder="请选择" clearable class="addinputw">
<el-option v-for="item in accadjType_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictKey"/>
</el-select>
<!-- <el-input v-model="listQuery.params.vin" placeholder="请输入车架号" clearable/>-->
</el-form-item>
<el-form-item label="调出分公司">
<el-select v-model="listQuery.params.purchaseType" placeholder="请选择" clearable class="addinputw">
<el-option v-for="item in purchaseType_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictKey"/>
<el-select v-model="listQuery.params.callOutOrgSid" placeholder="请选择" clearable class="addinputw">
<el-option v-for="item in useOrg_list" :key="item.sid" :label="item.name"
:value="item.sid"/>
</el-select>
</el-form-item>
<el-form-item label="调入分公司">
<el-select v-model="listQuery.params.purchaseType" placeholder="请选择" clearable class="addinputw">
<el-option v-for="item in purchaseType_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictKey"/>
<el-select v-model="listQuery.params.callInOrgSid" placeholder="请选择" clearable class="addinputw">
<el-option v-for="item in useOrg_list" :key="item.sid" :label="item.name"
:value="item.sid"/>
</el-select>
</el-form-item>
<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="请选择"/>
<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="请选择"/>
</el-form-item>
</el-form>
@ -61,10 +61,10 @@
<el-button size="mini" type="primary" @click="handleCheck(row)">查看</el-button>
</template>
</el-table-column>
<el-table-column width="140px" prop="vin" label="申请日期" align="center"/>
<el-table-column width="120px" prop="model" label="调账类型" align="center"/>
<el-table-column prop="purchaseType" label="调出分公司" align="center"/>
<el-table-column prop="dispatchedDate" label="调入分公司" align="center"/>
<el-table-column width="140px" prop="applyDate" label="申请日期" align="center"/>
<el-table-column width="120px" prop="accadjTypeValue" label="调账类型" align="center"/>
<el-table-column prop="callOutOrgName" label="调出分公司" align="center"/>
<el-table-column prop="callInOrgName" label="调入分公司" align="center"/>
</el-table>
</div>
<!--End 项目列表-->
@ -99,8 +99,10 @@ import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import tiaozhangshenqingguanliAdd from '@/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliAdd'
import tiaozhangshenqingguanliInfo from '@/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliInfo'
import { deleteCarTransfer } from '@/api/supplychain/cunfangdidianbiangeng'
import { selectCarInspectedList, typeValues } from '@/api/supplychain/yancheguanli'
import { listPage,delBySids } from '@/api/supplychain/tiaozhangshenqing.js'
import { getPathSidByUserSid, getOrg } from '@/api/cheliang/basevehiclemodel'
import { typeValues } from '@/api/supplychain/yancheguanli'
export default {
name: 'tiaozhangshenqingguanli',
@ -119,8 +121,7 @@ export default {
tableLoading: false,
dataList: [],
useOrg_list: [],
modelName_list: [],
purchaseType_list: [],
accadjType_list: [],
useOrg: '', // 使
useOrgSid: '', // 使sid
listQuery: {
@ -128,10 +129,12 @@ export default {
size: 10,
total: 0,
params: {
vin: '',
model: '',
purchaseType: '',
userSid: window.sessionStorage.getItem('userSid')
applyStartDate: '',
applyEndDate: '',
accadjTypeKey: '',
callOutOrgSid: '',
callInOrgSid: '',
createOrgSid: '' // window.sessionStorage.getItem('orgSid'),
}
},
btnList: [
@ -161,8 +164,9 @@ export default {
}
},
created() {
this.getList()
this.getPathSid()
this.getType()
this.getListOrgAll()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
@ -212,7 +216,7 @@ export default {
background: 'rgba(0, 0, 0, 0.7)'
})
// const sids = this.sids.join()
deleteCarTransfer(this.sids).then(resp => {
delBySids(this.sids).then(resp => {
if (resp.success) {
loading.close()
_this.$message({ type: 'success', message: resp.msg, showClose: true })
@ -245,6 +249,16 @@ export default {
this.sids = aa
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() {
this.listQuery.current = 1
this.loadList()
@ -255,18 +269,20 @@ export default {
size: 10,
total: 0,
params: {
vin: '',
model: '',
purchaseType: '',
userSid: window.sessionStorage.getItem('userSid')
applyStartDate: '',
applyEndDate: '',
accadjTypeKey: '',
callOutOrgSid: '',
callInOrgSid: '',
createOrgSid: '' // window.sessionStorage.getItem('orgSid'),
}
}
this.getList()
this.getPathSid()
},
loadList() {
const _this = this
this.tableLoading = true
selectCarInspectedList(this.listQuery)
listPage(this.listQuery)
.then(resp => {
_this.tableLoading = false
const data = resp.data
@ -286,10 +302,17 @@ export default {
},
getType() {
typeValues({
type: 'purchaseOrderType '
type: 'accadjType '
}).then((response) => {
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"
size="small"
:disabled="submitdisabled"
@click="dialogStatus === 'add' ? saveAdd() : saveEdit()"
@click="handleCreate"
>保存
</el-button>
<el-button type="primary" size="small" :disabled="disabled" @click="handleSubmit()">提交
@ -128,7 +128,8 @@
<script>
import tiaozhangcheliangList from '@/views/supplychain/tiaozhangshenqingguanli/relation/tiaozhangcheliangList'
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'
export default {
@ -145,15 +146,25 @@ export default {
list: [],
depositVehicleList: [],
accadjTypeValue_list: [],
// ==========
useOrg: '',
accadjType_list: [],
useOrg_list: [],
//
temp: {
sid: '', // sid
applicationCode: '',
name: '',
createTime: '',
money: '',
userSid: '', // sid
detailsList: []
sid: '',
createBySid: '', // sid
applyDate: '', //
accadjTypeKey: '', // key
accadjTypeValue: '', // value
callOutOrgSid: '', // sid
callOutOrgName: '', //
callInOrgSid: '', // sid
callInOrgName: '', //
useOrgSid: '', // 使sid
createOrgSid: '', // sid
nodeState: '', //
accSids: [] // sid
},
rules: {
// money: [{ required: true, message: '', trigger: 'blur' }]
@ -182,6 +193,32 @@ export default {
}
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() {
this.isXuanche = true
@ -214,34 +251,26 @@ export default {
console.log('row', row)
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) {
if (isreload === 'true') this.$emit('reloadlist')
this.temp = {
sid: '',
applicationCode: '',
name: '',
createTime: '',
userSid: '',
detailsList: []
},
this.list = []
createBySid: '', // sid
applyDate: '', //
accadjTypeKey: '', // key
accadjTypeValue: '', // value
callOutOrgSid: '', // sid
callOutOrgName: '', //
callInOrgSid: '', // sid
callInOrgName: '', //
useOrgSid: '', // 使sid
createOrgSid: '', // sid
nodeState: '', //
accSids: [] // sid
}
this.list = []
this.$refs['dataForm'].resetFields()
this.$emit('doback')
},
@ -261,6 +290,9 @@ export default {
})
this.dialogStatus = 'add'
this.viewTitle = '【新增】分公司间调账申请'
this.getPathSid()
this.getType()
this.getListOrgAll()
},
showEdit(row) {
@ -269,7 +301,7 @@ export default {
})
this.dialogStatus = 'edit'
this.viewTitle = '【编辑】分公司间调账申请'
req.detailsInfo({
fetchDetailsBySid({
sid: row.sid
}).then(resp => {
if (resp.success) {
@ -284,39 +316,17 @@ export default {
}).catch(e => {
this.submitdisabled = false
})
if (nodeState == '' || nodeState == '发起订单') {
this.disabled = false
} else {
this.disabled = true
}
this.getPathSid()
this.getType()
this.getListOrgAll()
},
saveAdd() {
handleCreate() {
const _this = this
this.$refs['dataForm'].validate(valid => {
if (valid) {
this.submitdisabled = true
this.temp.detailsList = this.list
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
}
})
},
saveEdit() {
const _this = this
this.$refs['dataForm'].validate(valid => {
if (valid) {
this.submitdisabled = true
req.save(this.temp).then(resp => {
save(this.temp).then(resp => {
this.submitdisabled = false
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() {
const _this = this
this.$refs['dataForm'].validate(valid => {

Loading…
Cancel
Save