Commit aa676b66 authored by 张冬's avatar 张冬

跳转问题

parent 6e93dc1f
...@@ -15,13 +15,40 @@ ...@@ -15,13 +15,40 @@
</el-table-column> </el-table-column>
</dataTable> </dataTable>
<el-dialog :visible.sync="dialogVisible" title="添加标的" width="50%"> <el-dialog :visible.sync="dialogVisible" title="添加标的" width="50%">
<dataForm <!-- <dataForm
ref="dataform" ref="dataform"
:search-form="searchForm" :search-form="searchForm"
:search-data="searchData" :search-data="searchData"
:rules="rules"
:is-inline="true" :is-inline="true"
:is-handle="false" :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"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button> <el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="sure">确 定</el-button> <el-button type="primary" @click="sure">确 定</el-button>
...@@ -45,7 +72,77 @@ export default { ...@@ -45,7 +72,77 @@ export default {
}, },
data() { data() {
return { 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, dialogVisible: false,
searchData: { searchData: {
encoding: '', encoding: '',
...@@ -57,71 +154,6 @@ export default { ...@@ -57,71 +154,6 @@ export default {
price: '', price: '',
remark:"" 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: [], tableData: [],
columns: [{ columns: [{
selection: true selection: true
......
...@@ -132,9 +132,9 @@ ...@@ -132,9 +132,9 @@
<div v-show="ruleForm.bidType==1"> <div v-show="ruleForm.bidType==1">
<div style="margin-bottom: 20px;"> <div style="margin-bottom: 20px;">
<el-button type="primary" @click="dialogFormVisible=true">添加</el-button> <el-button type="primary" @click="dialogFormVisible=true">添加</el-button>
<el-button>删除</el-button> <el-button @click="delAllSelection">删除</el-button>
</div> </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"> <el-table-column slot="operate" label="操作" align="center" fixed="right" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="handleDelete(scope.row)">删除</el-button> <el-button type="text" size="small" @click="handleDelete(scope.row)">删除</el-button>
...@@ -186,8 +186,7 @@ ...@@ -186,8 +186,7 @@
:margin-top="10" :margin-top="10"
:margin-bottom="0" :margin-bottom="0"
:checklist="checklist" :checklist="checklist"
url="/company/list" url="/company/list">
@sendSelection="getSelection">
<el-table-column slot="operate" label="操作" align="center" fixed="right" width="100"> <el-table-column slot="operate" label="操作" align="center" fixed="right" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="choice(scope.row)">选择</el-button> <el-button type="text" size="small" @click="choice(scope.row)">选择</el-button>
...@@ -441,7 +440,8 @@ export default { ...@@ -441,7 +440,8 @@ export default {
provinceId: '', provinceId: '',
cityId: '', cityId: '',
districtId: '', districtId: '',
multipleSelection:[] multipleSelection:[],
companyVOList:[]
} }
} }
}, },
...@@ -464,7 +464,7 @@ export default { ...@@ -464,7 +464,7 @@ export default {
}) })
.then(() => { .then(() => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.tableData.splice(index, 1) this.ruleForm.companyVOList.splice(index, 1)
}) })
.catch(() => {}) .catch(() => {})
}, },
...@@ -474,18 +474,21 @@ export default { ...@@ -474,18 +474,21 @@ export default {
}, },
// 获取邀请的供应商列表 // 获取邀请的供应商列表
getSelection(val) { getSelection(val) {
console.log(val)
this.multipleSelection = val this.multipleSelection = val
}, },
// 删除操作 // 删除操作
delAllSelection() { delAllSelection() {
const length = this.multipleSelection.length; let val = this.multipleSelection
let str = ''; val.forEach((va, index) => {
this.delList = this.ruleForm.companyVOList.concat(this.multipleSelection); this.ruleForm.companyVOList.forEach((v, i) => {
for (let i = 0; i < length; i++) { if (va.id === v.id) {
str += this.multipleSelection[i].name + ' '; this.ruleForm.companyVOList.splice(i, 1)
} }
this.$message.error(`删除了${str}`); })
this.multipleSelection = []; })
this.$message.error("删除成功");
this.multipleSelection = [];
}, },
// 到下一步 // 到下一步
async next() { async next() {
......
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
}, },
data() { data() {
return { return {
activeIdx: 0, activeIdx: 1,
allForm: {} allForm: {}
} }
}, },
......
...@@ -134,6 +134,7 @@ export default { ...@@ -134,6 +134,7 @@ export default {
}, },
created(){ created(){
let token=getSearchString("token"); let token=getSearchString("token");
console.log(token)
localStorage.setItem("token",token) localStorage.setItem("token",token)
}, },
methods: { methods: {
......
export function getSearchString(key) { export function getSearchString(key) {
// 获取URL中?之后的字符 // 获取URL中?之后的字符
var str = location.search; var str = location.href;
var str=str.split("?")[1]
console.log(str) console.log(str)
str = str.substring(1,str.length); str = str.substring(0,str.length);
console.log(str) console.log(str)
// 以&分隔字符串,获得类似name=xiaoli这样的元素数组 // 以&分隔字符串,获得类似name=xiaoli这样的元素数组
var arr = str.split("&"); var arr = str.split("&");
var obj = new Object(); var obj = new Object();
// 将每一个数组元素以=分隔并赋给obj对象 // 将每一个数组元素以=分隔并赋给obj对象
for(var i = 0; i < arr.length; i++) { for(var i = 0; i < arr.length; i++) {
var tmp_arr = arr[i].split("="); 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