plm前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

730 lines
27 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div class="mode-config" style="padding: 5px">
  3. <el-form :inline="true" label-position="top" :model="searchData">
  4. <el-row>
  5. <el-col :span="24">
  6. <el-form-item label="客户编码">
  7. <el-input v-model="searchData.customerNo" placeholder="请输入内容" clearable style="width: 120px"/>
  8. </el-form-item>
  9. <el-form-item label="客户名称">
  10. <el-input v-model="searchData.customerName" placeholder="请输入内容" clearable style="width: 120px"/>
  11. </el-form-item>
  12. <el-form-item label="跟单员">
  13. <el-input v-model="searchData.trackerName" placeholder="请输入内容" clearable style="width: 120px"/>
  14. </el-form-item>
  15. <el-form-item label="报价单号">
  16. <el-input v-model="searchData.quotationNo" placeholder="请输入内容" clearable style="width: 120px"/>
  17. </el-form-item>
  18. <el-form-item label="客户询价单号">
  19. <el-input v-model="searchData.customerInquiryNo" placeholder="请输入内容" clearable style="width: 120px"/>
  20. </el-form-item>
  21. <el-form-item label="内部询价单号">
  22. <el-input v-model="searchData.internalInquiryNo" placeholder="请输入内容" clearable style="width: 120px"/>
  23. </el-form-item>
  24. <el-form-item label="状态">
  25. <el-select v-model="searchData.quotationStatus" placeholder="请选择" style="width: 120px">
  26. <el-option label="全部" value=""></el-option>
  27. <el-option label="草稿" value="草稿"></el-option>
  28. <el-option label="下达" value="下达"></el-option>
  29. </el-select>
  30. </el-form-item>
  31. </el-col>
  32. </el-row>
  33. <el-row>
  34. <el-col :span="24">
  35. <el-form-item label="项目编码">
  36. <el-input v-model="searchData.projectId" placeholder="请输入内容" clearable style="width: 120px"/>
  37. </el-form-item>
  38. <el-form-item label="项目名称">
  39. <el-input v-model="searchData.projectName" placeholder="请输入内容" clearable style="width: 120px"/>
  40. </el-form-item>
  41. <el-form-item label="销售员">
  42. <el-input v-model="searchData.quoterName" placeholder="请输入内容" size="large" clearable style="width: 120px;height: 28px"/>
  43. </el-form-item>
  44. <el-form-item label="报价日期">
  45. <el-date-picker
  46. style="width: 255px"
  47. v-model="searchData.dateValue"
  48. type="daterange"
  49. size="mini"
  50. format="yyyy/MM/dd"
  51. value-format="yyyy-MM-dd"
  52. range-separator="至"
  53. start-placeholder="开始日期"
  54. end-placeholder="结束日期"
  55. @change="changeDateRange"
  56. placeholder="选择日期">
  57. </el-date-picker>
  58. </el-form-item>
  59. <el-form-item label=" ">
  60. <el-button plain type="primary" @click="initData" @keyup.enter.native="initData">查询</el-button>
  61. <el-button type="primary" @click="insertDiaLogFlag = true">新增</el-button>
  62. </el-form-item>
  63. </el-col>
  64. </el-row>
  65. </el-form>
  66. <!-- 表格 和上述搜索框对应 -->
  67. <el-table :data="tableData" @row-click="rowClickQuotation" stripe border style="width: 100%;margin-top: 12px" :height="height">
  68. <el-table-column
  69. label="操作"
  70. align="center"
  71. fixed
  72. width="60">
  73. <template slot-scope="scope">
  74. <el-button type="text" style="padding: 0px 10px" size="small">下达</el-button>
  75. </template>
  76. </el-table-column>
  77. <el-table-column
  78. align="center"
  79. prop="quotationNo"
  80. label="报价单号"
  81. show-overflow-tooltip
  82. width="120">
  83. </el-table-column>
  84. <el-table-column
  85. align="center"
  86. prop="quotationDate"
  87. label="报价日期"
  88. show-overflow-tooltip
  89. width="120">
  90. </el-table-column>
  91. <el-table-column
  92. align="center"
  93. prop="customerNo"
  94. show-overflow-tooltip
  95. label="客户编码">
  96. </el-table-column>
  97. <el-table-column
  98. align="center"
  99. prop="customerName"
  100. show-overflow-tooltip
  101. label="客户名称">
  102. </el-table-column>
  103. <el-table-column
  104. align="center"
  105. prop="versionCode"
  106. show-overflow-tooltip
  107. label="版本号">
  108. </el-table-column>
  109. <el-table-column
  110. align="center"
  111. prop="projectId"
  112. show-overflow-tooltip
  113. label="项目编码">
  114. </el-table-column>
  115. <el-table-column
  116. align="center"
  117. prop="projectName"
  118. show-overflow-tooltip
  119. label="项目名称">
  120. </el-table-column>
  121. <el-table-column
  122. align="center"
  123. prop="quoterName"
  124. width="60"
  125. show-overflow-tooltip
  126. label="销售员">
  127. </el-table-column>
  128. <el-table-column
  129. align="center"
  130. prop="trackerName"
  131. width="60"
  132. show-overflow-tooltip
  133. label="跟单员">
  134. </el-table-column>
  135. <el-table-column
  136. align="center"
  137. prop="currency"
  138. width="60"
  139. show-overflow-tooltip
  140. label="货币">
  141. </el-table-column>
  142. <el-table-column
  143. align="center"
  144. prop="quotationStatus"
  145. show-overflow-tooltip
  146. width="60"
  147. label="状态">
  148. </el-table-column>
  149. <el-table-column
  150. align="center"
  151. prop="remark"
  152. show-overflow-tooltip
  153. width="60"
  154. label="备注">
  155. </el-table-column>
  156. <el-table-column
  157. align="center"
  158. prop="customerInquiryNo"
  159. show-overflow-tooltip
  160. label="客户询价单号">
  161. </el-table-column>
  162. <el-table-column
  163. align="center"
  164. prop="internalInquiryNo"
  165. show-overflow-tooltip
  166. label="内部询价单号">
  167. </el-table-column>
  168. </el-table>
  169. <!-- 分页插件 -->
  170. <el-pagination style="margin-top: 0px"
  171. @size-change="quotationHeaderSizeChange"
  172. @current-change="quotationHeaderCurrentChange"
  173. :current-page="no"
  174. :page-sizes="[20, 50, 100, 200, 500]"
  175. :page-size="size"
  176. :total="total"
  177. layout="total,sizes, prev, pager, next, jumper">
  178. </el-pagination>
  179. <!-- 标签页 -->
  180. <el-tabs v-model="activeTabName" @tab-click="handleClickTab"
  181. style="box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);border: 2px;min-height: 440px;margin-top: 5px;padding: 5px">
  182. <el-tab-pane label="明细" name="quotation_detail">
  183. <quotation-detail :quotation-header="quotationHeader"></quotation-detail>
  184. </el-tab-pane>
  185. <el-tab-pane label="审批" name="quotation_examine_and_approve">
  186. <quotation-examine-and-approve></quotation-examine-and-approve>
  187. </el-tab-pane>
  188. <el-tab-pane label="项目信息" name="quotation_project_information">
  189. <quotation-project-information :quotation-header="quotationHeader"></quotation-project-information>
  190. </el-tab-pane>
  191. <el-tab-pane label="客户信息" name="quotation_customer_information">
  192. <quotation-customer-information :quotation-header="quotationHeader"></quotation-customer-information>
  193. </el-tab-pane>
  194. <el-tab-pane label="客户联系人" name="quotation_customer_contact">
  195. <quotation-customer-contact :quotation-header="quotationHeader"></quotation-customer-contact>
  196. </el-tab-pane>
  197. </el-tabs>
  198. <!-- 新增弹框 -->
  199. <el-dialog title="新增报价" @close="closeInsertDialog" :close-on-click-modal="false" v-drag :visible.sync="insertDiaLogFlag" width="620px">
  200. <el-form :rules="rules" :inline="true" label-position="top" ref="insertQuotationForm" :model="insertData"
  201. label-width="120px">
  202. <el-row>
  203. <el-col :span="24">
  204. <el-form-item prop="internalInquiryNo">
  205. <span slot="label" style="" @click="quotationNoDialogFlag = true"><a herf="#">内部询价单号</a></span>
  206. <el-input v-model="insertData.internalInquiryNo" placeholder="请输入内容" clearable style="width: 280px"/>
  207. </el-form-item>
  208. <el-form-item label="客户询价单号" prop="customerInquiryNo">
  209. <el-input v-model="insertData.customerInquiryNo" placeholder="请输入内容" clearable style="width: 280px"/>
  210. </el-form-item>
  211. </el-col>
  212. <el-col :span="24">
  213. <el-form-item prop="customerNo">
  214. <span slot="label" style="" v-if="insertData.internalInquiryNo ==''" @click="getBaseList(102,1)"><a herf="#">客户编码</a></span>
  215. <span slot="label" style="" v-else><a herf="#">客户编码</a></span>
  216. <el-input v-model="insertData.customerNo" :disabled="insertData.internalInquiryNo !=''" placeholder="请输入内容" clearable style="width: 280px"/>
  217. </el-form-item>
  218. <el-form-item prop="customerName">
  219. <span slot="label" style="" v-if="insertData.internalInquiryNo ==''" @click="getBaseList(102,1)"><a herf="#">客户</a></span>
  220. <span slot="label" style="" v-else><a herf="#">客户</a></span>
  221. <el-input v-model="insertData.customerName" :disabled="insertData.internalInquiryNo !=''" placeholder="请输入内容" clearable style="width: 280px"/>
  222. </el-form-item>
  223. </el-col>
  224. <el-col :span="24">
  225. <el-form-item prop="projectId">
  226. <span slot="label" style="" v-if="insertData.internalInquiryNo ==''" @click="getBaseList(104,1)"><a herf="#">项目编码</a></span>
  227. <span slot="label" style="" v-else><a herf="#">项目编码</a></span>
  228. <el-input v-model="insertData.projectId" :disabled="insertData.internalInquiryNo !=''" placeholder="请输入内容" clearable style="width: 280px"/>
  229. </el-form-item>
  230. <el-form-item prop="projectName">
  231. <span slot="label" style="" v-if="insertData.internalInquiryNo ==''" @click="getBaseList(104,1)"><a herf="#">项目名称</a></span>
  232. <span slot="label" style="" v-else><a herf="#">项目名称</a></span>
  233. <el-input v-model="insertData.projectName" :disabled="insertData.internalInquiryNo !=''" placeholder="请输入内容" clearable style="width: 280px"/>
  234. </el-form-item>
  235. </el-col>
  236. <el-col :span="24">
  237. <el-form-item label="货币" prop="currency">
  238. <el-input v-model="insertData.currency" placeholder="请输入内容" size="large" clearable style="width: 280px"/>
  239. </el-form-item>
  240. <el-form-item label="报价日期" prop="quotationDate">
  241. <el-date-picker
  242. style="width: 280px"
  243. v-model="insertData.quotationDate"
  244. type="date"
  245. size="mini"
  246. format="yyyy/MM/dd"
  247. value-format="yyyy-MM-dd"
  248. placeholder="选择日期">
  249. </el-date-picker>
  250. </el-form-item>
  251. </el-col>
  252. <el-col>
  253. <el-form-item prop="quoter">
  254. <span slot="label" style="" v-if="insertData.internalInquiryNo ==''" @click="getBaseList(103,2)"><a herf="#">销售员</a></span>
  255. <span slot="label" style="" v-else><a herf="#">销售员</a></span>
  256. <el-input v-model="insertData.quoterName" :disabled="insertData.internalInquiryNo !=''" @clear="clearQuoter" placeholder="请输入内容" clearable style="width: 280px"/>
  257. </el-form-item>
  258. <el-form-item prop="tracker">
  259. <span slot="label" style="" v-if="insertData.internalInquiryNo ==''" @click="getBaseList(103,1)"><a herf="#">跟单员</a></span>
  260. <span slot="label" style="" v-else ><a herf="#">跟单员</a></span>
  261. <el-input v-model="insertData.trackerName" :disabled="insertData.internalInquiryNo !=''" @clear="clearTracker" placeholder="请输入内容" size="large" clearable style="width: 280px"/>
  262. </el-form-item>
  263. </el-col>
  264. <el-col :span="24">
  265. <el-form-item label="状态" prop="quotationStatus">
  266. <el-select v-model="insertData.quotationStatus" style="width: 280px" :disabled="insertData.internalInquiryNo !=''" clearable placeholder="请选择" >
  267. <el-option label="草稿" value="草稿"></el-option>
  268. <el-option label="下达" value="下达"></el-option>
  269. </el-select>
  270. </el-form-item>
  271. <el-form-item label=" ">
  272. <el-checkbox v-model="insertData.requireApproval" style="width: 23%" true-label="0" false-label="1" label="需要审批"></el-checkbox>
  273. <el-checkbox v-model="insertData.approvalStatus" style="width: 22%" true-label="已审批" false-label="未审批" label="是否审批"></el-checkbox>
  274. </el-form-item>
  275. </el-col>
  276. <el-col :span="24">
  277. <el-form-item label="备注" style="width: 100%;min-height: 70px">
  278. <el-input type="textarea" style="width: 100%" :show-word-limit="true" v-model="insertData.remark"/>
  279. </el-form-item>
  280. </el-col>
  281. </el-row>
  282. </el-form>
  283. <el-footer style="height:30px;margin-top: 20px;text-align:center">
  284. <el-button type="primary" @click="insertDiaLogFlag = false">关闭</el-button>
  285. <el-button type="primary" :loading="insertQuotationHeaderBtn" @click="insertQuotationHeader">保存</el-button>
  286. </el-footer>
  287. </el-dialog>
  288. <!--询价单号选择弹框-->
  289. <el-dialog title="内部询价单号"
  290. :close-on-click-modal="false" :close-on-press-escape="false"
  291. @close="closeQuotationNoDialog"
  292. @open="openQuotationNoDialog"
  293. :visible.sync="quotationNoDialogFlag"
  294. width="685px" v-drag>
  295. <el-form label-position="top"
  296. inline="inline"
  297. :model="quotationNoSearchData"
  298. size="mini"
  299. label-width="120px">
  300. <el-form-item label="询价单号">
  301. <el-input v-model="quotationNoSearchData.quotationNo" clearable/>
  302. </el-form-item>
  303. <el-form-item label=" ">
  304. <el-button type="primary" style="padding: 3px 12px" @click="searchQuotationData">查询</el-button>
  305. </el-form-item>
  306. </el-form>
  307. <el-table :data="quotationNoData" stripe border @cell-dblclick="dblclickQuotationNo">
  308. <el-table-column prop="quotationNo" label="询价单号">
  309. </el-table-column>
  310. <el-table-column prop="projectName" label="项目名称">
  311. </el-table-column>
  312. </el-table>
  313. <el-footer style="height:30px;margin-top: 20px;text-align:center">
  314. <el-button type="primary" @click="quotationNoDialogFlag = false">关闭</el-button>
  315. </el-footer>
  316. </el-dialog>
  317. <!-- chooseList模态框 -->
  318. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  319. </div>
  320. </template>
  321. <script>
  322. import quotationDetail from "../../../components/quotation/sellForQuotation/quotationDetail.vue";
  323. import quotationExamineAndApprove from "../../../components/quotation/sellForQuotation/quotationExamineAndApprove.vue";
  324. import quotationProjectInformation from "../../../components/quotation/sellForQuotation/quotationProjectInformation.vue";
  325. import quotationCustomerInformation from "../../../components/quotation/sellForQuotation/quotationCustomerInformation.vue";
  326. import quotationCustomerContact from "../../../components/quotation/sellForQuotation/quotationCustomerContact.vue";
  327. import Chooselist from '@/views/modules/common/Chooselist';
  328. import {
  329. getQuotationHeaderByPage,
  330. insertQuotationHeader,
  331. } from '@/api/quotation/quotationHeader.js';
  332. import {
  333. searchQuotationByQuotationNo,
  334. } from '@/api/quotation/quotationInformation.js';
  335. export default {
  336. components:{
  337. Chooselist,
  338. quotationDetail,
  339. quotationExamineAndApprove,
  340. quotationProjectInformation,
  341. quotationCustomerInformation,
  342. quotationCustomerContact,
  343. },
  344. data () {
  345. return {
  346. // 搜索条件对象
  347. searchData:{
  348. site:this.$store.state.user.site,// 工厂编号
  349. customerNo:"", // 客户编码
  350. customer:"", // 客户名称
  351. tracker:"", // 跟单员
  352. quotationStatus:"", //状态
  353. projectId:"", // 项目编码
  354. projectName:"", // 项目名称
  355. quoterName:"", // 销售员
  356. startDate:"", // 开始日期
  357. endDate:"", // 结束日期
  358. dateValue:[],// 开始时间结束时间数组
  359. },
  360. tableData: [],// 查询的数据
  361. // 分页信息
  362. no:1,//页码
  363. size:20,//每页条数
  364. total:0,//总页数
  365. // 表格高度
  366. height:400,
  367. // 标签页
  368. activeTabName:"quotation_detail",
  369. //dialog 控制开关
  370. insertDiaLogFlag:false,
  371. quotationNoDialogFlag:false,
  372. // 新增对象
  373. insertData:{
  374. site:this.$store.state.user.site,
  375. quotationNo:"",//客户报价单号
  376. quotationDate:new Date(),//报价日期
  377. customerNo:"", // 客户编号
  378. customerName:"",//客户名称
  379. versionCode:"001",
  380. projectId:"",//项目编码
  381. projectName:"",//项目名称
  382. tracker:"",//跟单员
  383. quoter:"",//销售编号
  384. quoterName:"",//销售员
  385. trackerName:"",//跟单员
  386. currency:"",//货币
  387. quotationStatus:"草稿",//状态
  388. remark:"",//备注
  389. customerInquiryNo:"",//客户询价单号
  390. internalInquiryNo:"",//内部询价单号
  391. requireApproval:"",//需要审批
  392. approvalStatus:"",//审批状态
  393. createBy:this.$store.state.user.id,//当前登录账号
  394. createDate:new Date(),//当前时间
  395. },
  396. quotationHeaderColumns:[
  397. {label:"quotationNo",value:"客户报价单号"},
  398. {label:"quotationDate",value:"报价日期"},
  399. {label:"customerNo",value:"客户编码"},
  400. {label:"customerName",value:"客户名称"},
  401. {label:"versionCode",value:"版本号"},
  402. {label:"projectId",value:"项目编码"},
  403. {label:"projectName",value:"项目名称"},
  404. {label:"quoterName",value:"销售员"},
  405. {label:"trackerName",value:"跟单员"},
  406. {label:"currency",value:"货币"},
  407. {label:"quotationStatus",value:"状态"},
  408. {label:"remark",value:"备注"},
  409. {label:"customerInquiryNo",value:"客户询价单号"},
  410. {label:"internalInquiryNo",value:"内部询价单号"},
  411. {label:"requireApproval",value:"需要审批"},
  412. {label:"approvalStatus",value:"审批状态"},
  413. {label:"createBy",value:"创建人"},
  414. {label:"createDate",value:"创建时间"},
  415. {label:"updateBy",value:"更新人"},
  416. {label:"updateDate",value:"更新时间"},
  417. ],
  418. // 规则
  419. rules: {
  420. customerNo: [
  421. { required: true,message:' '},
  422. ],
  423. customerName: [
  424. { required: true,message:' '},
  425. ],
  426. projectId:[
  427. { required: true,message:' '}
  428. ],
  429. projectName:[
  430. { required: true,message:' '}
  431. ],
  432. tracker:[
  433. { required: true,message:' '}
  434. ],
  435. trackerName:[
  436. { required: true,message:' '}
  437. ],
  438. currency:[
  439. { required: true,message:' '}
  440. ],
  441. quoter:[
  442. { required: true,message:' '}
  443. ],
  444. quoterName:[
  445. { required: true,message:' '}
  446. ],
  447. quotationStatus:[
  448. { required: true,message:' '}
  449. ],
  450. quotationDate:[
  451. { required: true,message:' '}
  452. ],
  453. },
  454. // 参数 选择框
  455. tagNo1:"",
  456. tagNo:"",
  457. // 内部报价单搜索表单对象
  458. quotationNoSearchData:{
  459. quotationNo:"",//单号
  460. site:this.$store.state.user.site,//工厂编号
  461. },
  462. //内部报价单搜索表格数据对象
  463. quotationNoData:[],
  464. // 行对象
  465. quotationHeader:{},
  466. // 按钮防重复
  467. insertQuotationHeaderBtn:false,
  468. }
  469. },
  470. methods: {
  471. // 点击quotation行事件
  472. rowClickQuotation(row){
  473. this.quotationHeader = row;
  474. },
  475. // 搜索条件中的时间输入框 change事件
  476. changeDateRange(){
  477. if (this.searchData.dateValue){
  478. this.searchData.startDate = this.searchData.dateValue[0];
  479. this.searchData.endDate = this.searchData.dateValue[1];
  480. }else {
  481. this.searchData.startDate="";
  482. this.searchData.endDate="";
  483. }
  484. },
  485. // 初始化数据
  486. initData(){
  487. let params = {
  488. no:this.no,
  489. size:this.size,
  490. site:this.$store.state.user.site,
  491. customerNo:this.searchData.customerNo,
  492. customerName:this.searchData.customerName,
  493. trackerName:this.searchData.trackerName,
  494. quotationNo:this.searchData.quotationNo,
  495. customerInquiryNo:this.searchData.customerInquiryNo,
  496. internalInquiryNo:this.searchData.internalInquiryNo,
  497. quotationStatus:this.searchData.quotationStatus,
  498. projectId:this.searchData.projectId,
  499. projectName:this.searchData.projectName,
  500. quoterName:this.searchData.quoterName,
  501. startDate:this.searchData.startDate,
  502. endDate: this.searchData.endDate,
  503. }
  504. getQuotationHeaderByPage(params).then(({data})=>{
  505. this.tableData = data.data.records;
  506. this.total = data.data.total;
  507. this.quotationHeader = this.tableData[0];
  508. })
  509. },
  510. // size 发送改变
  511. quotationHeaderSizeChange(val){
  512. this.size = val;
  513. this.initData();
  514. },
  515. // no发生改变
  516. quotationHeaderCurrentChange(val){
  517. this.no = val;
  518. this.initData();
  519. },
  520. // 新增QuotationHeader
  521. insertQuotationHeader(){
  522. // 校验
  523. this.$refs['insertQuotationForm'].validate((valid,objects)=>{
  524. if (valid){
  525. this.insertQuotationHeaderBtn = true;
  526. // 请求
  527. insertQuotationHeader(this.insertData).then(({data})=>{
  528. console.log("回调结果:",data)
  529. // 返回提示
  530. if (data.code === 200){
  531. this.initData();
  532. this.insertQuotationHeaderBtn = false;
  533. this.insertDiaLogFlag = false;
  534. }
  535. this.$message.success(data.msg);
  536. })
  537. }else {
  538. this.rulesValidateLabel(objects,this.quotationHeaderColumns);
  539. }
  540. })
  541. },
  542. // 校验处理
  543. rulesValidateLabel(objects, labels) {
  544. for (let filed in objects) {
  545. for (let i = 0; i < labels.length; i++) {
  546. let quotationToolColumn = labels[i];
  547. if (quotationToolColumn.label === filed) {
  548. this.$message.warning(quotationToolColumn.value+"填写不正确");
  549. return
  550. }
  551. }
  552. }
  553. },
  554. // resetInsertData 重置新增对象
  555. resetInsertData(){
  556. this.insertData = {
  557. site:this.$store.state.user.site,
  558. quotationNo:"",//客户报价单号
  559. quotationDate:new Date(),//报价日期
  560. customerNo:"", // 客户编号
  561. customerName:"",//客户名称
  562. versionCode:"001",
  563. projectId:"",//项目编码
  564. projectName:"",//项目名称
  565. tracker:"",//跟单员
  566. quoter:"",//销售编号
  567. quoterName:"",//销售员
  568. trackerName:"",//跟单员
  569. currency:"",//货币
  570. quotationStatus:"草稿",//状态
  571. remark:"",//备注
  572. customerInquiryNo:"",//客户询价单号
  573. internalInquiryNo:"",//内部询价单号
  574. requireApproval:"",//需要审批
  575. approvalStatus:"",//审批状态
  576. createBy:this.$store.state.user.id,//当前登录账号
  577. createDate:new Date(),//当前时间
  578. }
  579. },
  580. // 销售员输入框清除事件
  581. clearQuoter(){
  582. this.insertData.quoter = "";
  583. this.insertData.quoterName = "";
  584. },
  585. // 跟单员输入框清除事件
  586. clearTracker(){
  587. this.insertData.tracker = "";
  588. this.insertData.trackerName = "";
  589. },
  590. // 新增弹框关闭事件
  591. closeInsertDialog(){
  592. this.resetInsertData();
  593. this.$refs['insertQuotationForm'].resetFields();
  594. },
  595. // 点击标签页
  596. handleClickTab(tab, event){
  597. },
  598. // ======== chooseList相关方法 ========
  599. /**
  600. * 获取基础数据列表S
  601. * @param val
  602. * @param type
  603. */
  604. getBaseList (val, type) {
  605. this.tagNo = val
  606. this.tagNo1 = type
  607. this.$nextTick(() => {
  608. let strVal = ''
  609. if (val === 102) {
  610. if(type === 1) {
  611. strVal = this.insertData.customerNo
  612. }
  613. }
  614. if (val === 103) {
  615. if(type === 1) {
  616. strVal = this.insertData.tracker
  617. }
  618. if(type === 2) {
  619. strVal = this.insertData.quoter
  620. }
  621. }
  622. if (val === 104) {
  623. if(type === 1) {
  624. strVal = this.insertData.projectId
  625. }
  626. }
  627. this.$refs.baseList.init(val, strVal)
  628. })
  629. },
  630. /**
  631. * 列表方法的回调
  632. * @param val
  633. */
  634. getBaseData (val) {
  635. if (this.tagNo === 102) {
  636. if(this.tagNo1 === 1) {
  637. this.insertData.customerNo = val.Customer_no
  638. this.insertData.customerName = val.Customer_desc
  639. }
  640. }
  641. if (this.tagNo === 103) {
  642. if(this.tagNo1 === 1) {
  643. this.insertData.tracker = val.username
  644. this.insertData.trackerName = val.user_display
  645. }
  646. if(this.tagNo1 === 2) {
  647. this.insertData.quoter = val.username
  648. this.insertData.quoterName = val.user_display
  649. }
  650. }
  651. if (this.tagNo === 104) {
  652. if(this.tagNo1 === 1) {
  653. this.insertData.projectId = val.project_id
  654. this.insertData.projectName = val.project_name
  655. }
  656. }
  657. },
  658. // 查询 内部报价单编号
  659. searchQuotationData(){
  660. searchQuotationByQuotationNo(this.quotationNoSearchData).then(({data})=>{
  661. this.quotationNoData = data.data;
  662. })
  663. },
  664. // 打开 内部报价单拟态框
  665. openQuotationNoDialog(){
  666. // 请求
  667. this.searchQuotationData();
  668. },
  669. // 关闭
  670. closeQuotationNoDialog(){
  671. this.quotationNoSearchData = {
  672. quotationNo:"",//单号
  673. site:this.$store.state.user.site,//工厂编号
  674. }
  675. },
  676. // 询价表双击事件
  677. dblclickQuotationNo(row){
  678. this.insertData.customerNo = row.customerNo;
  679. this.insertData.customerName=row.customerDesc;//客户名称
  680. this.insertData.projectId=row.projectId;//项目编码
  681. this.insertData.projectName=row.projectName;//项目名称
  682. this.insertData.tracker=row.tracker;//跟单员
  683. this.insertData.quoter=row.quoter;//销售编号
  684. this.insertData.quoterName=row.quoterName;//销售员
  685. this.insertData.trackerName=row.trackerName;//跟单员
  686. this.insertData.quotationStatus=row.quotationStatus;//状态
  687. this.insertData.internalInquiryNo=row.quotationNo;//内部询价单号
  688. // 关闭弹框
  689. this.quotationNoDialogFlag = false;
  690. }
  691. },
  692. computed:{
  693. },
  694. mounted () {
  695. this.$nextTick(() => {
  696. this.height = window.innerHeight / 2 - 240;
  697. })
  698. },
  699. created () {
  700. this.initData();//初始化数据
  701. },
  702. }
  703. </script>
  704. <style scoped lang="scss">
  705. /deep/ .el-range-editor--mini.el-input__inner {
  706. height: 20px;
  707. }
  708. /deep/ .el-range-editor.el-input__inner{
  709. padding: 0px 10px;
  710. }
  711. /deep/ .el-date-editor .el-range-separator{
  712. width: auto;
  713. }
  714. /deep/ .el-input--mini .el-input__icon{
  715. line-height: 20px;
  716. }
  717. </style>