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.

851 lines
29 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="mod-config">
  3. <el-dialog
  4. width="600px"
  5. :title="!dataForm.id ? '添加' :'编辑'"
  6. :close-on-click-modal="false"
  7. :visible.sync="visible">
  8. <el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole">
  9. <el-form-item >
  10. <span slot="label" style="" @click="chooseProofingModel()"><a herf="#">打样单号</a></span>
  11. <el-input v-model="dataForm.proofingNo" style="width: 130px" @change="changeProofingNoChange" :disabled="dataForm.id!=0"></el-input>
  12. </el-form-item>
  13. <el-form-item label=" " >
  14. <el-checkbox v-model="jumpFlag">保存后跳转至详情</el-checkbox>
  15. </el-form-item>
  16. <el-form-item prop="testPartNo" :rules="dataRole.testPartNo" style="margin-left: 12px">
  17. <span slot="label" style="" @click="getBaseList(134,1)" ><a herf="#">项目料号</a></span>
  18. <el-input v-model="dataForm.testPartNo" @change="changeTestDesc" style="width: 130px" :disabled="dataForm.id!=0" ></el-input>
  19. </el-form-item>
  20. </el-form>
  21. <el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole">
  22. <el-form-item :label="'正式料号'">
  23. <el-input v-model="dataForm.finalPartNo" style="width: 130px" disabled></el-input>
  24. </el-form-item>
  25. <el-form-item :label="'项目号'">
  26. <el-input v-model="dataForm.projectId" style="width: 130px" disabled></el-input>
  27. </el-form-item>
  28. <el-form-item :label="'物料描述'">
  29. <el-input v-model="dataForm.partDesc" style="width: 274px" disabled></el-input>
  30. </el-form-item>
  31. </el-form>
  32. <el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole">
  33. <el-form-item :label="'参数卡编码'" >
  34. <el-input v-model="dataForm.oriCodeNo" disabled style="width: 130px" ></el-input>
  35. </el-form-item>
  36. <el-form-item :label="'版本号'" prop="revNo" :rules="dataRole.revNo">
  37. <el-input v-model="dataForm.revNo" style="width: 130px" :disabled="dataForm.id!=0" ></el-input>
  38. </el-form-item>
  39. <el-form-item >
  40. <span slot="label" style="" @click="getUserList(1)"><a herf="#">CQC人员</a></span>
  41. <el-input v-model="dataForm.cqcOperatorName" ref="cqcOperatorName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  42. </el-form-item>
  43. <el-form-item >
  44. <span slot="label" style="" @click="getUserList(2)"><a herf="#">FAI人员</a></span>
  45. <el-input v-model="dataForm.faiOperatorName" ref="faiOperatorName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  46. </el-form-item>
  47. <!-- <el-form-item >-->
  48. <!-- <span slot="label" style="" @click="quotationOfficerChooseModal()"><a herf="#">报价员</a></span>-->
  49. <!-- <el-input v-model="dataForm.quotationOfficer" readonly style="width: 274px" @focus="quotationOfficerChooseModal()"></el-input>-->
  50. <!-- </el-form-item>-->
  51. </el-form>
  52. <el-form :inline="true" label-position="top" label-width="100px" >
  53. <el-form-item >
  54. <span slot="label" style="" @click="engineerChooseModal()"><a herf="#">Select PE Engineer</a></span>
  55. <el-input v-model="dataForm.engineer" readonly style="width: 274px" @focus="engineerChooseModal()"></el-input>
  56. </el-form-item>
  57. <el-form-item >
  58. <span slot="label" style="" @click="technicianModal()"><a herf="#">Select Artwork</a></span>
  59. <el-input v-model="dataForm.technician" readonly style="width: 274px" @focus="technicianModal()"></el-input>
  60. </el-form-item>
  61. </el-form>
  62. <el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole">
  63. <el-form-item >
  64. <span slot="label" style="" @click="getUserList(3)"><a herf="#">PE人员</a></span>
  65. <el-input v-model="dataForm.peOperaterName" ref="peOperaterName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  66. </el-form-item>
  67. <el-form-item >
  68. <span slot="label" style="" @click="getUserList(4)"><a herf="#">CS人员</a></span>
  69. <el-input v-model="dataForm.csOperaterName" ref="csOperaterName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  70. </el-form-item>
  71. <el-form-item >
  72. <span slot="label" style="" @click="getUserList(5)"><a herf="#">DCC人员</a></span>
  73. <el-input v-model="dataForm.dccOperaterName" ref="dccOperaterName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  74. </el-form-item>
  75. <el-form-item >
  76. <span slot="label" style="" @click="getUserList(6)"><a herf="#">MP人员</a></span>
  77. <el-input v-model="dataForm.mpOperatorName" ref="mpOperatorName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  78. </el-form-item>
  79. </el-form>
  80. <el-form :inline="true" label-position="top" label-width="100px" >
  81. <el-form-item :label="'备注'">
  82. <el-input
  83. type="textarea"
  84. v-model="dataForm.remark "
  85. :rows="3"
  86. resize='none'
  87. maxlength="120"
  88. show-word-limit
  89. style="width: 562px;height: 60px">
  90. </el-input>
  91. </el-form-item>
  92. </el-form>
  93. <el-form label-position="top" style="margin-top: 60px; margin-left: 0px;text-align:center">
  94. <el-button type="primary" @click="dataFormSubmit()">{{'确定'}}</el-button>
  95. <el-button type="primary" @click="visible = false">{{'关闭'}}</el-button>
  96. </el-form>
  97. </el-dialog>
  98. <el-dialog
  99. width="530px"
  100. title="报价员"
  101. :close-on-click-modal="false"
  102. :visible.sync="quotationOfficerFlag">
  103. <el-transfer v-model="quotationOfficerList" class="rq" filterable :props="{
  104. key: 'operatorId',
  105. label: 'operatorName'
  106. }" :data="operatorList" :titles="['未选择', '已选择']"></el-transfer>
  107. <span slot="footer" class="dialog-footer">
  108. <div style="margin-top: 5px">
  109. <el-button type="primary" @click="saveQuotationOfficerList()">确定</el-button>
  110. <el-button @click="quotationOfficerFlag = false" type="primary">取消</el-button>
  111. </div>
  112. </span>
  113. </el-dialog>
  114. <el-dialog
  115. width="530px"
  116. title="工程师"
  117. :close-on-click-modal="false"
  118. :visible.sync="engineerFlag">
  119. <el-transfer v-model="engineerList" class="rq" filterable :props="{
  120. key: 'operatorId',
  121. label: 'operatorName'
  122. }" :data="operatorList" :titles="['未选择', '已选择']"></el-transfer>
  123. <span slot="footer" class="dialog-footer">
  124. <div style="margin-top: 5px">
  125. <el-button type="primary" @click="saveEngineerList()">确定</el-button>
  126. <el-button @click="engineerFlag = false" type="primary">取消</el-button>
  127. </div>
  128. </span>
  129. </el-dialog>
  130. <el-dialog
  131. width="530px"
  132. title="项目负责人"
  133. :close-on-click-modal="false"
  134. :visible.sync="ownerFlag">
  135. <el-transfer v-model="technicianList" class="rq" filterable :props="{
  136. key: 'operatorId',
  137. label: 'operatorName'
  138. }" :data="operatorList" :titles="['未选择', '已选择']"></el-transfer>
  139. <span slot="footer" class="dialog-footer">
  140. <div style="margin-top: 5px">
  141. <el-button type="primary" @click="savetechnicianList()">确定</el-button>
  142. <el-button @click="ownerFlag = false" type="primary">取消</el-button>
  143. </div>
  144. </span>
  145. </el-dialog>
  146. <el-dialog
  147. width="900px"
  148. title="选择打样单"
  149. :close-on-click-modal="false"
  150. :visible.sync="proofingModelFlag">
  151. <el-form :inline="true" label-position="top" label-width="100px" >
  152. <el-form-item style="margin-left: 0px">
  153. <span slot="label" style="" @click="getBaseList(104,2)" ><a herf="#">项目号</a></span>
  154. <el-input v-model="proofingSearch.projectId" style="width: 130px" ></el-input>
  155. </el-form-item>
  156. <el-form-item style="margin-left: 0px">
  157. <span slot="label" style="" @click="getBaseList(501,2)" ><a herf="#">打样单</a></span>
  158. <el-input v-model="proofingSearch.proofingNo" style="width: 130px" ></el-input>
  159. </el-form-item>
  160. <el-form-item style="margin-left: 0px">
  161. <span slot="label" style="" @click="getBaseList(102,2)" ><a herf="#">直接客户</a></span>
  162. <el-input v-model="proofingSearch.customerId" style="width: 130px" ></el-input>
  163. </el-form-item>
  164. <el-form-item style="margin-left: 0px">
  165. <span slot="label" style="" @click="getBaseList(102,3)" ><a herf="#">最终客户</a></span>
  166. <el-input v-model="proofingSearch.finalCustomerId" style="width: 130px" ></el-input>
  167. </el-form-item>
  168. <el-form-item label=" ">
  169. <el-button type="primary" @click="refreshProofingList()">{{'查询'}}</el-button>
  170. </el-form-item>
  171. </el-form>
  172. <el-table
  173. height="450"
  174. :data="proofingList"
  175. border
  176. @row-dblclick="chooseProofingNo"
  177. style="width: 100%;">
  178. <el-table-column
  179. prop="proofingNo"
  180. header-align="center"
  181. align="left"
  182. min-width="120"
  183. style="font-size: 20px"
  184. label="打样单">
  185. </el-table-column>
  186. <el-table-column
  187. prop="projectId"
  188. header-align="center"
  189. align="left"
  190. min-width="120"
  191. style="font-size: 20px"
  192. label="项目号">
  193. </el-table-column>
  194. <el-table-column
  195. prop="projectName"
  196. header-align="center"
  197. align="left"
  198. min-width="120"
  199. style="font-size: 20px"
  200. label="项目名称">
  201. </el-table-column>
  202. <el-table-column
  203. prop="testPartNo"
  204. header-align="center"
  205. align="left"
  206. min-width="120"
  207. label="测试料号">
  208. </el-table-column>
  209. <el-table-column
  210. prop="partDesc"
  211. header-align="center"
  212. align="left"
  213. min-width="120"
  214. label="物料名称">
  215. </el-table-column>
  216. <el-table-column
  217. prop="customerDesc"
  218. header-align="center"
  219. align="left"
  220. min-width="120"
  221. label="直接客户">
  222. </el-table-column>
  223. <el-table-column
  224. prop="finalCustomerDesc"
  225. header-align="center"
  226. align="left"
  227. min-width="120"
  228. label="最终客户">
  229. </el-table-column>
  230. </el-table>
  231. </el-dialog>
  232. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  233. <ChooseUser ref="userList" @getBaseData="getUserData"></ChooseUser>
  234. </div>
  235. </template>
  236. <script>
  237. import {
  238. searchOperatorWithSite,
  239. } from "@/api/project/project.js"
  240. import {technicalSpecificationListSearch,
  241. saveTechnicalSpecificationSheet,
  242. searchTechnicalSpecificationTeamStr,
  243. getTestPartChangeData,
  244. getProofingDataByUserRole,
  245. } from "@/api/sampleManagement/technicalSpecificationList.js"
  246. import Chooselist from '@/views/modules/common/Chooselist'
  247. import ChooseUser from '@/views/modules/common/ChooseUser'
  248. export default {
  249. components: {
  250. Chooselist,ChooseUser
  251. },
  252. data () {
  253. return {
  254. jumpFlag:true,
  255. tagNo:'',
  256. tagNo1:'',
  257. visible: false,
  258. treeVisible: false,
  259. quotationOfficerFlag:false,
  260. engineerFlag:false,
  261. userRoleFlag:false,
  262. ownerFlag:false,
  263. operatorList:[],
  264. dataForm: {
  265. id: 0,
  266. finalPartNo:'',
  267. site:this.$store.state.user.site,
  268. proofingNo:'',
  269. projectId:'',
  270. codeNo:'',
  271. testPartNo:'',
  272. partDesc:'',
  273. status:'',
  274. revNo:'',
  275. remark:'',
  276. technician:'',
  277. quotationOfficer:'',
  278. engineer:'',
  279. quotationOfficerList:[],
  280. engineerList:[],
  281. technicianList:[],
  282. oriCodeNo:'',
  283. cqcOperator:'',
  284. faiOperator:'',
  285. cqcOperatorName:'',
  286. faiOperatorName:'',
  287. peOperater:'',
  288. peOperaterName:'',
  289. csOperater:'',
  290. csOperaterName:'',
  291. dccOperater:'',
  292. dccOperaterName:'',
  293. mpOperatorName:'',
  294. mpOperator:'',
  295. },
  296. proofingSearch:{
  297. projectId:'',
  298. proofingNo:'',
  299. customerId:'',
  300. finalCustomerId:'',
  301. site:this.$store.state.user.site,
  302. username:this.$store.state.user.name,
  303. },
  304. quotationOfficerList:[],
  305. engineerList:[],
  306. technicianList:[],
  307. dataRole: {
  308. testPartNo: [
  309. {
  310. required: true,
  311. message: ' ',
  312. trigger: 'change'
  313. }
  314. ],
  315. revNo: [
  316. {
  317. required: true,
  318. message: ' ',
  319. trigger: 'change'
  320. }
  321. ],
  322. quotationOfficer: [
  323. {
  324. required: true,
  325. message: ' ',
  326. trigger: 'change'
  327. }
  328. ],
  329. engineer: [
  330. {
  331. required: true,
  332. message: ' ',
  333. trigger: 'change'
  334. }
  335. ],
  336. technician: [
  337. {
  338. required: true,
  339. message: ' ',
  340. trigger: 'change'
  341. }
  342. ],
  343. },
  344. proofingList:[],
  345. proofingModelFlag:false,
  346. }
  347. },
  348. created () {
  349. },
  350. methods: {
  351. getUserList (type) {
  352. this.tagNo1 = type
  353. this.$nextTick(() => {
  354. let strVal = ''
  355. if(type==1) {
  356. strVal = this.dataForm.cqcOperator
  357. }
  358. if(type==2) {
  359. strVal = this.dataForm.faiOperator
  360. }
  361. if(type==3) {
  362. strVal = this.dataForm.peOperater
  363. }
  364. if(type==4) {
  365. strVal = this.dataForm.csOperater
  366. }
  367. if(type==5) {
  368. strVal = this.dataForm.dccOperater
  369. }
  370. if(type==6) {
  371. strVal = this.dataForm.mpOperator
  372. }
  373. this.$refs.userList.init(this.$store.state.user.site,'%%', strVal)
  374. })
  375. },
  376. /* 列表方法的回调 */
  377. getUserData (val) {
  378. if(this.tagNo1==1) {
  379. this.dataForm.cqcOperator = val.username
  380. this.dataForm.cqcOperatorName = val.userDisplay
  381. // this.$nextTick(() => {
  382. // this.$triggerInputEvent(this.$refs.cqcOperatorName);
  383. // });
  384. }
  385. if(this.tagNo1==2) {
  386. this.dataForm.faiOperator = val.username
  387. this.dataForm.faiOperatorName = val.userDisplay
  388. // this.$nextTick(() => {
  389. // this.$triggerInputEvent(this.$refs.faiOperatorName);
  390. // });
  391. }
  392. if(this.tagNo1==3) {
  393. this.dataForm.peOperater = val.username
  394. this.dataForm.peOperaterName = val.userDisplay
  395. // this.$nextTick(() => {
  396. // this.$triggerInputEvent(this.$refs.peOperaterName);
  397. // });
  398. }
  399. if(this.tagNo1==4) {
  400. this.dataForm.csOperater = val.username
  401. this.dataForm.csOperaterName = val.userDisplay
  402. // this.$nextTick(() => {
  403. // this.$triggerInputEvent(this.$refs.csOperaterName);
  404. // });
  405. }
  406. if(this.tagNo1==5) {
  407. this.dataForm.dccOperater = val.username
  408. this.dataForm.dccOperaterName = val.userDisplay
  409. // this.$nextTick(() => {
  410. // this.$triggerInputEvent(this.$refs.dccOperaterName);
  411. // });
  412. }
  413. if(this.tagNo1==6) {
  414. this.dataForm.mpOperator = val.username
  415. this.dataForm.mpOperatorName = val.userDisplay
  416. // this.$nextTick(() => {
  417. // this.$triggerInputEvent(this.$refs.mpOperatorName);
  418. // });
  419. }
  420. },
  421. // 获取基础数据列表S
  422. getBaseList (val, type) {
  423. this.tagNo = val
  424. this.tagNo1 = type
  425. this.$nextTick(() => {
  426. let strVal = ''
  427. if (val === 134) {
  428. if(type==1) {
  429. strVal = this.dataForm.testPartNo
  430. }
  431. }
  432. if (val === 102) {
  433. if(type==1) {
  434. strVal = this.dataForm.customerId
  435. }
  436. if(type==2) {
  437. strVal = this.proofingSearch.customerId
  438. }
  439. if(type==3) {
  440. strVal = this.proofingSearch.finalCustomerId
  441. }
  442. }
  443. if (val === 104) {
  444. if(type==2) {
  445. strVal = this.proofingSearch.projectId
  446. }
  447. }
  448. if (val === 501) {
  449. if(type==2) {
  450. strVal = this.proofingSearch.proofingNo
  451. }
  452. }
  453. if (val === 1011) {
  454. if(type==1) {
  455. strVal = this.dataForm.projectSource
  456. }
  457. }
  458. if (val === 1012) {
  459. if(type==1) {
  460. strVal = this.dataForm.priority
  461. }
  462. }
  463. this.$refs.baseList.init(val, strVal)
  464. })
  465. },
  466. /* 列表方法的回调 */
  467. getBaseData (val) {
  468. if (this.tagNo === 134) {
  469. if(this.tagNo1==1) {
  470. this.dataForm.testPartNo = val.Test_part_no
  471. this.dataForm.proofingNo = ''
  472. this.changeTestDesc();
  473. }
  474. }
  475. if (this.tagNo === 102) {
  476. if(this.tagNo1==1) {
  477. this.dataForm.customerId = val.Customer_no
  478. this.dataForm.customerName = val.Customer_desc
  479. }
  480. if(this.tagNo1==2) {
  481. this.proofingSearch.customerId = val.Customer_no
  482. }
  483. if(this.tagNo1==3) {
  484. this.proofingSearch.finalCustomerId = val.Customer_no
  485. }
  486. }
  487. if (this.tagNo === 104) {
  488. if(this.tagNo1==2) {
  489. this.proofingSearch.projectId = val.project_id
  490. }
  491. }
  492. if (this.tagNo === 501) {
  493. if(this.tagNo1==2) {
  494. this.proofingSearch.proofingNo = val.Proofing_no
  495. }
  496. }
  497. if (this.tagNo === 1011) {
  498. if(this.tagNo1==1) {
  499. this.dataForm.projectSource = val.Base_id
  500. this.dataForm.projectSourceDesc = val.Base_desc
  501. }
  502. }
  503. if (this.tagNo === 1012) {
  504. if(this.tagNo1==1) {
  505. this.dataForm.priority = val.Base_id
  506. this.dataForm.priorityDesc = val.Base_desc
  507. }
  508. }
  509. },
  510. init (id) {
  511. this.jumpFlag=true
  512. this.dataForm.id = id || 0
  513. if(this.dataForm.id!=0){
  514. let inData={
  515. page: 1,
  516. limit: 10,
  517. id:id,
  518. site:this.$store.state.user.site,
  519. }
  520. technicalSpecificationListSearch(inData).then(({data}) => {
  521. if(data.page.list.length>0){
  522. this.dataForm= data.page.list[0];
  523. let inData={
  524. site:this.dataForm.site,
  525. codeNo:this.dataForm.codeNo,
  526. type:'quotationOfficer',
  527. }
  528. searchTechnicalSpecificationTeamStr(inData).then(({data}) => {
  529. this.dataForm.quotationOfficerList=data.rows
  530. })
  531. let inData2={
  532. site:this.dataForm.site,
  533. codeNo:this.dataForm.codeNo,
  534. type:'technician',
  535. }
  536. searchTechnicalSpecificationTeamStr(inData2).then(({data}) => {
  537. this.dataForm.technicianList=data.rows
  538. })
  539. let inData3={
  540. site:this.dataForm.site,
  541. codeNo:this.dataForm.codeNo,
  542. type:'engineer',
  543. }
  544. searchTechnicalSpecificationTeamStr(inData3).then(({data}) => {
  545. this.dataForm.engineerList=data.rows
  546. })
  547. }
  548. })
  549. }else {
  550. this.dataForm={
  551. id: 0,
  552. finalPartNo: '',
  553. site:this.$store.state.user.site,
  554. proofingNo:'',
  555. projectId:'',
  556. codeNo:'',
  557. testPartNo:'',
  558. partDesc:'',
  559. status:'',
  560. revNo:'',
  561. remark:'',
  562. technician:'',
  563. quotationOfficer:'',
  564. engineer:'',
  565. quotationOfficerList:[],
  566. engineerList:[],
  567. technicianList:[],
  568. cqcOperator:'',
  569. faiOperator:'',
  570. cqcOperatorName:'',
  571. faiOperatorName:'',
  572. peOperater:'',
  573. peOperaterName:'',
  574. csOperater:'',
  575. csOperaterName:'',
  576. dccOperater:'',
  577. dccOperaterName:'',
  578. mpOperatorName:'',
  579. mpOperator:'',
  580. oriCodeNo:'',
  581. }
  582. }
  583. this.visible = true
  584. },
  585. chooseProofingModel(){
  586. if(this.dataForm.id!=0){
  587. return false;
  588. }
  589. this.proofingSearch={
  590. projectId:'',
  591. proofingNo:'',
  592. customerId:'',
  593. finalCustomerId:'',
  594. site:this.$store.state.user.site,
  595. username:this.$store.state.user.name,
  596. }
  597. getProofingDataByUserRole(this.proofingSearch).then(({data}) => {
  598. this.proofingList=data.rows
  599. })
  600. this.proofingModelFlag=true
  601. },
  602. refreshProofingList(){
  603. getProofingDataByUserRole(this.proofingSearch).then(({data}) => {
  604. this.proofingList=data.rows
  605. })
  606. },
  607. changeProofingNoChange(){
  608. let inData={
  609. site:this.dataForm.site,
  610. username:this.$store.state.user.name,
  611. proofingNo:this.dataForm.proofingNo,
  612. }
  613. getProofingDataByUserRole(inData).then(({data}) => {
  614. let row={
  615. projectId:'',
  616. testPartNo:'',
  617. partDesc:'',
  618. }
  619. if(data.rows.length>0){
  620. row=data.rows[0]
  621. }
  622. this.changeProofingNo(row)
  623. })
  624. },
  625. chooseProofingNo(row){
  626. this.dataForm.proofingNo=row.proofingNo
  627. this.dataForm.projectId=row.projectId
  628. this.dataForm.testPartNo=row.testPartNo
  629. this.dataForm.partDesc=row.partDesc
  630. let inData={
  631. site:this.$store.state.user.site,
  632. testPartNo: row.testPartNo
  633. }
  634. getTestPartChangeData(inData).then(({data}) => {
  635. if (data && data.code === 0) {
  636. if(data.row!=null){
  637. this.dataForm.projectId=data.row.projectId
  638. this.dataForm.partDesc=data.row.partDesc
  639. this.dataForm.finalPartNo=data.row.finalPartNo
  640. }else {
  641. this.dataForm.projectId=''
  642. this.dataForm.partDesc=''
  643. }
  644. }
  645. })
  646. this.proofingModelFlag=false
  647. },
  648. changeProofingNo(row){
  649. this.dataForm.projectId=row.projectId
  650. this.dataForm.testPartNo=row.testPartNo
  651. this.dataForm.partDesc=row.partDesc
  652. this.proofingModelFlag=false
  653. },
  654. quotationOfficerChooseModal(){
  655. let inData={
  656. site:this.dataForm.site,
  657. }
  658. searchOperatorWithSite(inData).then(({data}) => {
  659. this.operatorList=data.rows
  660. })
  661. this.quotationOfficerList = JSON.parse(JSON.stringify(this.dataForm.quotationOfficerList));
  662. this.quotationOfficerFlag=true
  663. },
  664. saveQuotationOfficerList(){
  665. let quotationOfficerName='';
  666. for (let i = 0; i < this.quotationOfficerList.length; i++) {
  667. let select= this.operatorList.filter(item => item.operatorId === this.quotationOfficerList[i])
  668. if(select.length>0){
  669. quotationOfficerName+=select[0].operatorName+';'
  670. }
  671. }
  672. this.dataForm.quotationOfficer=quotationOfficerName
  673. this.dataForm.quotationOfficerList=JSON.parse(JSON.stringify(this.quotationOfficerList));
  674. this.quotationOfficerFlag=false
  675. },
  676. engineerChooseModal(){
  677. let inData={
  678. site:this.dataForm.site,
  679. }
  680. searchOperatorWithSite(inData).then(({data}) => {
  681. this.operatorList=data.rows
  682. })
  683. this.engineerList = JSON.parse(JSON.stringify(this.dataForm.engineerList));
  684. this.engineerFlag=true
  685. },
  686. saveEngineerList(){
  687. let engineerName='';
  688. for (let i = 0; i < this.engineerList.length; i++) {
  689. let select= this.operatorList.filter(item => item.operatorId === this.engineerList[i])
  690. if(select.length>0){
  691. engineerName+=select[0].operatorName+';'
  692. }
  693. }
  694. this.dataForm.engineer=engineerName
  695. this.dataForm.engineerList=JSON.parse(JSON.stringify(this.engineerList));
  696. this.engineerFlag=false
  697. },
  698. technicianModal(){
  699. let inData={
  700. site:this.dataForm.site,
  701. }
  702. searchOperatorWithSite(inData).then(({data}) => {
  703. this.operatorList=data.rows
  704. })
  705. this.technicianList = JSON.parse(JSON.stringify(this.dataForm.technicianList));
  706. this.ownerFlag=true
  707. },
  708. savetechnicianList(){
  709. let technicianName='';
  710. for (let i = 0; i < this.technicianList.length; i++) {
  711. let select= this.operatorList.filter(item => item.operatorId === this.technicianList[i])
  712. if(select.length>0){
  713. technicianName+=select[0].operatorName+';'
  714. }
  715. }
  716. this.dataForm.technician=technicianName
  717. this.dataForm.technicianList=JSON.parse(JSON.stringify(this.technicianList));
  718. this.ownerFlag=false
  719. },
  720. // 表单提交
  721. dataFormSubmit () {
  722. if(this.dataForm.testPartNo===''){
  723. this.$alert('请输入测试料号!', '错误', {
  724. confirmButtonText: '确定'
  725. })
  726. return false
  727. }
  728. if(this.dataForm.revNo===''){
  729. this.$alert('请输入版本号!', '错误', {
  730. confirmButtonText: '确定'
  731. })
  732. return false
  733. }
  734. saveTechnicalSpecificationSheet(this.dataForm).then(({data}) => {
  735. if (data && data.code === 0) {
  736. this.$message.success( '操作成功')
  737. this.visible = false
  738. this.$emit('refreshDataList')
  739. if(this.jumpFlag){
  740. this.$nextTick(function () {
  741. setTimeout(() => {
  742. let inData = {
  743. site: this.$store.state.user.site,
  744. codeNo: data.row.codeNo,
  745. buNo: data.row.buNo,
  746. username: this.$store.state.user.name
  747. };
  748. localStorage.setItem('tsfData', JSON.stringify(inData))
  749. window.open('#/BMPage');
  750. },500)
  751. })
  752. }
  753. } else {
  754. this.$message.error(data.msg)
  755. }
  756. })
  757. },
  758. changeTestDesc(){
  759. this.dataForm.proofingNo="";
  760. let inData={
  761. site:this.$store.state.user.site,
  762. testPartNo: this.dataForm.testPartNo
  763. }
  764. getTestPartChangeData(inData).then(({data}) => {
  765. if (data && data.code === 0) {
  766. if(data.row!=null){
  767. this.dataForm.projectId=data.row.projectId
  768. this.dataForm.partDesc=data.row.partDesc
  769. this.dataForm.finalPartNo=data.row.finalPartNo
  770. }else {
  771. this.dataForm.projectId=''
  772. this.dataForm.partDesc=''
  773. }
  774. }
  775. })
  776. },
  777. // changeTestPartNo(){
  778. // let inData={
  779. // site:this.dataForm.site,
  780. // username:this.$store.state.user.name,
  781. // testPartNo:this.dataForm.testPartNo,
  782. // }
  783. // getTestPartChangeData(inData).then(({data}) => {
  784. // let row={
  785. // projectId:'',
  786. // testPartNo:'',
  787. // partDesc:'',
  788. // }
  789. // if(data.rows.length>0){
  790. // row=data.rows[0]
  791. // }
  792. // this.changeProofingNo(row)
  793. // })
  794. // },
  795. },
  796. }
  797. </script>
  798. <style >
  799. .el-transfer-panel {
  800. border: 2px solid #17b3a3;
  801. border-radius: 4px;
  802. overflow: hidden;
  803. background: #fff;
  804. display: inline-block;
  805. vertical-align: middle;
  806. width: 200px;
  807. max-height: 100%;
  808. -webkit-box-sizing: border-box;
  809. box-sizing: border-box;
  810. position: relative;
  811. }
  812. .el-transfer-panel .el-transfer-panel__header {
  813. height: 40px;
  814. line-height: 40px;
  815. background: #17b3a3;
  816. margin: 0;
  817. padding-left: 15px;
  818. border-bottom: 1px solid #17b3a3;
  819. -webkit-box-sizing: border-box;
  820. box-sizing: border-box;
  821. color: #000;
  822. }
  823. .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label {
  824. font-size: 14px;
  825. color: #303133;
  826. font-weight: 400;
  827. }
  828. </style>