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.

1355 lines
46 KiB

3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
1 year ago
3 years ago
3 years ago
3 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year 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
3 years ago
3 years ago
3 years ago
3 years ago
1 year 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
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 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
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
1 year ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
1 year ago
1 year ago
3 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 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
2 years ago
1 year ago
3 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 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 year ago
2 years ago
1 year ago
3 years ago
3 years ago
2 years ago
1 year ago
1 year ago
1 year ago
3 years ago
1 year ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 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
3 years ago
3 years ago
3 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
3 years ago
3 years ago
2 years ago
2 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 year ago
1 year ago
3 years ago
1 year ago
3 years ago
1 year ago
3 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
3 years ago
3 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
3 years ago
1 year ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
3 years ago
1 year ago
3 years ago
  1. <template>
  2. <div class="mod-config">
  3. <el-dialog width="600px" :title="!dataForm.id ? '添加' : '编辑'" :close-on-click-modal="false" :visible.sync="visible">
  4. <el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole">
  5. <el-form-item >
  6. <span slot="label" @click="chooseProofingModel()"><a herf="#">打样单号</a></span>
  7. <el-input v-model="dataForm.proofingNo" style="width: 130px" @change="changeProofingNoChange" :disabled="dataForm.id!=0"></el-input>
  8. </el-form-item>
  9. <el-form-item label=" ">
  10. <el-checkbox v-model="jumpFlag">保存后跳转至详情</el-checkbox>
  11. </el-form-item>
  12. <!-- <el-form-item prop="testPartNo" style="margin-left: 12px" :label="'IFS料号'">-->
  13. <!--&lt;!&ndash; <span slot="label" style="" @click="getBaseList(134,1)" ><a herf="#">IFS料号</a></span>&ndash;&gt;-->
  14. <!-- <el-input v-model="dataForm.testPartNo" @change="changeTestDesc" style="width: 130px" disabled ></el-input>-->
  15. <!-- </el-form-item>-->
  16. </el-form>
  17. <el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole">
  18. <el-form-item :rules="dataRole.finalPartNo">
  19. <span slot="label" @click="choosePartModel()"><a herf="#">IFS物料编码</a></span>
  20. <el-input v-model="dataForm.finalPartNo" style="width: 130px" readonly></el-input>
  21. </el-form-item>
  22. <el-form-item :label="'PLM物料编码'">
  23. <el-input v-model="dataForm.testPartNo" style="width: 130px" disabled></el-input>
  24. </el-form-item>
  25. <el-form-item :label="'物料名称'">
  26. <el-input v-model="dataForm.partDesc" style="width: 274px" disabled></el-input>
  27. </el-form-item>
  28. </el-form>
  29. <el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole">
  30. <el-form-item :label="'BU'" >
  31. <el-input v-model="dataForm.buNo" disabled style="width: 130px" ></el-input>
  32. </el-form-item>
  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></el-input>
  38. </el-form-item>
  39. <!-- <el-form-item label="Rev No" prop="rev" :rules="dataRole.rev">-->
  40. <!-- <el-input v-model="dataForm.rev" style="width: 130px"></el-input>-->
  41. <!-- </el-form-item>-->
  42. <!-- <el-form-item label="Customer Rev" prop="customerRev" :rules="dataRole.customerRev">-->
  43. <!-- <el-input v-model="dataForm.customerRev" style="width: 130px"></el-input>-->
  44. <!-- </el-form-item>-->
  45. </el-form>
  46. <el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole">
  47. <el-form-item>
  48. <span slot="label" @click="getUserList(4)"><a herf="#">客服人员</a></span>
  49. <el-input v-model="dataForm.csOperaterName" ref="csOperaterName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  50. </el-form-item>
  51. <el-form-item>
  52. <span slot="label" @click="getUserList(7)"><a herf="#">工程人员</a></span>
  53. <el-input v-model="dataForm.engineer" readonly style="width: 130px" placeholder="请选择人员" ></el-input>
  54. </el-form-item>
  55. <el-form-item >
  56. <span slot="label" @click="getUserList(8)"><a herf="#">设计制图人员</a></span>
  57. <el-input v-model="dataForm.technician" readonly style="width: 130px" placeholder="请选择人员" ></el-input>
  58. </el-form-item>
  59. <!-- <el-form-item >-->
  60. <!-- <span slot="label" @click="getUserList(6)"><a herf="#">Select Technical</a></span>-->
  61. <!-- <el-input v-model="dataForm.mpOperatorName" ref="mpOperatorName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>-->
  62. <!-- </el-form-item>-->
  63. <el-form-item>
  64. <span slot="label" @click="handleMpOperator"><a>技术员</a></span>
  65. <el-input v-model="dataForm.mpOperatorName" @focus="handleMpOperator()" ref="mpOperatorName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  66. </el-form-item>
  67. <el-form-item>
  68. <span slot="label" @click="getUserList(9)"><a herf="#">计划人员</a></span>
  69. <el-input v-model="dataForm.planOperatorName" ref="planOperatorName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  70. </el-form-item>
  71. <el-form-item>
  72. <!-- <span slot="label" @click="getUserList(1)"><a herf="#">Select CQC</a></span>-->
  73. <span slot="label" @click="handleCqcOperator"><a>质检人员</a></span>
  74. <el-input v-model="dataForm.cqcOperatorName" @focus="handleCqcOperator()" ref="cqcOperatorName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  75. </el-form-item>
  76. <el-form-item>
  77. <!-- <span slot="label" @click="getUserList(2)"><a herf="#">Select FAI</a></span>-->
  78. <span slot="label" @click="handleFaiOperator"><a>首件检测</a></span>
  79. <el-input v-model="dataForm.faiOperatorName" @focus="handleFaiOperator" ref="faiOperatorName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  80. </el-form-item>
  81. <!-- <el-form-item >-->
  82. <!-- <span slot="label" style="" @click="quotationOfficerChooseModal()"><a herf="#">报价员</a></span>-->
  83. <!-- <el-input v-model="dataForm.quotationOfficer" readonly style="width: 274px" @focus="quotationOfficerChooseModal()"></el-input>-->
  84. <!-- </el-form-item>-->
  85. <!-- </el-form>-->
  86. <!-- <el-form :inline="true" label-position="top" label-width="100px" >-->
  87. <!-- <el-form-item >-->
  88. <!-- <span slot="label" style="" @click="engineerChooseModal()"><a herf="#">Select PE Engineer</a></span>-->
  89. <!-- <el-input v-model="dataForm.engineer" readonly style="width: 130px" @focus="engineerChooseModal()"></el-input>-->
  90. <!-- </el-form-item>-->
  91. <!-- 274px-->
  92. <!-- <el-form-item >-->
  93. <!-- <span slot="label" style="" @click="technicianModal()"><a herf="#">Select Artwork</a></span>-->
  94. <!-- <el-input v-model="dataForm.technician" readonly style="width: 130px" @focus="technicianModal()"></el-input>-->
  95. <!-- </el-form-item>-->
  96. <!-- <el-form-item >-->
  97. <!-- <span slot="label" style="" @click="getUserList(3)"><a herf="#">PE人员</a></span>-->
  98. <!-- <el-input v-model="dataForm.peOperaterName" ref="peOperaterName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>-->
  99. <!-- </el-form-item>-->
  100. <!-- <el-form-item >-->
  101. <!-- <span slot="label" style="" @click="getUserList(5)"><a herf="#">DCC人员</a></span>-->
  102. <!-- <el-input v-model="dataForm.dccOperaterName" ref="dccOperaterName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>-->
  103. <!-- </el-form-item>-->
  104. <el-form-item >
  105. <span slot="label" @click="dccChooseModal()"><a herf="#">文件管控专员</a></span>
  106. <el-input v-model="dataForm.dcc" ref="dcc" readonly @focus="dccChooseModal()" style="width: 130px"></el-input>
  107. </el-form-item>
  108. </el-form>
  109. <el-form :inline="true" label-position="top" label-width="100px">
  110. <el-form-item :label="'备注'">
  111. <el-input
  112. type="textarea"
  113. v-model="dataForm.remarkPage"
  114. :rows="3"
  115. resize='none'
  116. maxlength="120"
  117. show-word-limit
  118. style="width: 562px;height: 60px">
  119. </el-input>
  120. </el-form-item>
  121. </el-form>
  122. <el-form label-position="top" style="margin-top: 60px; margin-left: 0px;text-align:center">
  123. <el-button type="primary" :loading="saveLoading" @click="dataFormSubmit()">{{'确定'}}</el-button>
  124. <el-button type="primary" @click="visible = false">{{'关闭'}}</el-button>
  125. </el-form>
  126. </el-dialog>
  127. <el-dialog width="530px" title="报价员" :close-on-click-modal="false" :visible.sync="quotationOfficerFlag">
  128. <el-transfer
  129. v-model="quotationOfficerList" class="rq" filterable
  130. :props="operatorProp" :data="operatorList"
  131. :titles="['未选择', '已选择']">
  132. </el-transfer>
  133. <span slot="footer" class="dialog-footer">
  134. <div style="margin-top: 5px">
  135. <el-button type="primary" @click="saveQuotationOfficerList()">确定</el-button>
  136. <el-button @click="quotationOfficerFlag = false" type="primary">取消</el-button>
  137. </div>
  138. </span>
  139. </el-dialog>
  140. <el-dialog width="530px" title="工程师" :close-on-click-modal="false" :visible.sync="engineerFlag">
  141. <el-transfer
  142. v-model="engineerList" class="rq" filterable
  143. :props="operatorProp" :data="operatorList"
  144. :titles="['未选择', '已选择']">
  145. </el-transfer>
  146. <span slot="footer" class="dialog-footer">
  147. <div style="margin-top: 5px">
  148. <el-button type="primary" @click="saveEngineerList()">确定</el-button>
  149. <el-button @click="engineerFlag = false" type="primary">取消</el-button>
  150. </div>
  151. </span>
  152. </el-dialog>
  153. <el-dialog width="530px" title="项目负责人" :close-on-click-modal="false" :visible.sync="ownerFlag">
  154. <el-transfer
  155. v-model="technicianList" class="rq" filterable
  156. :props="operatorProp" :data="operatorList"
  157. :titles="['未选择', '已选择']">
  158. </el-transfer>
  159. <span slot="footer" class="dialog-footer">
  160. <div style="margin-top: 5px">
  161. <el-button type="primary" @click="savetechnicianList()">确定</el-button>
  162. <el-button @click="ownerFlag = false" type="primary">取消</el-button>
  163. </div>
  164. </span>
  165. </el-dialog>
  166. <el-dialog width="950px" title="选择打样单" :close-on-click-modal="false" :visible.sync="proofingModelFlag">
  167. <el-form :inline="true" label-position="top" label-width="100px">
  168. <el-form-item>
  169. <span slot="label" @click="getBaseList(104,2)"><a herf="#">项目号</a></span>
  170. <el-input v-model="proofingSearch.projectId" style="width: 130px" ></el-input>
  171. </el-form-item>
  172. <el-form-item>
  173. <span slot="label" @click="getBaseList(501,2)"><a herf="#">打样单</a></span>
  174. <el-input v-model="proofingSearch.proofingNo" style="width: 130px" ></el-input>
  175. </el-form-item>
  176. <el-form-item>
  177. <span slot="label" @click="getBaseList(102,2)"><a herf="#">直接客户</a></span>
  178. <el-input v-model="proofingSearch.customerId" style="width: 130px" ></el-input>
  179. </el-form-item>
  180. <el-form-item>
  181. <span slot="label" @click="getBaseList(102,3)"><a herf="#">最终客户</a></span>
  182. <el-input v-model="proofingSearch.finalCustomerId" style="width: 130px"></el-input>
  183. </el-form-item>
  184. <el-form-item label=" ">
  185. <el-button type="primary" @click="refreshProofingList()">{{'查询'}}</el-button>
  186. </el-form-item>
  187. </el-form>
  188. <el-table
  189. height="450"
  190. :data="proofingList"
  191. border
  192. @row-dblclick="chooseProofingNo"
  193. style="width: 100%;">
  194. <el-table-column
  195. prop="proofingNo"
  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="projectId"
  204. header-align="center"
  205. align="left"
  206. min-width="120"
  207. style="font-size: 20px"
  208. label="项目号">
  209. </el-table-column>
  210. <el-table-column
  211. prop="projectName"
  212. header-align="center"
  213. align="left"
  214. min-width="120"
  215. style="font-size: 20px"
  216. label="项目名称">
  217. </el-table-column>
  218. <el-table-column
  219. prop="testPartNo"
  220. header-align="center"
  221. align="left"
  222. min-width="120"
  223. label="测试料号">
  224. </el-table-column>
  225. <el-table-column
  226. prop="partDesc"
  227. header-align="center"
  228. align="left"
  229. min-width="120"
  230. label="物料名称">
  231. </el-table-column>
  232. <el-table-column
  233. prop="buNo"
  234. header-align="center"
  235. align="left"
  236. min-width="80"
  237. label="BU">
  238. </el-table-column>
  239. <el-table-column
  240. prop="customerDesc"
  241. header-align="center"
  242. align="left"
  243. min-width="120"
  244. label="直接客户">
  245. </el-table-column>
  246. <el-table-column
  247. prop="finalCustomerDesc"
  248. header-align="center"
  249. align="left"
  250. min-width="120"
  251. label="最终客户">
  252. </el-table-column>
  253. </el-table>
  254. </el-dialog>
  255. <el-dialog width="788px" title="选择物料" v-drag :close-on-click-modal="false" :visible.sync="partModelFlag">
  256. <el-form :inline="true" label-position="top" label-width="100px" >
  257. <el-form-item label="项目号">
  258. <el-input v-model="partSearch.projectId" style="width: 130px"></el-input>
  259. </el-form-item>
  260. <el-form-item label="PLM物料编码">
  261. <el-input v-model="partSearch.testPartNo" style="width: 130px"></el-input>
  262. </el-form-item>
  263. <el-form-item label="IFS物料编码">
  264. <el-input v-model="partSearch.finalPartNo" style="width: 130px"></el-input>
  265. </el-form-item>
  266. <el-form-item label="客户料号">
  267. <el-input v-model="partSearch.customerPartNo" style="width: 130px"></el-input>
  268. </el-form-item>
  269. <el-form-item label=" ">
  270. <el-button type="primary" @click="refreshPartList()">{{'查询'}}</el-button>
  271. </el-form-item>
  272. </el-form>
  273. <el-table
  274. height="450"
  275. :data="partList"
  276. border
  277. @row-dblclick="choosePartNo"
  278. style="width: 100%;">
  279. <el-table-column
  280. prop="testPartNo"
  281. header-align="center"
  282. align="left"
  283. min-width="120"
  284. style="font-size: 20px"
  285. label="PLM物料编码">
  286. </el-table-column>
  287. <el-table-column
  288. prop="finalPartNo"
  289. header-align="center"
  290. align="left"
  291. min-width="120"
  292. style="font-size: 20px"
  293. label="IFS物料编码">
  294. </el-table-column>
  295. <el-table-column
  296. prop="projectId"
  297. header-align="center"
  298. align="left"
  299. min-width="120"
  300. style="font-size: 20px"
  301. label="项目号">
  302. </el-table-column>
  303. <el-table-column
  304. prop="customerPartNo"
  305. header-align="center"
  306. align="left"
  307. min-width="120"
  308. label="客户料号">
  309. </el-table-column>
  310. <el-table-column
  311. prop="partDesc"
  312. header-align="center"
  313. align="left"
  314. min-width="200"
  315. label="物料名称">
  316. </el-table-column>
  317. <el-table-column
  318. prop="buNo"
  319. header-align="center"
  320. align="left"
  321. min-width="70"
  322. label="BU">
  323. </el-table-column>
  324. </el-table>
  325. <el-pagination
  326. @size-change="sizeChangeHandle"
  327. @current-change="currentChangeHandle"
  328. :current-page="pageIndex"
  329. :page-sizes="[20, 50, 100, 1000]"
  330. :page-size="pageSize"
  331. :total="totalPage"
  332. layout="total, sizes, prev, pager, next, jumper">
  333. </el-pagination>
  334. </el-dialog>
  335. <el-dialog width="530px" title="DCC人员" :close-on-click-modal="false" :visible.sync="dccFlag">
  336. <el-transfer
  337. v-model="dccList" class="rq" filterable
  338. :props="operatorProp" :data="operatorList"
  339. :titles="['未选择', '已选择']">
  340. </el-transfer>
  341. <span slot="footer" class="dialog-footer">
  342. <div style="margin-top: 5px">
  343. <el-button type="primary" @click="saveDccList()">确定</el-button>
  344. <el-button @click="dccFlag = false" type="primary">取消</el-button>
  345. </div>
  346. </span>
  347. </el-dialog>
  348. <el-dialog title="CQC人员" :visible.sync="cqcVisible" :close-on-click-modal="false" width="530px">
  349. <el-transfer
  350. v-model="dataForm.cqcOperatorList" class="rq" filterable
  351. :props="operatorProp" :data="cqcOperatorList"
  352. :titles="['未选择', '已选择']">
  353. </el-transfer>
  354. <div slot="footer" class="dialog-footer">
  355. <el-button type="primary" @click="handleSaveCqcOperator">确定</el-button>
  356. <el-button type="primary" @click="cqcVisible = false">取消</el-button>
  357. </div>
  358. </el-dialog>
  359. <el-dialog title="FAI人员" :visible.sync="faiVisible" :close-on-click-modal="false" width="530px">
  360. <el-transfer
  361. v-model="dataForm.faiOperatorList" class="rq" filterable
  362. :props="operatorProp" :data="faiOperatorList"
  363. :titles="['未选择', '已选择']">
  364. </el-transfer>
  365. <div slot="footer" class="dialog-footer">
  366. <el-button type="primary" @click="handleSaveFaiOperator">确定</el-button>
  367. <el-button type="primary" @click="faiVisible = false">取消</el-button>
  368. </div>
  369. </el-dialog>
  370. <el-dialog title="Technical人员" :visible.sync="mpVisible" :close-on-click-modal="false" width="530px">
  371. <el-transfer
  372. v-model="dataForm.mpOperatorList" class="rq" filterable
  373. :props="operatorProp" :data="mpOperatorList"
  374. :titles="['未选择', '已选择']">
  375. </el-transfer>
  376. <div slot="footer" class="dialog-footer">
  377. <el-button type="primary" @click="handleSaveMpOperator">确定</el-button>
  378. <el-button type="primary" @click="mpVisible = false">取消</el-button>
  379. </div>
  380. </el-dialog>
  381. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  382. <ChooseUser ref="userList" @getBaseData="getUserData"></ChooseUser>
  383. </div>
  384. </template>
  385. <script>
  386. import {
  387. searchOperatorWithSite,
  388. } from "@/api/project/project.js"
  389. import {technicalSpecificationListSearch,
  390. saveTechnicalSpecificationSheet,
  391. searchTechnicalSpecificationTeamStr,
  392. getTestPartChangeData,
  393. getProofingDataByUserRole,
  394. getFinalPartData,
  395. searchBMUser,
  396. } from "@/api/sampleManagement/technicalSpecificationList.js"
  397. import Chooselist from '@/views/modules/common/Chooselist'
  398. import ChooseUser from '@/views/modules/common/ChooseUser'
  399. export default {
  400. components: {
  401. Chooselist,ChooseUser
  402. },
  403. data () {
  404. return {
  405. jumpFlag:true,
  406. tagNo:'',
  407. tagNo1:'',
  408. visible: false,
  409. treeVisible: false,
  410. quotationOfficerFlag:false,
  411. engineerFlag:false,
  412. userRoleFlag:false,
  413. ownerFlag:false,
  414. operatorList:[],
  415. dataForm: {
  416. id: 0,
  417. finalPartNo: '',
  418. site: this.$store.state.user.site,
  419. proofingNo: '',
  420. projectId: '',
  421. codeNo: '',
  422. testPartNo: '',
  423. partDesc: '',
  424. status: '',
  425. revNo: '',
  426. remarkPage: '',
  427. technician: '',
  428. quotationOfficer: '',
  429. engineer: '',
  430. quotationOfficerList: [],
  431. engineerList: [],
  432. technicianList: [],
  433. engineerNo: '',
  434. technicianNo: '',
  435. oriCodeNo: '',
  436. cqcOperator: '',
  437. faiOperator: '',
  438. cqcOperatorName: '',
  439. cqcOperatorList:[],
  440. faiOperatorName: '',
  441. faiOperatorList: [],
  442. peOperater: '',
  443. peOperaterName: '',
  444. csOperater: '',
  445. csOperaterName: '',
  446. dccOperater: '',
  447. dccOperaterName: '',
  448. mpOperatorName: '',
  449. mpOperator: '',
  450. buNo: '',
  451. dcc: '',
  452. dccList: [],
  453. rev: '',
  454. customerRev: '',
  455. mpOperatorList: [],
  456. csOperatorList: [],
  457. planOperator: '',
  458. planOperatorName: '',
  459. planOperatorList: [],
  460. },
  461. dccList:'',
  462. dccFlag:false,
  463. proofingSearch:{
  464. projectId:'',
  465. proofingNo:'',
  466. customerId:'',
  467. finalCustomerId:'',
  468. site:this.$store.state.user.site,
  469. username:this.$store.state.user.name,
  470. },
  471. pageIndex: 1,
  472. pageSize: 100,
  473. totalPage: 0,
  474. partSearch:{
  475. projectId:'',
  476. finalPartNo:'',
  477. testPartNo:'',
  478. partDesc:'',
  479. site:this.$store.state.user.site,
  480. username:this.$store.state.user.name,
  481. customerPartNo:'',
  482. page: 1,
  483. limit: 100,
  484. },
  485. quotationOfficerList:[],
  486. engineerList:[],
  487. technicianList:[],
  488. dataRole: {
  489. finalPartNo: [
  490. {
  491. required: true,
  492. message: ' ',
  493. trigger: 'change'
  494. }
  495. ],
  496. revNo: [
  497. {
  498. required: true,
  499. message: ' ',
  500. trigger: 'change'
  501. }
  502. ],
  503. quotationOfficer: [
  504. {
  505. required: true,
  506. message: ' ',
  507. trigger: 'change'
  508. }
  509. ],
  510. engineer: [
  511. {
  512. required: true,
  513. message: ' ',
  514. trigger: 'change'
  515. }
  516. ],
  517. technician: [
  518. {
  519. required: true,
  520. message: ' ',
  521. trigger: 'change'
  522. }
  523. ],
  524. },
  525. proofingList:[],
  526. proofingModelFlag:false,
  527. partList:[],
  528. partModelFlag:false,
  529. // 新增加载状态
  530. saveLoading:false,
  531. // 人员信息集合
  532. operatorProp:{
  533. key: 'operatorId',
  534. label: 'operatorName'
  535. },
  536. cqcVisible: false,
  537. faiVisible: false,
  538. mpVisible: false,
  539. cqcOperatorList: [],
  540. faiOperatorList: [],
  541. mpOperatorList: []
  542. }
  543. },
  544. created () {
  545. },
  546. methods: {
  547. getUserList (type) {
  548. this.tagNo1 = type
  549. this.$nextTick(() => {
  550. let strVal = ''
  551. let roleId = ''
  552. if(type==1) {
  553. strVal = this.dataForm.cqcOperator
  554. roleId = 'R008'
  555. }
  556. if(type==2) {
  557. strVal = this.dataForm.faiOperator
  558. roleId = 'R009'
  559. }
  560. if(type==4) {
  561. strVal = this.dataForm.csOperater
  562. roleId = 'R010'
  563. }
  564. if(type==6) {
  565. strVal = this.dataForm.mpOperator
  566. roleId = 'R021'
  567. }
  568. if(type==7) {
  569. strVal = this.dataForm.engineerNo
  570. roleId = 'R004'
  571. }
  572. if(type==8) {
  573. strVal = this.dataForm.technicianNo
  574. roleId = 'R014'
  575. }
  576. if(type === 9) {
  577. strVal = this.dataForm.planOperator
  578. roleId = 'R023'
  579. }
  580. this.$refs.userList.init(this.$store.state.user.site,this.dataForm.buNo!==''?this.dataForm.buNo:'%%', strVal,roleId)
  581. })
  582. },
  583. /* 列表方法的回调 */
  584. getUserData (val) {
  585. if(this.tagNo1==1) {
  586. this.dataForm.cqcOperator = val.username
  587. this.dataForm.cqcOperatorName = val.userDisplay
  588. // this.$nextTick(() => {
  589. // this.$triggerInputEvent(this.$refs.cqcOperatorName);
  590. // });
  591. }
  592. if(this.tagNo1==2) {
  593. this.dataForm.faiOperator = val.username
  594. this.dataForm.faiOperatorName = val.userDisplay
  595. // this.$nextTick(() => {
  596. // this.$triggerInputEvent(this.$refs.faiOperatorName);
  597. // });
  598. }
  599. if(this.tagNo1==3) {
  600. this.dataForm.peOperater = val.username
  601. this.dataForm.peOperaterName = val.userDisplay
  602. // this.$nextTick(() => {
  603. // this.$triggerInputEvent(this.$refs.peOperaterName);
  604. // });
  605. }
  606. if(this.tagNo1==4) {
  607. this.dataForm.csOperater = val.username
  608. this.dataForm.csOperaterName = val.userDisplay
  609. // this.$nextTick(() => {
  610. // this.$triggerInputEvent(this.$refs.csOperaterName);
  611. // });
  612. }
  613. if(this.tagNo1==5) {
  614. this.dataForm.dccOperater = val.username
  615. this.dataForm.dccOperaterName = val.userDisplay
  616. // this.$nextTick(() => {
  617. // this.$triggerInputEvent(this.$refs.dccOperaterName);
  618. // });
  619. }
  620. if(this.tagNo1==6) {
  621. this.dataForm.mpOperator = val.username
  622. this.dataForm.mpOperatorName = val.userDisplay
  623. // this.$nextTick(() => {
  624. // this.$triggerInputEvent(this.$refs.mpOperatorName);
  625. // });
  626. }
  627. if(this.tagNo1==7) {
  628. this.dataForm.engineerNo = val.username
  629. this.dataForm.engineer = val.userDisplay
  630. // this.$nextTick(() => {
  631. // this.$triggerInputEvent(this.$refs.mpOperatorName);
  632. // });
  633. }
  634. if(this.tagNo1==8) {
  635. this.dataForm.technicianNo = val.username
  636. this.dataForm.technician = val.userDisplay
  637. // this.$nextTick(() => {
  638. // this.$triggerInputEvent(this.$refs.mpOperatorName);
  639. // });
  640. }
  641. if(this.tagNo1 === 9) {
  642. this.dataForm.planOperator = val.username
  643. this.dataForm.planOperatorName = val.userDisplay
  644. }
  645. },
  646. // 获取基础数据列表S
  647. getBaseList (val, type) {
  648. this.tagNo = val
  649. this.tagNo1 = type
  650. this.$nextTick(() => {
  651. let strVal = ''
  652. if (val === 134) {
  653. if(type==1) {
  654. if(this.dataForm.id!=0){
  655. return false
  656. }
  657. strVal = this.dataForm.testPartNo
  658. }
  659. }
  660. if (val === 102) {
  661. if(type==1) {
  662. strVal = this.dataForm.customerId
  663. }
  664. if(type==2) {
  665. strVal = this.proofingSearch.customerId
  666. }
  667. if(type==3) {
  668. strVal = this.proofingSearch.finalCustomerId
  669. }
  670. }
  671. if (val === 104) {
  672. if(type==2) {
  673. strVal = this.proofingSearch.projectId
  674. }
  675. }
  676. if (val === 501) {
  677. if(type==2) {
  678. strVal = this.proofingSearch.proofingNo
  679. }
  680. }
  681. if (val === 1011) {
  682. if(type==1) {
  683. strVal = this.dataForm.projectSource
  684. }
  685. }
  686. if (val === 1012) {
  687. if(type==1) {
  688. strVal = this.dataForm.priority
  689. }
  690. }
  691. this.$refs.baseList.init(val, strVal)
  692. })
  693. },
  694. /* 列表方法的回调 */
  695. getBaseData (val) {
  696. if (this.tagNo === 134) {
  697. if(this.tagNo1==1) {
  698. this.dataForm.testPartNo = val.Test_part_no
  699. this.dataForm.proofingNo = ''
  700. this.changeTestDesc();
  701. }
  702. }
  703. if (this.tagNo === 102) {
  704. if(this.tagNo1==1) {
  705. this.dataForm.customerId = val.Customer_no
  706. this.dataForm.customerName = val.Customer_desc
  707. }
  708. if(this.tagNo1==2) {
  709. this.proofingSearch.customerId = val.Customer_no
  710. }
  711. if(this.tagNo1==3) {
  712. this.proofingSearch.finalCustomerId = val.Customer_no
  713. }
  714. }
  715. if (this.tagNo === 104) {
  716. if(this.tagNo1==2) {
  717. this.proofingSearch.projectId = val.project_id
  718. }
  719. }
  720. if (this.tagNo === 501) {
  721. if(this.tagNo1==2) {
  722. this.proofingSearch.proofingNo = val.Proofing_no
  723. }
  724. }
  725. if (this.tagNo === 1011) {
  726. if(this.tagNo1==1) {
  727. this.dataForm.projectSource = val.Base_id
  728. this.dataForm.projectSourceDesc = val.Base_desc
  729. }
  730. }
  731. if (this.tagNo === 1012) {
  732. if(this.tagNo1==1) {
  733. this.dataForm.priority = val.Base_id
  734. this.dataForm.priorityDesc = val.Base_desc
  735. }
  736. }
  737. },
  738. init (id) {
  739. this.jumpFlag = true
  740. this.dataForm.id = id || 0
  741. if (this.dataForm.id !== 0) {
  742. let inData = {
  743. page: 1,
  744. limit: 10,
  745. id: id,
  746. userName: this.$store.state.user.name,
  747. site: this.$store.state.user.site,
  748. }
  749. technicalSpecificationListSearch(inData).then(({data}) => {
  750. if (data.page.list.length > 0) {
  751. this.dataForm = data.page.list[0]
  752. let inData = {
  753. site: this.dataForm.site,
  754. codeNo: this.dataForm.codeNo,
  755. type: 'cs',
  756. }
  757. searchTechnicalSpecificationTeamStr(inData).then(({data}) => {
  758. this.dataForm.csOperatorList = data.rows
  759. })
  760. let inData2 = {
  761. site: this.dataForm.site,
  762. codeNo: this.dataForm.codeNo,
  763. type: 'engineer',
  764. }
  765. searchTechnicalSpecificationTeamStr(inData2).then(({data}) => {
  766. this.dataForm.engineerList = data.rows
  767. })
  768. let inData3 = {
  769. site: this.dataForm.site,
  770. codeNo: this.dataForm.codeNo,
  771. type: 'technician',
  772. }
  773. searchTechnicalSpecificationTeamStr(inData3).then(({data}) => {
  774. this.dataForm.technicianList = data.rows
  775. })
  776. let inData4 = {
  777. site: this.dataForm.site,
  778. codeNo: this.dataForm.codeNo,
  779. type: 'mp',
  780. }
  781. searchTechnicalSpecificationTeamStr(inData4).then(({data}) => {
  782. this.dataForm.mpOperatorList = data.rows
  783. })
  784. let inData5 = {
  785. site: this.dataForm.site,
  786. codeNo: this.dataForm.codeNo,
  787. type: 'dcc',
  788. }
  789. searchTechnicalSpecificationTeamStr(inData5).then(({data}) => {
  790. this.dataForm.dccList = data.rows
  791. })
  792. let inData6 = {
  793. site: this.dataForm.site,
  794. codeNo: this.dataForm.codeNo,
  795. type: 'cqc',
  796. }
  797. searchTechnicalSpecificationTeamStr(inData6).then(({data}) => {
  798. this.dataForm.cqcOperatorList = data.rows
  799. })
  800. let inData7 = {
  801. site: this.dataForm.site,
  802. codeNo: this.dataForm.codeNo,
  803. type: 'fai',
  804. }
  805. searchTechnicalSpecificationTeamStr(inData7).then(({data}) => {
  806. this.dataForm.faiOperatorList = data.rows
  807. })
  808. this.visible = true
  809. } else {
  810. this.$message.error('技术参数卡数据有误!')
  811. }
  812. })
  813. } else {
  814. this.dataForm = {
  815. id: 0,
  816. finalPartNo: '',
  817. site: this.$store.state.user.site,
  818. proofingNo: '',
  819. projectId: '',
  820. codeNo: '',
  821. testPartNo: '',
  822. partDesc: '',
  823. status: '',
  824. revNo: 1,
  825. remarkPage: '',
  826. technician: '',
  827. quotationOfficer: '',
  828. engineer: '',
  829. quotationOfficerList: [],
  830. engineerList: [],
  831. technicianList: [],
  832. cqcOperator: '',
  833. faiOperator: '',
  834. cqcOperatorName: '',
  835. cqcOperatorList:[],
  836. faiOperatorName: '',
  837. faiOperatorList: [],
  838. peOperater: '',
  839. peOperaterName: '',
  840. csOperater: this.$store.state.user.name,
  841. csOperaterName: this.$store.state.user.userDisplay,
  842. dccOperater: '',
  843. dccOperaterName: '',
  844. mpOperatorName: '',
  845. mpOperator: '',
  846. oriCodeNo: '',
  847. engineerNo: '',
  848. technicianNo: '',
  849. buNo: '',
  850. dcc: '',
  851. dccList: [],
  852. rev: '',
  853. customerRev: '',
  854. mpOperatorList: [],
  855. csOperatorList: [],
  856. planOperator: '',
  857. planOperatorName: '',
  858. planOperatorList: [],
  859. }
  860. // 获取DCCList
  861. this.visible = true
  862. }
  863. },
  864. chooseProofingModel () {
  865. if (this.dataForm.id !== 0 ) {
  866. return false;
  867. }
  868. this.proofingSearch = {
  869. projectId: '',
  870. proofingNo: '',
  871. customerId: '',
  872. finalCustomerId: '',
  873. site: this.$store.state.user.site,
  874. username: this.$store.state.user.name,
  875. }
  876. getProofingDataByUserRole(this.proofingSearch).then(({data}) => {
  877. this.proofingList = data.rows
  878. })
  879. this.proofingModelFlag = true
  880. },
  881. choosePartModel () {
  882. this.partSearch = {
  883. projectId: '',
  884. finalPartNo: '',
  885. customerPartNo: '',
  886. partDesc: '',
  887. testPartNo: '',
  888. site: this.$store.state.user.site,
  889. username: this.$store.state.user.name,
  890. }
  891. this.pageIndex = 1
  892. this.pageSize = 100
  893. this.totalPage = 0
  894. this.refreshPartList()
  895. this.partModelFlag = true
  896. },
  897. refreshPartList () {
  898. this.partSearch.limit = this.pageSize
  899. this.partSearch.page = this.pageIndex
  900. getFinalPartData(this.partSearch).then(({data}) => {
  901. this.partList = data.page.list
  902. this.pageIndex = data.page.currPage
  903. this.pageSize = data.page.pageSize
  904. this.totalPage = data.page.totalCount
  905. })
  906. },
  907. refreshProofingList(){
  908. getProofingDataByUserRole(this.proofingSearch).then(({data}) => {
  909. this.proofingList=data.rows
  910. })
  911. },
  912. changeProofingNoChange(){
  913. let inData={
  914. site:this.dataForm.site,
  915. username:this.$store.state.user.name,
  916. proofingNo:this.dataForm.proofingNo,
  917. }
  918. getProofingDataByUserRole(inData).then(({data}) => {
  919. let row={
  920. projectId:'',
  921. testPartNo:'',
  922. partDesc:'',
  923. }
  924. if(data.rows.length>0){
  925. row=data.rows[0]
  926. }
  927. this.changeProofingNo(row)
  928. })
  929. },
  930. choosePartNo (row) {
  931. this.dataForm.projectId = row.projectId
  932. this.dataForm.testPartNo = row.testPartNo
  933. this.dataForm.partDesc = row.partDesc
  934. this.dataForm.finalPartNo = row.finalPartNo
  935. this.dataForm.buNo = row.buNo
  936. // 查询DCC人员
  937. this.queryUserInfoByBM('R015').then(({data}) => {
  938. if (data && data.code === 0){
  939. this.$nextTick(() => {
  940. this.operatorList = data.rows
  941. this.dccList = data.rows.map(item=>item.operatorId)
  942. this.saveDccList()
  943. this.operatorList = []
  944. })
  945. }
  946. })
  947. // CQC
  948. this.queryUserInfoByBM('R008').then(({data}) => {
  949. if (data && data.code === 0){
  950. this.$nextTick(() => {
  951. this.cqcOperatorList = data.rows
  952. this.dataForm.cqcOperatorList = data.rows.map(item=>item.operatorId)
  953. this.handleSaveCqcOperator()
  954. this.cqcOperatorList = []
  955. })
  956. }
  957. })
  958. // FAI
  959. this.queryUserInfoByBM('R009').then(({data}) => {
  960. if (data && data.code === 0){
  961. this.$nextTick(() => {
  962. this.faiOperatorList = data.rows
  963. this.dataForm.faiOperatorList = data.rows.map(item=>item.operatorId)
  964. this.handleSaveFaiOperator()
  965. this.faiOperatorList = []
  966. })
  967. }
  968. })
  969. this.partModelFlag = false
  970. },
  971. chooseProofingNo (row) {
  972. this.dataForm.proofingNo=row.proofingNo
  973. this.dataForm.projectId=row.projectId
  974. this.dataForm.testPartNo=row.testPartNo
  975. this.dataForm.partDesc=row.partDesc
  976. this.dataForm.buNo=row.buNo
  977. let inData={
  978. site:this.$store.state.user.site,
  979. testPartNo: row.testPartNo
  980. }
  981. getTestPartChangeData(inData).then(({data}) => {
  982. if (data && data.code === 0) {
  983. if(data.row!=null){
  984. this.dataForm.partDesc=data.row.partDesc
  985. this.dataForm.finalPartNo=data.row.finalPartNo
  986. }else {
  987. this.dataForm.partDesc=''
  988. }
  989. }
  990. })
  991. this.proofingModelFlag=false
  992. },
  993. changeProofingNo(row){
  994. this.dataForm.projectId=row.projectId
  995. this.dataForm.testPartNo=row.testPartNo
  996. this.dataForm.partDesc=row.partDesc
  997. this.proofingModelFlag=false
  998. },
  999. quotationOfficerChooseModal(){
  1000. let inData={
  1001. site:this.dataForm.site,
  1002. }
  1003. searchOperatorWithSite(inData).then(({data}) => {
  1004. this.operatorList=data.rows
  1005. })
  1006. this.quotationOfficerList = JSON.parse(JSON.stringify(this.dataForm.quotationOfficerList));
  1007. this.quotationOfficerFlag=true
  1008. },
  1009. saveQuotationOfficerList () {
  1010. let quotationOfficerName = '';
  1011. for (let i = 0; i < this.quotationOfficerList.length; i++) {
  1012. let select= this.operatorList.filter(item => item.operatorId === this.quotationOfficerList[i])
  1013. if (select.length > 0) {
  1014. quotationOfficerName += select[0].operatorName + ';'
  1015. }
  1016. }
  1017. this.dataForm.quotationOfficer = quotationOfficerName
  1018. this.dataForm.quotationOfficerList = JSON.parse(JSON.stringify(this.quotationOfficerList));
  1019. this.quotationOfficerFlag = false
  1020. },
  1021. engineerChooseModal(){
  1022. let inData={
  1023. site:this.dataForm.site,
  1024. }
  1025. searchOperatorWithSite(inData).then(({data}) => {
  1026. this.operatorList=data.rows
  1027. })
  1028. this.engineerList = JSON.parse(JSON.stringify(this.dataForm.engineerList));
  1029. this.engineerFlag=true
  1030. },
  1031. saveEngineerList(){
  1032. let engineerName='';
  1033. for (let i = 0; i < this.engineerList.length; i++) {
  1034. let select= this.operatorList.filter(item => item.operatorId === this.engineerList[i])
  1035. if(select.length>0){
  1036. engineerName+=select[0].operatorName+';'
  1037. }
  1038. }
  1039. this.dataForm.engineer=engineerName
  1040. this.dataForm.engineerList=JSON.parse(JSON.stringify(this.engineerList));
  1041. this.engineerFlag=false
  1042. },
  1043. technicianModal(){
  1044. let inData={
  1045. site:this.dataForm.site,
  1046. }
  1047. searchOperatorWithSite(inData).then(({data}) => {
  1048. this.operatorList=data.rows
  1049. })
  1050. this.technicianList = JSON.parse(JSON.stringify(this.dataForm.technicianList));
  1051. this.ownerFlag=true
  1052. },
  1053. savetechnicianList () {
  1054. let technicianName = ''
  1055. for (let i = 0; i < this.technicianList.length; i++) {
  1056. let select = this.operatorList.filter(item => item.operatorId === this.technicianList[i])
  1057. if (select.length > 0) {
  1058. technicianName += select[0].operatorName + ';'
  1059. }
  1060. }
  1061. this.dataForm.technician = technicianName
  1062. this.dataForm.technicianList = JSON.parse(JSON.stringify(this.technicianList))
  1063. this.ownerFlag = false
  1064. },
  1065. // 表单提交
  1066. dataFormSubmit () {
  1067. if (this.dataForm.testPartNo === '') {
  1068. this.$message.error('请输入测试料号!')
  1069. return false
  1070. }
  1071. if (this.dataForm.revNo === '') {
  1072. this.$message.error('请输入版本号!')
  1073. return false
  1074. }
  1075. this.dataForm.engineerList = []
  1076. if (this.dataForm.engineerNo !== '') {
  1077. this.dataForm.engineerList.push(this.dataForm.engineerNo) // Engineer
  1078. }
  1079. this.dataForm.technicianList = []
  1080. if (this.dataForm.technicianNo !== '') {
  1081. this.dataForm.technicianList.push(this.dataForm.technicianNo) // Artwork
  1082. }
  1083. this.dataForm.csOperatorList = []
  1084. if (this.dataForm.csOperater !== '') {
  1085. this.dataForm.csOperatorList.push(this.dataForm.csOperater) // CS
  1086. }
  1087. this.dataForm.planOperatorList = []
  1088. if (this.dataForm.planOperator !== '') {
  1089. this.dataForm.planOperatorList.push(this.dataForm.planOperator) // Planner
  1090. }
  1091. this.saveLoading = true
  1092. saveTechnicalSpecificationSheet(this.dataForm).then(({data}) => {
  1093. if (data && data.code === 0) {
  1094. this.$message.success( '操作成功')
  1095. this.visible = false
  1096. this.$emit('refreshDataList')
  1097. if (this.jumpFlag) {
  1098. setTimeout(() => {
  1099. let now = Date.now()
  1100. let inData = {
  1101. site: this.$store.state.user.site,
  1102. codeNo: data.row.codeNo,
  1103. buNo: data.row.buNo,
  1104. username: this.$store.state.user.name,
  1105. uuid: now + '',
  1106. activeName: 'baseInfo'
  1107. }
  1108. localStorage.setItem('tsfData', JSON.stringify(inData))
  1109. window.open('#/BMPage/'+now);
  1110. },500)
  1111. }
  1112. } else {
  1113. this.$message.error(data.msg)
  1114. }
  1115. this.saveLoading = false
  1116. }).catch((error)=>{
  1117. this.$message.error(error)
  1118. this.saveLoading = false
  1119. })
  1120. },
  1121. changeTestDesc () {
  1122. this.dataForm.proofingNo = ""
  1123. let inData = {
  1124. site: this.$store.state.user.site,
  1125. testPartNo: this.dataForm.testPartNo
  1126. }
  1127. getTestPartChangeData(inData).then(({data}) => {
  1128. if (data && data.code === 0) {
  1129. if (data.row != null) {
  1130. this.dataForm.projectId = data.row.projectId
  1131. this.dataForm.partDesc = data.row.partDesc
  1132. this.dataForm.finalPartNo = data.row.finalPartNo
  1133. } else {
  1134. this.dataForm.projectId = ''
  1135. this.dataForm.partDesc = ''
  1136. }
  1137. }
  1138. })
  1139. },
  1140. // 每页数
  1141. sizeChangeHandle (val) {
  1142. this.pageSize = val
  1143. this.pageIndex = 1
  1144. this.refreshPartList()
  1145. },
  1146. // 当前页
  1147. currentChangeHandle (val) {
  1148. this.pageIndex = val
  1149. this.refreshPartList()
  1150. },
  1151. queryUserInfoByBM (roleNo) {
  1152. let params = {
  1153. site: this.dataForm.site,
  1154. buNo: this.dataForm.buNo,
  1155. roleNo: roleNo,
  1156. }
  1157. return searchBMUser(params)
  1158. },
  1159. // Select Technical
  1160. handleMpOperator () {
  1161. this.mpVisible = true
  1162. this.mpOperatorList = []
  1163. this.queryUserInfoByBM('R021').then(({data}) => {
  1164. if (data && data.code === 0) {
  1165. this.mpOperatorList = data.rows
  1166. } else {
  1167. this.$message.warning(data.msg)
  1168. }
  1169. }).catch((error)=>{
  1170. this.$message.error(error)
  1171. })
  1172. },
  1173. // Select CQC
  1174. handleCqcOperator () {
  1175. this.cqcVisible = true
  1176. this.cqcOperatorList = []
  1177. this.queryUserInfoByBM('R008').then(({data}) => {
  1178. if (data && data.code === 0) {
  1179. this.cqcOperatorList = data.rows
  1180. } else {
  1181. this.$message.warning(data.msg)
  1182. }
  1183. }).catch((error)=>{
  1184. this.$message.error(error)
  1185. })
  1186. },
  1187. // Select FAI
  1188. handleFaiOperator () {
  1189. this.faiVisible = true
  1190. this.faiOperatorList = []
  1191. this.queryUserInfoByBM('R009').then(({data}) => {
  1192. if (data && data.code === 0) {
  1193. this.faiOperatorList = data.rows
  1194. } else {
  1195. this.$message.warning(data.msg)
  1196. }
  1197. }).catch((error)=>{
  1198. this.$message.error(error)
  1199. })
  1200. },
  1201. // Select DCC
  1202. dccChooseModal () {
  1203. this.operatorList = []
  1204. this.queryUserInfoByBM('R015').then(({data}) => {
  1205. this.operatorList = data.rows
  1206. })
  1207. this.dccList = JSON.parse(JSON.stringify(this.dataForm.dccList))
  1208. this.dccFlag = true
  1209. },
  1210. handleSaveMpOperator () {
  1211. this.dataForm.mpOperatorName = this.mpOperatorList.filter(item => this.dataForm.mpOperatorList.includes(item.operatorId)).map(item=> item.operatorName).join(';')
  1212. this.mpVisible = false
  1213. },
  1214. handleSaveCqcOperator () {
  1215. this.dataForm.cqcOperatorName = this.cqcOperatorList.filter(item => this.dataForm.cqcOperatorList.includes(item.operatorId)).map(item=> item.operatorName).join(';')
  1216. this.cqcVisible = false
  1217. },
  1218. handleSaveFaiOperator () {
  1219. this.dataForm.faiOperatorName = this.faiOperatorList.filter(item => this.dataForm.faiOperatorList.includes(item.operatorId)).map(item=> item.operatorName).join(';')
  1220. this.faiVisible = false
  1221. },
  1222. saveDccList () {
  1223. let dccName = ''
  1224. for (let i = 0; i < this.dccList.length; i++) {
  1225. let select= this.operatorList.filter(item => item.operatorId === this.dccList[i])
  1226. if (select.length > 0) {
  1227. dccName += select[0].operatorName + ';'
  1228. }
  1229. }
  1230. this.dataForm.dcc = dccName
  1231. this.dataForm.dccList = JSON.parse(JSON.stringify(this.dccList))
  1232. this.dccFlag = false
  1233. },
  1234. },
  1235. watch: {
  1236. saveLoading (newVal,oldVal) {
  1237. if (newVal) {
  1238. setTimeout(()=>{
  1239. this.saveLoading = false
  1240. },30000)
  1241. }
  1242. },
  1243. visible (newVal,oldVal) {
  1244. if (!newVal) {
  1245. this.dataForm.cqcOperatorList = []
  1246. this.dataForm.faiOperatorList = []
  1247. }
  1248. },
  1249. cqcVisible (newVal,oldVal) {
  1250. if (!newVal){
  1251. this.cqcOperatorList = []
  1252. }
  1253. },
  1254. faiVisible (newVal,oldVal) {
  1255. if (!newVal) {
  1256. this.faiOperatorList = []
  1257. }
  1258. },
  1259. mpVisible (newVal,oldVal) {
  1260. if (!newVal) {
  1261. this.mpOperatorList = []
  1262. }
  1263. },
  1264. },
  1265. }
  1266. </script>
  1267. <style >
  1268. .el-transfer-panel {
  1269. border: 2px solid #17b3a3;
  1270. border-radius: 4px;
  1271. overflow: hidden;
  1272. background: #fff;
  1273. display: inline-block;
  1274. vertical-align: middle;
  1275. width: 200px;
  1276. max-height: 100%;
  1277. -webkit-box-sizing: border-box;
  1278. box-sizing: border-box;
  1279. position: relative;
  1280. }
  1281. .el-transfer-panel .el-transfer-panel__header {
  1282. height: 40px;
  1283. line-height: 40px;
  1284. background: #17b3a3;
  1285. margin: 0;
  1286. padding-left: 15px;
  1287. border-bottom: 1px solid #17b3a3;
  1288. -webkit-box-sizing: border-box;
  1289. box-sizing: border-box;
  1290. color: #000;
  1291. }
  1292. .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label {
  1293. font-size: 14px;
  1294. color: #303133;
  1295. font-weight: 400;
  1296. }
  1297. input[readonly] {
  1298. cursor: text;
  1299. }
  1300. </style>