Commit aa676b66 authored by 张冬's avatar 张冬

跳转问题

parent 6e93dc1f
......@@ -15,13 +15,40 @@
</el-table-column>
</dataTable>
<el-dialog :visible.sync="dialogVisible" title="添加标的" width="50%">
<dataForm
<!-- <dataForm
ref="dataform"
:search-form="searchForm"
:search-data="searchData"
:rules="rules"
:is-inline="true"
:is-handle="false"
label-width="200px"></dataForm>
label-width="200px"></dataForm> -->
<el-form :model="searchData" :rules="rules" ref="searchData" label-width="100px" >
<el-form-item label="标的编码:" prop="encoding">
<el-input v-model.trim="searchData.encoding" placeholder='请输入' maxlength="30"></el-input>
</el-form-item>
<el-form-item label="标的名称:" prop="bidName">
<el-input v-model.trim="searchData.bidName" placeholder='请输入' maxlength="30"></el-input>
</el-form-item>
<el-form-item label="数量:" prop="quantity">
<el-input v-model.trim="searchData.quantity" placeholder='请输入' maxlength="30"></el-input>
</el-form-item>
<el-form-item label="计量单位:" prop="unit">
<el-input v-model.trim="searchData.unit" placeholder='请输入' maxlength="30"></el-input>
</el-form-item>
<el-form-item label="品牌:" prop="brand">
<el-input v-model.trim="searchData.brand" placeholder='请输入' maxlength="30"></el-input>
</el-form-item>
<el-form-item label="规格型号:" prop="specification">
<el-input v-model.trim="searchData.specification" placeholder='请输入' maxlength="30"></el-input>
</el-form-item>
<el-form-item label="标杆价(元):" prop="price">
<el-input v-model.trim="searchData.price" placeholder='请输入' maxlength="30"></el-input>
</el-form-item>
<el-form-item label="备注:" prop="remark">
<el-input v-model.trim="searchData.remark" placeholder='请输入' maxlength="30"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="sure">确 定</el-button>
......@@ -45,7 +72,77 @@ export default {
},
data() {
return {
projectCommodityList:[],
// searchForm: [{
// type: 'input',
// label: '标的编码:',
// prop: 'encoding',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '标的名称:',
// prop: 'bidName',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '数量:',
// prop: 'quantity',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '计量单位:',
// prop: 'unit',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '品牌:',
// prop: 'brand',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '规格型号:',
// prop: 'specification',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '标杆价(元):',
// prop: 'price',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// },
// {
// type: 'input',
// label: '备注:',
// prop: 'remark',
// width: '100%',
// placeholder: '请输入',
// disabled: false
// }
// ],
// 表单验证
rules: {
bidName: [{requied: true, message: '请输入', trigger: 'blur'}],
encoding:[{requied: true, message: '请输入', trigger: 'blur'}]
},
projectCommodityList:[],
dialogVisible: false,
searchData: {
encoding: '',
......@@ -57,71 +154,6 @@ export default {
price: '',
remark:""
},
searchForm: [{
type: 'input',
label: '标的编码:',
prop: 'encoding',
width: '100%',
placeholder: '请输入',
disabled: false
},
{
type: 'input',
label: '标的名称:',
prop: 'bidName',
width: '100%',
placeholder: '请输入',
disabled: false
},
{
type: 'input',
label: '数量:',
prop: 'quantity',
width: '100%',
placeholder: '请输入',
disabled: false
},
{
type: 'input',
label: '计量单位:',
prop: 'unit',
width: '100%',
placeholder: '请输入',
disabled: false
},
{
type: 'input',
label: '品牌:',
prop: 'brand',
width: '100%',
placeholder: '请输入',
disabled: false
},
{
type: 'input',
label: '规格型号:',
prop: 'specification',
width: '100%',
placeholder: '请输入',
disabled: false
},
{
type: 'input',
label: '标杆价(元):',
prop: 'price',
width: '100%',
placeholder: '请输入',
disabled: false
},
{
type: 'input',
label: '备注:',
prop: 'remark',
width: '100%',
placeholder: '请输入',
disabled: false
}
],
tableData: [],
columns: [{
selection: true
......
......@@ -132,9 +132,9 @@
<div v-show="ruleForm.bidType==1">
<div style="margin-bottom: 20px;">
<el-button type="primary" @click="dialogFormVisible=true">添加</el-button>
<el-button>删除</el-button>
<el-button @click="delAllSelection">删除</el-button>
</div>
<dataTable :table-data="ruleForm.companyVOList" :columns="columns" :page-obj="pageObj" :margin-top="10" :margin-bottom="0">
<dataTable :table-data="ruleForm.companyVOList" :columns="columns" :page-obj="pageObj" :margin-top="10" :margin-bottom="0" @sendSelection="getSelection">
<el-table-column slot="operate" label="操作" align="center" fixed="right" width="100">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleDelete(scope.row)">删除</el-button>
......@@ -186,8 +186,7 @@
:margin-top="10"
:margin-bottom="0"
:checklist="checklist"
url="/company/list"
@sendSelection="getSelection">
url="/company/list">
<el-table-column slot="operate" label="操作" align="center" fixed="right" width="100">
<template slot-scope="scope">
<el-button type="text" size="small" @click="choice(scope.row)">选择</el-button>
......@@ -441,7 +440,8 @@ export default {
provinceId: '',
cityId: '',
districtId: '',
multipleSelection:[]
multipleSelection:[],
companyVOList:[]
}
}
},
......@@ -464,7 +464,7 @@ export default {
})
.then(() => {
this.$message.success('删除成功')
this.tableData.splice(index, 1)
this.ruleForm.companyVOList.splice(index, 1)
})
.catch(() => {})
},
......@@ -474,18 +474,21 @@ export default {
},
// 获取邀请的供应商列表
getSelection(val) {
console.log(val)
this.multipleSelection = val
},
// 删除操作
delAllSelection() {
const length = this.multipleSelection.length;
let str = '';
this.delList = this.ruleForm.companyVOList.concat(this.multipleSelection);
for (let i = 0; i < length; i++) {
str += this.multipleSelection[i].name + ' ';
}
this.$message.error(`删除了${str}`);
this.multipleSelection = [];
let val = this.multipleSelection
val.forEach((va, index) => {
this.ruleForm.companyVOList.forEach((v, i) => {
if (va.id === v.id) {
this.ruleForm.companyVOList.splice(i, 1)
}
})
})
this.$message.error("删除成功");
this.multipleSelection = [];
},
// 到下一步
async next() {
......
......@@ -56,7 +56,7 @@ export default {
},
data() {
return {
activeIdx: 0,
activeIdx: 1,
allForm: {}
}
},
......
......@@ -134,6 +134,7 @@ export default {
},
created(){
let token=getSearchString("token");
console.log(token)
localStorage.setItem("token",token)
},
methods: {
......
export function getSearchString(key) {
// 获取URL中?之后的字符
var str = location.search;
var str = location.href;
var str=str.split("?")[1]
console.log(str)
str = str.substring(1,str.length);
str = str.substring(0,str.length);
console.log(str)
// 以&分隔字符串,获得类似name=xiaoli这样的元素数组
var arr = str.split("&");
var obj = new Object();
// 将每一个数组元素以=分隔并赋给obj对象
for(var i = 0; i < arr.length; i++) {
var tmp_arr = arr[i].split("=");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment