|
@@ -4,41 +4,42 @@
|
|
|
<el-drawer
|
|
|
title="创建报价单"
|
|
|
:visible.sync="dialogFormVisible"
|
|
|
- size="800px"
|
|
|
+ size="50%"
|
|
|
direction="rtl"
|
|
|
append-to-body
|
|
|
@close="onClose">
|
|
|
<div class="drawer__panel">
|
|
|
- <el-row :gutter="120">
|
|
|
+ <el-row :gutter="20">
|
|
|
<el-form :model="form" :rules="rules" ref="form" label-width="120px" label-position="right" size="mini">
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="项目名称" >
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="项目名称:" >
|
|
|
<el-input v-model="form.projectname" placeholder="请选择项目" style="width: 100%" @focus="projectList"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="项目编号" >
|
|
|
- <el-input v-model="form.projectnum" placeholder="请输入项目编号" style="width: 100%"></el-input>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="项目编号:" >
|
|
|
+ <el-input v-model="form.projectnum" placeholder="项目编号" style="width: 100%" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="收件单位" >
|
|
|
- <el-input v-model="form.sys_enterpriseid" placeholder="请选择收件单位" style="width: 100%" @focus="enterpriseList"></el-input>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="收件单位:" prop="enterprisename">
|
|
|
+ <el-input v-model="form.enterprisename" placeholder="请选择收件单位" style="width: 100%" @focus="enterpriseList"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="收件人" >
|
|
|
- <el-input v-model="form.contactsid" placeholder="请选择收件人" style="width: 100%" ></el-input>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="收件人:" prop="name">
|
|
|
+ <el-input v-model="form.name" placeholder="请选择收件人" style="width: 100%" @focus="contactsList"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="收件手机号" >
|
|
|
- <el-input v-model="form.phonenumber" placeholder="请输入联系方式" style="width: 100%" ></el-input>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="收件手机号:" >
|
|
|
+ <el-input v-model="form.phonenumber" placeholder="联系方式" style="width: 100%" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="报价单有效期" >
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="报价单有效期:" >
|
|
|
<el-date-picker
|
|
|
+ style="width: 100%"
|
|
|
v-model="form.invaliddate"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
@@ -46,28 +47,30 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <!-- <el-col :span="10">
|
|
|
- <el-form-item label="备注" >
|
|
|
- <el-input v-model="form.remarks" placeholder="请输入备注信息" style="width: 100%"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>-->
|
|
|
- <el-col :span="20">
|
|
|
+ <el-col :span="24">
|
|
|
<p>商品明细报价</p>
|
|
|
</el-col>
|
|
|
- <el-col :span="20">
|
|
|
+ <el-col :span="24">
|
|
|
<hr style="margin-top: 2%;margin-bottom: 2%">
|
|
|
</el-col>
|
|
|
- <el-col :span="10">
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="整单折扣(系数)" >
|
|
|
- <el-input v-model="form.discountrate" placeholder="保留两位小数" style="width: 100%"></el-input>
|
|
|
+ <el-input v-model="form.discountrate" placeholder="保留两位小数" style="width: 50%"></el-input>
|
|
|
+ <div>
|
|
|
+ <div style="float: left;color:red">
|
|
|
+ <span>*</span>
|
|
|
+ </div>
|
|
|
+ <span style="font-size: 10px;float: left"> 若无商品明细折扣信息,则以整单折扣计算;若有商品明细折扣信息,则以商品明细折扣计算</span>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="2" :offset="1">
|
|
|
- <el-button size="small" @click="dialogProjectVisible = false" type="primary" class="normal-btn-width el-icon-plus">添加商品明细</el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="2">
|
|
|
- <el-button size="small" @click="dialogProjectVisible = false" type="info" class="normal-btn-width">删除</el-button>
|
|
|
+ <el-col :span="12" >
|
|
|
+ <el-button size="small" @click="dialogProjectVisible = false" type="info" class="inline-16" style="float: right">删除</el-button>
|
|
|
+ <el-button size="small" @click="dialogProjectVisible = false" type="primary" class="el-icon-plus inline-16" style="float: right">添加商品明细</el-button>
|
|
|
</el-col>
|
|
|
+ <product></product>
|
|
|
</el-form>
|
|
|
</el-row>
|
|
|
</div>
|
|
@@ -76,116 +79,25 @@
|
|
|
<el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
-<!-- <el-dialog title="新 建" :visible.sync="dialogFormVisible" width="900px">
|
|
|
- <div slot="title" style="font-size: 15px">
|
|
|
- 新增报价单
|
|
|
- </div>
|
|
|
- <el-row :gutter="120">
|
|
|
- <el-form :model="form" :rules="rules" ref="form" label-width="120px" label-position="right" size="mini">
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="项目名称" >
|
|
|
- <el-input v-model="form.projectname" placeholder="请选择项目" style="width: 100%" @focus="projectList"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="项目编号" >
|
|
|
- <el-input v-model="form.projectnum" placeholder="请输入项目编号" style="width: 100%"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="收件单位" >
|
|
|
- <el-input v-model="form.sys_enterpriseid" placeholder="请选择收件单位" style="width: 100%" @focus="enterpriseList"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="收件人" >
|
|
|
- <el-input v-model="form.contactsid" placeholder="请选择收件人" style="width: 100%" ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="收件手机号" >
|
|
|
- <el-input v-model="form.phonenumber" placeholder="请输入联系方式" style="width: 100%" ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="报价单有效期" >
|
|
|
- <el-date-picker
|
|
|
- v-model="form.invaliddate"
|
|
|
- type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择日期">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-<!– <el-col :span="10">
|
|
|
- <el-form-item label="备注" >
|
|
|
- <el-input v-model="form.remarks" placeholder="请输入备注信息" style="width: 100%"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>–>
|
|
|
- <el-col :span="20">
|
|
|
- <p>商品明细报价</p>
|
|
|
- </el-col>
|
|
|
- <el-col :span="20">
|
|
|
- <hr style="margin-top: 2%;margin-bottom: 2%">
|
|
|
- </el-col>
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="整单折扣(系数)" >
|
|
|
- <el-input v-model="form.discountrate" placeholder="保留两位小数" style="width: 100%"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="2" :offset="1">
|
|
|
- <el-button size="small" @click="dialogProjectVisible = false" type="primary" class="normal-btn-width el-icon-plus">添加商品明细</el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="2">
|
|
|
- <el-button size="small" @click="dialogProjectVisible = false" type="info" class="normal-btn-width">删除</el-button>
|
|
|
- </el-col>
|
|
|
- </el-form>
|
|
|
- </el-row>
|
|
|
- <div class="dialog-footer">
|
|
|
- <el-button size="small" @click="dialogProjectVisible = false" class="normal-btn-width">取 消</el-button>
|
|
|
- <el-button size="small" type="warning" @click="onSubmit" class="normal-btn-width btn-warning">确 定</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>-->
|
|
|
-<!-- <el-dialog title="新 建" :visible.sync="dialogProjectVisible" width="900px">
|
|
|
- <div slot="title" style="font-size: 15px">
|
|
|
- 选择项目
|
|
|
- </div>
|
|
|
-<!– <layoutTable :layout="tablecols" :data="list" :opwidth="200" :custom="true" :height="tableHieght" :checkbox="true" >
|
|
|
- <template v-slot:customcol="scope">
|
|
|
- <p>{{scope.column.data[scope.column.columnname]}}</p>
|
|
|
- </template>
|
|
|
- </layoutTable>–>
|
|
|
- <layoutTable @checkboxCallBack="checkboxCallBack" :layout="tablecols" :data="list" :opwidth="200" :custom="false" :height="320" :checkbox="true">
|
|
|
- </layoutTable>
|
|
|
- <div style="margin-top:16px;text-align:right">
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- small
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage"
|
|
|
- :page-size="params.content.pageSize"
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
- :total="total">
|
|
|
- </el-pagination>
|
|
|
- </div>
|
|
|
- <div class="dialog-footer">
|
|
|
- <el-button size="small" @click="dialogProjectVisible = false" class="normal-btn-width">取 消</el-button>
|
|
|
- <el-button size="small" type="warning" @click="onProject" @rowClick="onProject" class="normal-btn-width btn-warning">确 定</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>-->
|
|
|
- <project :visible="visible" v-if="visible" @onProject="onProject"></project>
|
|
|
+ <project :visible="visibleProject" :index="index" v-if="visibleProject" @onProject="onProject"></project>
|
|
|
+ <enterprise :visible="visibleEnterprise" :index="index" :sa_projectid="form.sa_projectid" v-if="visibleEnterprise" @onEnterprise="onEnterprise"></enterprise>
|
|
|
+ <contacts :visible="visibleContacts" :index="index" :sys_enterpriseid="form.sys_enterpriseid" v-if="visibleContacts" @onContacts="onContacts"></contacts>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import layoutTable from '@/components/table/index3'
|
|
|
-import project from '../../SDrpManagement/QuotedPrice/detail/components/project'
|
|
|
+import project from '@/SDrpManagement/QuotedPrice/detail/components/project'
|
|
|
+import enterprise from "@/SDrpManagement/QuotedPrice/detail/components/enterprise";
|
|
|
+import contacts from "@/SDrpManagement/QuotedPrice/detail/components/contacts";
|
|
|
+import product from "@/SDrpManagement/QuotedPrice/detail/components/product";
|
|
|
export default {
|
|
|
name: "add",
|
|
|
data(){
|
|
|
return {
|
|
|
- visible:false,
|
|
|
+ visibleProject:false,
|
|
|
+ visibleEnterprise:false,
|
|
|
+ visibleContacts:false,
|
|
|
dialogFormVisible:false,
|
|
|
dialogProjectVisible:false,
|
|
|
tableHieght:320,
|
|
@@ -193,10 +105,15 @@ export default {
|
|
|
list:[],
|
|
|
total:0,
|
|
|
currentPage:0,
|
|
|
+ index:'',
|
|
|
form:{
|
|
|
sa_quotedpriceid:0, //sat_notice_classid<=0时 为新增
|
|
|
sys_enterpriseid: "",
|
|
|
- sa_projectid: "",
|
|
|
+ enterprisename:"",
|
|
|
+ sa_projectid: "0",
|
|
|
+ contactsid:"",
|
|
|
+ name:"",
|
|
|
+ phonenumber:"",
|
|
|
discountrate:"" ,
|
|
|
remarks: "",
|
|
|
invaliddate: "",
|
|
@@ -204,7 +121,14 @@ export default {
|
|
|
address: "",
|
|
|
projectnum:""
|
|
|
},
|
|
|
- rules:{},
|
|
|
+ rules:{
|
|
|
+ enterprisename: [
|
|
|
+ { required: true, message: '单位不能为空', trigger: 'change' },
|
|
|
+ ],
|
|
|
+ name: [
|
|
|
+ { required: true, message: '联系人不能为空', trigger: 'change' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
projectData:[],
|
|
|
params:{
|
|
|
"id": 20221020143502,
|
|
@@ -220,65 +144,38 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
components:{
|
|
|
- layoutTable,project
|
|
|
+ layoutTable,project,enterprise,contacts,product
|
|
|
},
|
|
|
methods:{
|
|
|
- async onSubmit(){
|
|
|
+ onSubmit(){
|
|
|
console.log(this.form)
|
|
|
- const res = await this.$api.requested({
|
|
|
- "id": 20221020164803,
|
|
|
- "version":1,
|
|
|
- "content":this.form
|
|
|
- })
|
|
|
- this.tool.showMessage(res,()=> {
|
|
|
- console.log(res)
|
|
|
- this.$refs['form'].resetFields();
|
|
|
- this.$emit("onSuccess")
|
|
|
- this.dialogFormVisible = false
|
|
|
+ this.$refs['form'].validate(async (valid) => {
|
|
|
+ if (!valid) return false
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20221020164803,
|
|
|
+ "version":1,
|
|
|
+ "content":this.form
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=> {
|
|
|
+ console.log(res)
|
|
|
+ this.$refs['form'].resetFields();
|
|
|
+ this.$emit("onSuccess")
|
|
|
+ this.dialogFormVisible = false
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
- /*projectShow(){
|
|
|
-
|
|
|
- this.projectList()
|
|
|
- },*/
|
|
|
projectList(){
|
|
|
- this.visible = true
|
|
|
+ this.visibleProject = true
|
|
|
},
|
|
|
/*收件单位*/
|
|
|
- async enterpriseList(){
|
|
|
+ enterpriseList(){
|
|
|
console.log(this.form.projectname)
|
|
|
- if (this.form.projectname === ''){
|
|
|
- const res = await this.$api.requested({
|
|
|
- "id":"20220920083901",
|
|
|
- "content":{
|
|
|
- "pageNumber":1,
|
|
|
- "pageSize":20,
|
|
|
- "where":{
|
|
|
- "condition":"",
|
|
|
- "type":2,
|
|
|
- "sa_projectid":""
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- console.log("输出")
|
|
|
- console.log(res)
|
|
|
- }else {
|
|
|
- const res = await this.$api.requested({
|
|
|
- "id":"20220920083901",
|
|
|
- "content":{
|
|
|
- "pageNumber":1,
|
|
|
- "pageSize":20,
|
|
|
- "where":{
|
|
|
- "condition":"",
|
|
|
- "type":4,
|
|
|
- "sa_projectid":this.form.sa_projectid
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- console.log("缔约方输出")
|
|
|
- console.log(res)
|
|
|
- }
|
|
|
-
|
|
|
+ this.visibleEnterprise = true
|
|
|
+ },
|
|
|
+ /*联系人*/
|
|
|
+ contactsList(){
|
|
|
+ console.log(this.form.sys_enterpriseid)
|
|
|
+ this.visibleContacts = true
|
|
|
},
|
|
|
handleSizeChange(val) {
|
|
|
// console.log(`每页 ${val} 条`);
|
|
@@ -294,10 +191,28 @@ export default {
|
|
|
this.visible = false
|
|
|
console.log("获取")
|
|
|
console.log(data)
|
|
|
- this.form = data
|
|
|
+ /*this.form = data*/
|
|
|
this.form.sa_projectid = data.sa_projectid
|
|
|
this.form.projectname = data.projectname
|
|
|
this.form.projectnum = data.projectnum
|
|
|
+ this.form.address = data.address
|
|
|
+ this.index = data.index
|
|
|
+ },
|
|
|
+ onEnterprise(data){
|
|
|
+ this.visible = false
|
|
|
+ console.log("企业信息")
|
|
|
+ console.log(data)
|
|
|
+ this.form.sys_enterpriseid = data.sys_enterpriseid
|
|
|
+ this.form.enterprisename = data.enterprisename
|
|
|
+
|
|
|
+ },
|
|
|
+ onContacts(data){
|
|
|
+ this.visible = false
|
|
|
+ console.log("联系人信息")
|
|
|
+ console.log(data)
|
|
|
+ this.form.contactsid = data.contactsid
|
|
|
+ this.form.name = data.name
|
|
|
+ this.form.phonenumber = data.phonenumber
|
|
|
},
|
|
|
checkboxCallBack(data) {
|
|
|
console.log("选择12354")
|