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.

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