Browse Source

完善厂商管理增加厂家销售通路

master
yunuo970428 3 years ago
parent
commit
e9cf551e6a
  1. 343
      anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanliAdd.vue
  2. 166
      anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshanglook.vue
  3. 67
      anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/relation/changshangBankInfo.vue

343
anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanliAdd.vue

@ -50,8 +50,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="supplierType"> <el-form-item prop="supplierType">
<el-select v-model="temp.supplierType" class="addinputw" placeholder="" @change="getSupplierType"> <el-select v-model="temp.supplierType" class="addinputw" placeholder="" @change="getSupplierType">
<el-option v-for="(item, index) in supplierType_list" :key="index.dictKey" :label="item.dictValue" <el-option v-for="item in supplierType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
:value="item.dictKey"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -62,8 +61,7 @@
</el-col> </el-col>
<el-col :span="20"> <el-col :span="20">
<el-form-item prop="manufacturerAddress"> <el-form-item prop="manufacturerAddress">
<el-input v-model="temp.manufacturerAddress" maxlength="80" placeholder="" class="addinputw addinputw01" <el-input v-model="temp.manufacturerAddress" maxlength="80" placeholder="" class="addinputw addinputw01" clearable/>
clearable/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -73,8 +71,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="manufacturerTelePhone"> <el-form-item prop="manufacturerTelePhone">
<el-input v-model="temp.manufacturerTelePhone" maxlength="20" placeholder="例:010-88888888" class="addinputw" <el-input v-model="temp.manufacturerTelePhone" maxlength="20" placeholder="例:010-88888888" class="addinputw" clearable/>
clearable/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
@ -332,6 +329,7 @@
<el-table-column prop="swiftCode" width="200px" label="swiftcode(银行代码)" align="center"/> <el-table-column prop="swiftCode" width="200px" label="swiftcode(银行代码)" align="center"/>
<el-table-column prop="currency" width="130px" label="币种" align="center"/> <el-table-column prop="currency" width="130px" label="币种" align="center"/>
<el-table-column prop="remarks" width="240px" label="描述" align="center"/> <el-table-column prop="remarks" width="240px" label="描述" align="center"/>
<el-table-column prop="actualPay" width="240px" label="厂家销售通路" align="center"/>
</el-table> </el-table>
</el-form> </el-form>
</div> </div>
@ -449,33 +447,33 @@
</template> </template>
<script> <script>
import {details, SaveList, selectListOrg, Update,} from "@/api/jichuxinxi/basemanufacturer"; import { details, SaveList, selectListOrg, Update } from '@/api/jichuxinxi/basemanufacturer'
import {getCity, getCounty, getProvince} from '@/api/portal/areaPicker' // import { getCity, getCounty, getProvince } from '@/api/portal/areaPicker' //
import {typeValues} from "@/api/jichuxinxi/dictcommons"; import { typeValues } from '@/api/jichuxinxi/dictcommons'
import {getLook, getXiu, setuser} from "@/utils/baocun"; import { getLook, getXiu, setuser } from '@/utils/baocun'
import {getListOrg} from "@/api/jichuxinxi/brandManagement"; import { getListOrg } from '@/api/jichuxinxi/brandManagement'
import changshangBankInfo from "@/views/changshang/changshangguanli/relation/changshangBankInfo"; import changshangBankInfo from '@/views/changshang/changshangguanli/relation/changshangBankInfo'
export default { export default {
name: "ChangshangguanliAdd1", name: 'ChangshangguanliAdd1',
components: { components: {
changshangBankInfo changshangBankInfo
}, },
data() { data() {
var checkEamil = (rule, value, callback) => { var checkEamil = (rule, value, callback) => {
const regEamil = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/; const regEamil = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/
if (regEamil.test(value)) { if (regEamil.test(value)) {
return callback(); return callback()
} }
callback(new Error("请输入邮箱")); callback(new Error('请输入邮箱'))
}; }
var validCascader = (rule, value, callback) => { var validCascader = (rule, value, callback) => {
if (this.useOrgValue.length == 0) { if (this.useOrgValue.length == 0) {
callback(new Error('请填写使用组织')) callback(new Error('请填写使用组织'))
} else { } else {
callback(); callback()
} }
}; }
// var validatePass2 = (rule, value, callback) => { // var validatePass2 = (rule, value, callback) => {
// const WeiXin = /^[a-zA-Z]{1}[-_a-zA-Z0-9]{5,19}$/; // const WeiXin = /^[a-zA-Z]{1}[-_a-zA-Z0-9]{5,19}$/;
// const phone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/; // const phone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
@ -485,63 +483,63 @@ export default {
// callback(new Error("")); // callback(new Error(""));
// }; // };
var validatePass2 = (rule, value, callback) => { var validatePass2 = (rule, value, callback) => {
const WeiXin = /^[a-zA-Z][a-zA-Z\d_-]{5,19}$/; const WeiXin = /^[a-zA-Z][a-zA-Z\d_-]{5,19}$/
const phone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/; const phone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
if (value) { if (value) {
// //
if (!WeiXin.test(value) && !phone.test(value)) { if (!WeiXin.test(value) && !phone.test(value)) {
callback(new Error("请输入正确的微信号码")); callback(new Error('请输入正确的微信号码'))
} }
callback(); callback()
} else { } else {
callback(); callback()
} }
}; }
var checkYouBian = (rule, value, callback) => { var checkYouBian = (rule, value, callback) => {
const YouBian = /^[0-9]{6}$/; const YouBian = /^[0-9]{6}$/
if (YouBian.test(value)) { if (YouBian.test(value)) {
return callback(); return callback()
} }
callback(new Error("请输入邮编")); callback(new Error('请输入邮编'))
}; }
var checkBanGongDianHua = (rule, value, callback) => { var checkBanGongDianHua = (rule, value, callback) => {
const BanGongDianHua = /\d{3}-\d{8}|\d{4}-\d{7}/; const BanGongDianHua = /\d{3}-\d{8}|\d{4}-\d{7}/
if (BanGongDianHua.test(value)) { if (BanGongDianHua.test(value)) {
return callback(); return callback()
} }
callback(new Error("请输入办公电话")); callback(new Error('请输入办公电话'))
}; }
var checkContenTel = (rule, value, callback) => { var checkContenTel = (rule, value, callback) => {
const BanGongDianHua = /\d{3}-\d{8}|\d{4}-\d{7}/; const BanGongDianHua = /\d{3}-\d{8}|\d{4}-\d{7}/
if (value) { if (value) {
// //
if (!BanGongDianHua.test(value)) { if (!BanGongDianHua.test(value)) {
callback(new Error("请输入正确的办公电话格式")); callback(new Error('请输入正确的办公电话格式'))
} }
callback(); callback()
} else { } else {
callback(); callback()
} }
}; }
var checkChuanzhen = (rule, value, callback) => { var checkChuanzhen = (rule, value, callback) => {
const BanGongDianHua = /\d{3}-\d{8}|\d{4}-\d{7}/; const BanGongDianHua = /\d{3}-\d{8}|\d{4}-\d{7}/
if (value) { if (value) {
// //
if (!BanGongDianHua.test(value)) { if (!BanGongDianHua.test(value)) {
callback(new Error("请输入正确的传真格式")); callback(new Error('请输入正确的传真格式'))
} }
callback(); callback()
} else { } else {
callback(); callback()
} }
}; }
var checkSubmit = (rule, value, callback) => { var checkSubmit = (rule, value, callback) => {
const Submit = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/; const Submit = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
if (Submit.test(value)) { if (Submit.test(value)) {
return callback(); return callback()
} }
callback(new Error("请输入手机号")); callback(new Error('请输入手机号'))
}; }
return { return {
// --------- // ---------
menuState: { menuState: {
@ -578,7 +576,7 @@ export default {
}, },
temp1: { temp1: {
settlementCurrency: '', settlementCurrency: '',
settlementCurrencyValue: '', settlementCurrencyValue: ''
}, },
temp2: {},// temp2: {},//
list: [], list: [],
@ -588,8 +586,8 @@ export default {
settlementCurrency: 'settlementCurrency', settlementCurrency: 'settlementCurrency',
templook: {}, // templook: {}, //
textMap: { textMap: {
update: "修改", update: '修改',
create: "新增" create: '新增'
}, },
modelValue: [], modelValue: [],
modelValue2: [], modelValue2: [],
@ -597,25 +595,25 @@ export default {
modelValue4: [], modelValue4: [],
stateId: 0, stateId: 0,
infoe: 3, infoe: 3,
lookid: "", lookid: '',
dialogFormVisible: false, // dialogFormVisible: false, //
dialogFormShowVisible: false, // dialogFormShowVisible: false, //
dialogStatus: "", // dialogStatus: '', //
options: [], options: [],
props: { props: {
value: "sid", value: 'sid',
label: "name", label: 'name',
children: "children", children: 'children',
multiple: true multiple: true
}, },
deCode: [], deCode: [],
fenzuOptions: [{ fenzuOptions: [{
value: "1", value: '1',
label: "单位" label: '单位'
}, },
{ {
value: "2", value: '2',
label: "个人" label: '个人'
} }
], ],
useOrgArry: [], useOrgArry: [],
@ -623,15 +621,15 @@ export default {
inputCityList: [], inputCityList: [],
inputCountyList: [], inputCountyList: [],
countId: 0, countId: 0,
supplierType: "supplierType", supplierType: 'supplierType',
supplierGroup: "supplierGroup", supplierGroup: 'supplierGroup',
supplyType: "supplyType", supplyType: 'supplyType',
industrytype: "industrytype", industrytype: 'industrytype',
typeOptions: [], typeOptions: [],
industryons: [], industryons: [],
supplier: [], supplier: [],
grouping: [], grouping: [],
supplierType_list:[], // supplierType_list: [], //
rules: { rules: {
// email: [{ // email: [{
// required: true, // required: true,
@ -697,15 +695,13 @@ export default {
useOrgValue: [{ useOrgValue: [{
required: true, required: true,
validator: validCascader, validator: validCascader,
trigger: "change" trigger: 'change'
}] }]
}, },
tempDate: {} tempDate: {}
} }
}, },
computed: { computed: {},
},
created() { created() {
// this.tempDate.sid = this.$route.params.id; // this.tempDate.sid = this.$route.params.id;
// console.log("sid", this.tempDate.sid); // console.log("sid", this.tempDate.sid);
@ -719,9 +715,9 @@ export default {
methods: { methods: {
// //
oninput(val, limit = 0) { oninput(val, limit = 0) {
val = val.replace(/[^\d.]/g, ""); // val = val.replace(/[^\d.]/g, '') //
val = val.replace(/\.{2,}/g, "."); // val = val.replace(/\.{2,}/g, '.') //
val = val.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); // val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.') //
const str = '^(\\d+)\\.(\\d{' + limit + '}).*$' const str = '^(\\d+)\\.(\\d{' + limit + '}).*$'
const reg = new RegExp(str) const reg = new RegExp(str)
if (limit === 0) { if (limit === 0) {
@ -734,62 +730,45 @@ export default {
return val return val
}, },
setDetaList() { setDetaList() {
typeValues({ typeValues({ type: this.supplierType }).then((res) => {
type: this.supplierType if (res.code === '200') {
}).then((res) => { this.supplier = res.data
if (res.code === "200") {
this.supplier = res.data;
} }
}); })
typeValues({ typeValues({ type: this.supplierGroup }).then((res) => {
type: this.supplierGroup if (res.code === '200') {
}).then((res) => { this.grouping = res.data
if (res.code === "200") {
this.grouping = res.data;
} }
}); })
typeValues({ typeValues({ type: this.supplyType }).then((res) => {
type: this.supplyType if (res.code === '200') {
}).then((res) => { this.typeOptions = res.data
if (res.code === "200") {
this.typeOptions = res.data;
} }
}); })
typeValues({ typeValues({ type: this.industrytype }).then((res) => {
type: this.industrytype if (res.code === '200') {
}).then((res) => { this.industryons = res.data
if (res.code === "200") {
this.industryons = res.data;
} }
}); })
typeValues({ type: this.settlementCurrency }).then((res) => {
typeValues({
type: this.settlementCurrency
}).then((res) => {
if (res.code === '200') { if (res.code === '200') {
this.Currency = res.data this.Currency = res.data
console.log('结算币种', this.Currency) console.log('结算币种', this.Currency)
} }
}) })
typeValues({ typeValues({ type: this.settlementWay }).then((res) => {
type: this.settlementWay
}).then((res) => {
if (res.code === '200') { if (res.code === '200') {
this.tWay = res.data this.tWay = res.data
console.log('结算方式', this.tWay) console.log('结算方式', this.tWay)
} }
}) })
typeValues({ typeValues({ type: 'supplierType' }).then((res) => {
type: 'supplierType'
}).then((res) => {
if (res.code === '200') { if (res.code === '200') {
this.supplierType_list = res.data this.supplierType_list = res.data
console.log('厂商分类', this.supplierType_list) console.log('厂商分类', this.supplierType_list)
} }
}) })
typeValues({ typeValues({ type: this.taxClassification }).then((res) => {
type: this.taxClassification
}).then((res) => {
if (res.code === '200') { if (res.code === '200') {
this.fication = res.data this.fication = res.data
console.log('税分类', this.fication) console.log('税分类', this.fication)
@ -797,10 +776,10 @@ export default {
}) })
}, },
// //
getSupplierType(value){ getSupplierType(value) {
let bb = null let bb = null
this.supplierType_list.forEach((e) => { this.supplierType_list.forEach((e) => {
if (e.dictKey == value) { if (e.dictKey === value) {
bb = { bb = {
name: e.dictValue, name: e.dictValue,
vaule: e.dictKey vaule: e.dictKey
@ -808,13 +787,13 @@ export default {
} }
}) })
this.temp.supplierTypeValue = bb.name this.temp.supplierTypeValue = bb.name
console.log('厂商分类',this.temp.supplierTypeValue,this.temp.supplierType) console.log('厂商分类', this.temp.supplierTypeValue, this.temp.supplierType)
}, },
// //
getBiZhong(value) { getBiZhong(value) {
let bb = null let bb = null
this.Currency.forEach((e) => { this.Currency.forEach((e) => {
if (e.dictKey == value) { if (e.dictKey === value) {
bb = { bb = {
type: 'settlementCurrency', type: 'settlementCurrency',
name: e.dictValue, name: e.dictValue,
@ -827,7 +806,7 @@ export default {
getFangShi(value) { getFangShi(value) {
let bb = null let bb = null
this.tWay.forEach((e) => { this.tWay.forEach((e) => {
if (e.dictKey == value) { if (e.dictKey === value) {
bb = { bb = {
type: 'settlementWay', type: 'settlementWay',
name: e.dictValue, name: e.dictValue,
@ -840,7 +819,7 @@ export default {
getShuiFenLei(value) { getShuiFenLei(value) {
let bb = null let bb = null
this.fication.forEach((e) => { this.fication.forEach((e) => {
if (e.dictKey == value) { if (e.dictKey === value) {
bb = { bb = {
type: 'taxClassification', type: 'taxClassification',
name: e.dictValue, name: e.dictValue,
@ -922,7 +901,9 @@ export default {
paymentLines: info.paymentLines, paymentLines: info.paymentLines,
swiftCode: info.swiftCode, swiftCode: info.swiftCode,
currency: info.currency, currency: info.currency,
remarks: info.remarks remarks: info.remarks,
actualPay: info.actualPay,
actualPayKey: info.actualPayKey
}) })
console.log('ADD开户行info', info, index) console.log('ADD开户行info', info, index)
return return
@ -941,7 +922,9 @@ export default {
paymentLines: info.paymentLines, paymentLines: info.paymentLines,
swiftCode: info.swiftCode, swiftCode: info.swiftCode,
currency: info.currency, currency: info.currency,
remarks: info.remarks remarks: info.remarks,
actualPay: info.actualPay,
actualPayKey: info.actualPayKey
} }
return return
} }
@ -966,25 +949,25 @@ export default {
this.viewTitle = '新增厂商详细信息' this.viewTitle = '新增厂商详细信息'
this.stateId = 0 this.stateId = 0
this.setDetaList() this.setDetaList()
this.getZuZhi(); this.getZuZhi()
this.huoquSheng() this.huoquSheng()
this.getListOrgAll() this.getListOrgAll()
// this.getPathSid() // this.getPathSid()
}, },
init() { init() {
this.countId = this.$store.state.counter; this.countId = this.$store.state.counter
// ---------------------------------------------------------- // ----------------------------------------------------------
this.stateId = this.$route.params.id; this.stateId = this.$route.params.id
// ---------------------------------------------------------- // ----------------------------------------------------------
var Xiusid = getXiu(); var Xiusid = getXiu()
this.manufacturerSid = Xiusid[0]; this.manufacturerSid = Xiusid[0]
// ---------------------------------------------------------- // ----------------------------------------------------------
// //
var sid=this.$route.query.sid; var sid = this.$route.query.sid
if (this.countId != 0 && this.countId != 3) { if (this.countId != 0 && this.countId != 3) {
details(this.manufacturerSid).then((response) => { details(this.manufacturerSid).then((response) => {
if (response.code === "200") { if (response.code === '200') {
if (response.data.baseManufacturerDto.useOrg) { if (response.data.baseManufacturerDto.useOrg) {
this.useOrgArry = response.data.baseManufacturerDto.useOrg this.useOrgArry = response.data.baseManufacturerDto.useOrg
} }
@ -992,16 +975,16 @@ export default {
this.temp1 = response.data.baseManufacturerFinanceDto this.temp1 = response.data.baseManufacturerFinanceDto
this.temp2 = response.data.baseManufacturerBankDto this.temp2 = response.data.baseManufacturerBankDto
if (this.temp.useOrg.search(',') == '-1') { if (this.temp.useOrg.search(',') == '-1') {
this.useOrgValue = this.temp.useOrg.split(" ") this.useOrgValue = this.temp.useOrg.split(' ')
} else { } else {
this.useOrgValue = this.temp.useOrg.split(",") this.useOrgValue = this.temp.useOrg.split(',')
} }
} }
}) })
}else if(typeof(sid) != "undefined"){ } else if (typeof (sid) != 'undefined') {
this.countId=0 this.countId = 0
details(sid).then((response) => { details(sid).then((response) => {
if (response.code === "200") { if (response.code === '200') {
if (response.data.baseManufacturerDto.useOrg) { if (response.data.baseManufacturerDto.useOrg) {
this.useOrgArry = response.data.baseManufacturerDto.useOrg this.useOrgArry = response.data.baseManufacturerDto.useOrg
} }
@ -1013,11 +996,11 @@ export default {
} }
// ---------------------------------------------------------- // ----------------------------------------------------------
// //
var Chasid = getLook(); var Chasid = getLook()
this.lookid = Chasid; this.lookid = Chasid
if (this.countId === 3) { if (this.countId === 3) {
details(this.lookid).then((response) => { details(this.lookid).then((response) => {
if (response.code === "200") { if (response.code === '200') {
if (response.data.baseManufacturerDto.useOrg) { if (response.data.baseManufacturerDto.useOrg) {
this.useOrgArry = response.data.baseManufacturerDto.useOrg this.useOrgArry = response.data.baseManufacturerDto.useOrg
} }
@ -1026,14 +1009,14 @@ export default {
this.temp2 = response.data.baseManufacturerBankDto this.temp2 = response.data.baseManufacturerBankDto
} else { } else {
this.$notify({ this.$notify({
title: "失败", title: '失败',
message: "查询失败", message: '查询失败',
type: "error" type: 'error'
}) })
} }
}) })
} }
this.setDetaList() this.setDetaList()
}, },
// ------------------------------------------------------ // ------------------------------------------------------
huoquSheng() { huoquSheng() {
@ -1041,7 +1024,6 @@ export default {
if (res.code === '200') { if (res.code === '200') {
this.inputProvinceList = res.data this.inputProvinceList = res.data
} }
}) })
}, },
getShen(value) { getShen(value) {
@ -1117,7 +1099,7 @@ export default {
this.sid = sid this.sid = sid
this.stateId = 1 this.stateId = 1
details(sid).then((response) => { details(sid).then((response) => {
if (response.code === "200") { if (response.code === '200') {
if (response.data.baseManufacturerDto.useOrg) { if (response.data.baseManufacturerDto.useOrg) {
this.useOrgArry = response.data.baseManufacturerDto.useOrg this.useOrgArry = response.data.baseManufacturerDto.useOrg
} }
@ -1133,7 +1115,7 @@ export default {
} }
}) })
this.setDetaList() this.setDetaList()
this.getZuZhi(); this.getZuZhi()
this.huoquSheng() this.huoquSheng()
this.getListOrgAll() this.getListOrgAll()
// this.getPathSid() // this.getPathSid()
@ -1188,7 +1170,7 @@ export default {
// //
getZuZhi() { getZuZhi() {
selectListOrg().then((res) => { selectListOrg().then((res) => {
if (res.code === "200") { if (res.code === '200') {
this.options = res.data this.options = res.data
this.zuzhi0(this.options) this.zuzhi0(this.options)
} }
@ -1210,15 +1192,15 @@ export default {
// //
resetTemp() { resetTemp() {
this.temp = { this.temp = {
useOrg: "" useOrg: ''
} }
}, },
// //
handleCreate() { handleCreate() {
this.$refs["dataForm"].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.FormLoading = true; this.FormLoading = true
this.dialogStatus = "create"; this.dialogStatus = 'create'
if (this.stateId == 0) { if (this.stateId == 0) {
// if (this.useOrgArry) { // if (this.useOrgArry) {
// var abc = [] // var abc = []
@ -1230,27 +1212,27 @@ export default {
var Codese = this.deCode.join(',') var Codese = this.deCode.join(',')
this.temp.orgAddress = Codese this.temp.orgAddress = Codese
var data = { var data = {
"baseManufacturerDto": this.temp, 'baseManufacturerDto': this.temp,
"baseManufacturerFinanceDto": this.temp1, 'baseManufacturerFinanceDto': this.temp1,
"baseManufacturerBankDto": this.list 'baseManufacturerBankDto': this.list
}; }
SaveList(data).then((response) => { SaveList(data).then((response) => {
this.FormLoading = false; this.FormLoading = false
if (response.code === "200") { if (response.code === '200') {
setuser(response.data); setuser(response.data)
var jisid = response.data; var jisid = response.data
this.$notify({ this.$notify({
title: "提示", title: '提示',
message: "添加成功", message: '添加成功',
type: "success", type: 'success',
duration: 2000 duration: 2000
}) })
this.handleReturn('true') this.handleReturn('true')
} else { } else {
this.$notify({ this.$notify({
title: "提示", title: '提示',
message: "添加失败", message: '添加失败',
type: "error", type: 'error',
duration: 2000 duration: 2000
}) })
} }
@ -1264,33 +1246,33 @@ export default {
// this.temp.useOrg = abc.toString() // this.temp.useOrg = abc.toString()
// } // }
var data = { var data = {
"sid": this.sid, 'sid': this.sid,
"baseManufacturerDto": this.temp, 'baseManufacturerDto': this.temp,
"baseManufacturerFinanceDto": this.temp1, 'baseManufacturerFinanceDto': this.temp1,
"baseManufacturerBankDto": this.list 'baseManufacturerBankDto': this.list
}; }
Update(data).then((response) => { Update(data).then((response) => {
this.dialogStatus = "update"; this.dialogStatus = 'update'
this.FormLoading = false; this.FormLoading = false
if (response.code === "200") { if (response.code === '200') {
this.$notify({ this.$notify({
title: "提示", title: '提示',
message: "修改成功", message: '修改成功',
type: "success", type: 'success',
duration: 2000 duration: 2000
}) })
this.handleReturn('true') this.handleReturn('true')
} else { } else {
this.$notify({ this.$notify({
title: "失败", title: '失败',
message: "修改失败", message: '修改失败',
type: "error" type: 'error'
}) })
} }
}) })
} }
} }
}); })
}, },
handleSubmit() { handleSubmit() {
@ -1298,7 +1280,7 @@ export default {
getHangYe(value) { getHangYe(value) {
let bb = null let bb = null
this.industryons.forEach((e) => { this.industryons.forEach((e) => {
if (e.dictKey == value) { if (e.dictKey === value) {
bb = { bb = {
type: 'industry', type: 'industry',
name: e.dictValue, name: e.dictValue,
@ -1311,7 +1293,7 @@ export default {
getGong(value) { getGong(value) {
let bb = null let bb = null
this.supplier.forEach((e) => { this.supplier.forEach((e) => {
if (e.dictKey == value) { if (e.dictKey === value) {
bb = { bb = {
type: 'supplierType', type: 'supplierType',
name: e.dictValue, name: e.dictValue,
@ -1324,7 +1306,7 @@ export default {
getFen(value) { getFen(value) {
let bb = null let bb = null
this.typeOptions.forEach((e) => { this.typeOptions.forEach((e) => {
if (e.dictKey == value) { if (e.dictKey === value) {
bb = { bb = {
type: 'supplyType', type: 'supplyType',
name: e.dictValue, name: e.dictValue,
@ -1337,7 +1319,7 @@ export default {
getShang(value) { getShang(value) {
let bb = null let bb = null
this.grouping.forEach((e) => { this.grouping.forEach((e) => {
if (e.dictKey == value) { if (e.dictKey === value) {
bb = { bb = {
type: 'supplierGroup', type: 'supplierGroup',
name: e.dictValue, name: e.dictValue,
@ -1347,17 +1329,19 @@ export default {
}) })
this.temp.supplierGroupValue = bb.name this.temp.supplierGroupValue = bb.name
} }
}, }
}; }
</script> </script>
<style scoped> <style scoped>
.filter-item_province, .filter-item { .filter-item_province, .filter-item {
width: 27%; width: 27%;
padding-right: 10px; padding-right: 10px;
} }
.addinputw01{
.addinputw01 {
width: 92% !important; width: 92% !important;
} }
/deep/ .el-col-3 { /deep/ .el-col-3 {
text-align: right; text-align: right;
float: left; float: left;
@ -1365,6 +1349,7 @@ export default {
line-height: 42px !important; line-height: 42px !important;
/*font-weight: 600;*/ /*font-weight: 600;*/
} }
/deep/ .el-col-4 { /deep/ .el-col-4 {
text-align: right; text-align: right;
float: left; float: left;

166
anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshanglook.vue

@ -3,11 +3,10 @@
<div class="tab-header webtop"> <div class="tab-header webtop">
<div>厂商管理详情</div> <div>厂商管理详情</div>
<div> <div>
<!-- <el-button type="primary" size="small" @click="dialogStatus==='create'?handleCreate():updateData()">保存</el-button> -->
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> <el-button type="info" size="small" @click="handleReturn()">返回</el-button>
</div> </div>
</div> </div>
<div class="listconadd"> <div class="listconadd">
<el-form ref="dataForm" :title="textMap[dialogStatus]" :model="temp" class="formadd" :rules="rules"> <el-form ref="dataForm" :title="textMap[dialogStatus]" :model="temp" class="formadd" :rules="rules">
<div class="title">基本信息</div> <div class="title">基本信息</div>
<el-row> <el-row>
@ -15,8 +14,8 @@
<span>厂商名称</span> <span>厂商名称</span>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item prop="manufacturerName"> <el-form-item>
<span>{{temp.manufacturerName}}</span> <span>{{ temp.manufacturerName }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
@ -24,7 +23,7 @@
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item> <el-form-item>
<span>{{temp.manufacturerAs}}</span> <span>{{ temp.manufacturerAs }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -34,15 +33,15 @@
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item> <el-form-item>
<span>{{temp.manufacturerCode}}</span> <span>{{ temp.manufacturerCode }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<span>分类</span> <span>分类</span>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item prop="supplierTypeValue"> <el-form-item>
<span>{{temp.supplierTypeValue}}</span> <span>{{ temp.supplierTypeValue }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -51,8 +50,8 @@
<span>通讯地址</span> <span>通讯地址</span>
</el-col> </el-col>
<el-col :span="21"> <el-col :span="21">
<el-form-item prop="manufacturerAddress"> <el-form-item>
<span>{{temp.manufacturerAddress}}</span> <span>{{ temp.manufacturerAddress }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -61,16 +60,16 @@
<span>厂商办公电话</span> <span>厂商办公电话</span>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item prop="manufacturerTelePhone"> <el-form-item>
<span>{{temp.manufacturerTelePhone}}</span> <span>{{ temp.manufacturerTelePhone }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<span>传真</span> <span>传真</span>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item prop="manufacturerFax"> <el-form-item>
<span>{{temp.manufacturerFax}}</span> <span>{{ temp.manufacturerFax }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -79,16 +78,16 @@
<span>联系人姓名</span> <span>联系人姓名</span>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item prop="contactName"> <el-form-item>
<span>{{temp.contactName}}</span> <span>{{ temp.contactName }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<span>联系人手机号</span> <span>联系人手机号</span>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item prop="contactMobile"> <el-form-item>
<span>{{temp.contactMobile}}</span> <span>{{ temp.contactMobile }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -97,16 +96,16 @@
<span>联系人办公电话</span> <span>联系人办公电话</span>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item prop="contactTelePhone"> <el-form-item>
<span>{{temp.contactTelePhone}}</span> <span>{{ temp.contactTelePhone }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<span>微信号</span> <span>微信号</span>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item prop="weChatID"> <el-form-item>
<span>{{temp.weChatID}}</span> <span>{{ temp.weChatID }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -115,16 +114,16 @@
<span>邮编</span> <span>邮编</span>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item prop=""> <el-form-item>
<span>{{temp.zipCode}}</span> <span>{{ temp.zipCode }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<span>邮箱</span> <span>邮箱</span>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item prop=""> <el-form-item>
<span>{{temp.email}}</span> <span>{{ temp.email }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -311,6 +310,7 @@
<el-table-column prop="swiftCode" width="200px" label="swiftcode(银行代码)" align="center"/> <el-table-column prop="swiftCode" width="200px" label="swiftcode(银行代码)" align="center"/>
<el-table-column prop="currency" width="130px" label="币种" align="center"/> <el-table-column prop="currency" width="130px" label="币种" align="center"/>
<el-table-column prop="remarks" width="240px" label="描述" align="center"/> <el-table-column prop="remarks" width="240px" label="描述" align="center"/>
<el-table-column prop="actualPay" width="240px" label="厂家销售通路" align="center"/>
</el-table> </el-table>
</el-form> </el-form>
</div> </div>
@ -318,14 +318,13 @@
</template> </template>
<script> <script>
import changshang from "../changshang.vue"; import changshang from '../changshang.vue'
import {mapGetters} from "vuex"; import { details } from '@/api/jichuxinxi/basemanufacturer'
import {details} from "@/api/jichuxinxi/basemanufacturer";
// import { getFileType, parseDate, parseTime, ConvertMenuState } from "@/utils"; // import { getFileType, parseDate, parseTime, ConvertMenuState } from "@/utils";
// import { findButtonByUserId } from '@/api/sys/permission' // import { findButtonByUserId } from '@/api/sys/permission'
export default { export default {
name: "ChangshangguanliAdd", name: 'ChangshangguanliAdd',
components: {changshang}, components: { changshang },
data() { data() {
return { return {
// --------- // ---------
@ -338,92 +337,34 @@ export default {
input: false, // input: false, //
output: false, // output: false, //
upload: false, // upload: false, //
release: false, // release: false //
}, },
FormLoading: false, FormLoading: false,
listLoading: false, listLoading: false,
templook: {}, //
textMap: { textMap: {
update: "修改", update: '修改',
create: "创建", create: '创建'
}, },
tableKey: 0, tableKey: 0,
index: 0, index: 0,
list:[], list: [],
temp:{}, temp: {},
temp1:{}, temp1: {},
temp2:{}, temp2: {},
dialogFormVisible: false, // dialogStatus: '', //
dialogFormShowVisible: false, // rules: {}
dialogStatus: "", // }
fenzuOptions: [
{ value: "1", label: "单位" },
{ value: "2", label: "个人" },
],
rules: {
manufacturerName: [
{ required: true, message: "请填写厂商名称", trigger: "blur" },
],
manufacturerAddress: [
{ required: true, message: "请填写厂商通讯地址", trigger: "blur" },
],
manufacturerTelePhone: [
{ required: true, message: "请填写厂商办公电话", trigger: "blur" },
],
contactName: [
{ required: true, message: "请填写联系人名字", trigger: "blur" },
],
contactMobile: [
{ required: true, message: "请填写联系人手机号", trigger: "blur" },
],
supplyType: [
{ required: true, message: "请填写供应类别", trigger: "blur" },
],
createOrg: [
{ required: true, message: "请填写创建组织", trigger: "blur" },
],
useOrg: [
{ required: true, message: "请填写使用组织", trigger: "blur" },
],
},
tempDate: {},
// ------------------------------------
};
},
computed: {
...mapGetters([
"id",
"roles",
"rolesIds",
"departmentId",
"departmentCode",
]),
},
created() {
}, },
methods: { methods: {
init() {},
// ------------------------------------------------------ // ------------------------------------------------------
// //
handleReturn() { handleReturn() {
this.$emit('doback') this.$emit('doback')
}, },
// showInfo(sid) {
resetTemp() {
this.temp = {
jc: "", // false string
organizationId: "", // false string
qc: "", // false string
remark: "", // false
string: "", //
state: "", //
};
},
showInfo(sid){
this.sid = sid this.sid = sid
details(sid).then((response) => { details(sid).then((response) => {
if (response.code === "200") { if (response.code === '200') {
if (response.data.baseManufacturerDto.useOrg) { if (response.data.baseManufacturerDto.useOrg) {
this.useOrgArry = response.data.baseManufacturerDto.useOrg this.useOrgArry = response.data.baseManufacturerDto.useOrg
} }
@ -438,26 +379,9 @@ export default {
} }
} }
}) })
}, }
// }
handleCheck() { }
this.FormLoading = true;
details(this.tempDate.sid).then((response) => {
this.FormLoading = false;
if (response.code === "200") {
this.temp = response.data;
console.log("查询1", this.temp);
} else {
this.$notify({
title: "失败",
message: "查询失败",
type: "error",
});
}
});
},
},
};
</script> </script>
<style scoped> <style scoped>
/deep/ .el-col-3 { /deep/ .el-col-3 {

67
anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/relation/changshangBankInfo.vue

@ -24,10 +24,9 @@
<span>账户类型</span> <span>账户类型</span>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="dueBank"> <!--dueBankKey dueBankValue--> <el-form-item prop="dueBank">
<el-select v-model="bankInfo.dueBankKey" class="addinputw" placeholder="" @change="receiptBankChange"> <el-select v-model="bankInfo.dueBankKey" class="addinputw" placeholder="" @change="receiptBankChange">
<el-option v-for="item in receiptBank_list" :key="item.dictKey" :label="item.dictValue" <el-option v-for="item in receiptBank_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
:value="item.dictKey"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -46,9 +45,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="bankAccount"> <el-form-item prop="bankAccount">
<!--@keyup.native="bankInfo.bankAccount = oninput(bankInfo.bankAccount,2)"--> <el-input v-model="bankInfo.bankAccount" maxlength="125" placeholder="" class="addinputw" clearable onkeyup="value=value.replace(/[^\d]/g,'')"/>
<el-input v-model="bankInfo.bankAccount" maxlength="125" placeholder="" class="addinputw" clearable
onkeyup="value=value.replace(/[^\d]/g,'')"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -84,8 +81,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="paymentLines"> <el-form-item prop="paymentLines">
<el-input v-model="bankInfo.paymentLines" maxlength="125" placeholder="" class="addinputw" clearable <el-input v-model="bankInfo.paymentLines" maxlength="125" placeholder="" class="addinputw" clearable onkeyup="value=value.replace(/[^\d]/g,'')"/>
onkeyup="value=value.replace(/[^\d]/g,'')"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -116,7 +112,16 @@
<el-input v-model="bankInfo.remarks" maxlength="125" placeholder="" class="addinputw" clearable/> <el-input v-model="bankInfo.remarks" maxlength="125" placeholder="" class="addinputw" clearable/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"/> <el-col :span="4">
<span>厂家销售通路</span>
</el-col>
<el-col :span="8">
<el-form-item>
<el-select v-model="bankInfo.actualPay" class="addinputw" placeholder="" @change="actualPayChange">
<el-option v-for="item in actualPay_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
@ -125,16 +130,17 @@
</template> </template>
<script> <script>
import {typeValues} from "@/api/jichuxinxi/dictcommons"; import { typeValues } from '@/api/jichuxinxi/dictcommons'
export default { export default {
name: "changshangBankInfo", name: 'changshangBankInfo',
data() { data() {
return { return {
bankInfo_index: '', bankInfo_index: '',
viewState: '', viewState: '',
dialogStatus: '', dialogStatus: '',
receiptBank_list: [], receiptBank_list: [],
actualPay_list: [],
bankInfo: { bankInfo: {
country: '中国', country: '中国',
dueBankValue: '', dueBankValue: '',
@ -147,31 +153,41 @@ export default {
swiftCode: '', swiftCode: '',
currency: '人民币', currency: '人民币',
remarks: '', remarks: '',
actualPay: '',
actualPayKey: ''
}, },
rules: { rules: {
manufacturerName: [{ manufacturerName: [{
required: true, required: true,
message: '请填写厂商名称', message: '请填写厂商名称',
trigger: 'blur' trigger: 'blur'
}], }]
}, }
} }
}, },
methods: { methods: {
getType() { // getType() { //
typeValues({ typeValues({ type: 'dueBank' }).then((res) => {
type: 'dueBank'
}).then((res) => {
if (res.success) { if (res.success) {
this.receiptBank_list = res.data this.receiptBank_list = res.data
} }
}) })
typeValues({ type: 'sellChannel' }).then((res) => {
if (res.success) {
this.actualPay_list = res.data
}
})
}, },
receiptBankChange(val) { receiptBankChange(val) {
if (val) { if (val) {
const choosetItem = this.receiptBank_list.filter((item) => item.dictKey == val) const choosetItem = this.receiptBank_list.filter((item) => item.dictKey === val)
this.bankInfo.dueBankValue = choosetItem[0].dictValue this.bankInfo.dueBankValue = choosetItem[0].dictValue
console.log('name:', this.bankInfo.dueBankValue, 'key:', this.bankInfo.dueBankKey) }
},
actualPayChange(value) {
if (value) {
const choosetItem = this.actualPay_list.filter((item) => item.dictValue === value)
this.bankInfo.actualPayKey = choosetItem[0].dictKey
} }
}, },
showAdd() { showAdd() {
@ -186,7 +202,9 @@ export default {
paymentLines: '', paymentLines: '',
swiftCode: '', swiftCode: '',
currency: '人民币', currency: '人民币',
remarks: '' remarks: '',
actualPay: '',
actualPayKey: ''
} }
this.bankInfo_index = '' this.bankInfo_index = ''
this.dialogStatus = 'add' this.dialogStatus = 'add'
@ -201,7 +219,7 @@ export default {
this.getType() this.getType()
}, },
handleCreate() { handleCreate() {
if (this.dialogStatus == 'add') { if (this.dialogStatus === 'add') {
if (JSON.stringify(this.bankInfo) !== '{}') { if (JSON.stringify(this.bankInfo) !== '{}') {
this.$emit('handleBankInfo', this.bankInfo, this.bankInfo_index) this.$emit('handleBankInfo', this.bankInfo, this.bankInfo_index)
} else { } else {
@ -209,10 +227,10 @@ export default {
showClose: true, showClose: true,
message: '请填写开户行信息!', message: '请填写开户行信息!',
type: 'error' type: 'error'
}); })
} }
} }
if (this.dialogStatus == 'edit') { if (this.dialogStatus === 'edit') {
this.$emit('handleBankInfo', this.bankInfo, this.bankInfo_index) this.$emit('handleBankInfo', this.bankInfo, this.bankInfo_index)
} }
}, },
@ -229,11 +247,12 @@ export default {
paymentLines: '', paymentLines: '',
swiftCode: '', swiftCode: '',
currency: '人民币', currency: '人民币',
remarks: '' remarks: '',
actualPay: ''
} }
this.bankInfo_index = '' this.bankInfo_index = ''
this.$emit('doback') this.$emit('doback')
}, }
} }
} }
</script> </script>

Loading…
Cancel
Save