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.

2666 lines
98 KiB

  1. <template>
  2. <div class="mod-config">
  3. <!-- 查询条件 -->
  4. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  5. <el-form-item :label="'客户编码'">
  6. <el-input v-model="searchData.customerNo" clearable style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'客户名称'">
  9. <el-input v-model="searchData.customerDesc" clearable style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'跟单员'">
  12. <el-input v-model="searchData.trackerName" clearable style="width: 120px"></el-input>
  13. </el-form-item>
  14. <el-form-item :label="'项目料号'">
  15. <el-input v-model="searchData.testPartNo" clearable style="width: 120px"></el-input>
  16. </el-form-item>
  17. <el-form-item :label="'产品名称'">
  18. <el-input v-model="searchData.partName" clearable style="width: 120px"></el-input>
  19. </el-form-item>
  20. <el-form-item :label="'要求交付日期'">
  21. <el-date-picker
  22. style="width: 120px"
  23. v-model="searchData.startDate"
  24. type="date"
  25. value-format="yyyy-MM-dd"
  26. placeholder="选择日期">
  27. </el-date-picker>
  28. </el-form-item>
  29. <el-form-item style="margin-top: 23px;">
  30. <laber style="margin-left: 0px;font-size: 19px">&#10142</laber>
  31. </el-form-item>
  32. <el-form-item :label="' '">
  33. <el-date-picker
  34. style="width: 120px"
  35. v-model="searchData.endDate"
  36. type="date"
  37. value-format="yyyy-MM-dd"
  38. placeholder="选择日期">
  39. </el-date-picker>
  40. </el-form-item>
  41. </el-form>
  42. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  43. <el-form-item :label="'项目编码'">
  44. <el-input v-model="searchData.projectId" clearable style="width: 120px"></el-input>
  45. </el-form-item>
  46. <el-form-item :label="'项目名称'">
  47. <el-input v-model="searchData.projectName" clearable style="width: 120px"></el-input>
  48. </el-form-item>
  49. <el-form-item :label="'工程师'">
  50. <el-input v-model="searchData.engineerName" clearable style="width: 120px"></el-input>
  51. </el-form-item>
  52. <el-form-item :label="'优先等级'">
  53. <el-select v-model="searchData.priorityLevel" style="width: 120px">
  54. <el-option label="全部" value=""></el-option>
  55. <el-option label="一般" value="一般"></el-option>
  56. <el-option label="紧急" value="紧急"></el-option>
  57. <el-option label="重要" value="重要"></el-option>
  58. </el-select>
  59. </el-form-item>
  60. <el-form-item :label="'状态'">
  61. <el-select v-model="searchData.proofingStatus" style="width: 120px">
  62. <el-option label="全部" value=""></el-option>
  63. <el-option label="草稿" value="草稿"></el-option>
  64. <el-option label="下达" value="下达"></el-option>
  65. </el-select>
  66. </el-form-item>
  67. <el-form-item :label="' '">
  68. <el-button @click="getDataList()">查询</el-button>
  69. <el-button type="primary" @click="addModal()">新增</el-button>
  70. <el-button type="primary" @click="delModal()">删除</el-button>
  71. <download-excel
  72. :fields="fields()"
  73. :data="exportData"
  74. type="xls"
  75. :name="exportName"
  76. :header="exportHeader"
  77. :footer="exportFooter"
  78. :fetch="createExportData"
  79. :before-generate="startDownload"
  80. :before-finish="finishDownload"
  81. worksheet="导出信息"
  82. class="el-button el-button--primary el-button--medium">
  83. {{ "导出" }}
  84. </download-excel>
  85. </el-form-item>
  86. </el-form>
  87. <!-- 打样列表 -->
  88. <el-table
  89. :height="height"
  90. :data="dataList"
  91. border
  92. ref="proofingTable"
  93. @row-click="proofingClickRow"
  94. @selection-change="selectionProofing"
  95. @current-change="changeCurrentRow"
  96. v-loading="dataListLoading"
  97. style="width: 100%;">
  98. <el-table-column
  99. type="selection"
  100. header-align="center"
  101. align="center"
  102. :selectable="selectFlag"
  103. width="50">
  104. </el-table-column>
  105. <el-table-column
  106. v-for="(item,index) in columnList" :key="index"
  107. :sortable="item.columnSortable"
  108. :prop="item.columnProp"
  109. :header-align="item.headerAlign"
  110. :show-overflow-tooltip="item.showOverflowTooltip"
  111. :align="item.align"
  112. :fixed="item.fixed === ''?false:item.fixed"
  113. :min-width="item.columnWidth"
  114. :label="item.columnLabel">
  115. <template slot-scope="scope">
  116. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  117. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  118. </template>
  119. </el-table-column>
  120. <el-table-column
  121. fixed="right"
  122. header-align="center"
  123. align="center"
  124. width="100"
  125. label="操作">
  126. <template slot-scope="scope">
  127. <a type="text" size="small" @click="updateModal(scope.row)">编辑</a>
  128. </template>
  129. </el-table-column>
  130. </el-table>
  131. <selectDiv ref="selectDiv"></selectDiv>
  132. <!-- 分页插件 -->
  133. <el-pagination style="margin-top: 0px"
  134. @size-change="sizeChangeHandle"
  135. @current-change="currentChangeHandle"
  136. :current-page="pageIndex"
  137. :page-sizes="[20, 50, 100, 200, 500]"
  138. :page-size="pageSize"
  139. :total="totalPage"
  140. layout="total, sizes, prev, pager, next, jumper">
  141. </el-pagination>
  142. <!-- 打样模态框 -->
  143. <el-dialog :title="modalData.title" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="495px">
  144. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  145. <el-form-item prop="customerDesc" :rules="rules.customerDesc">
  146. <span slot="label" style="" @click="getBaseList(102,1)"><a herf="#">客户</a></span>
  147. <el-input v-model="modalData.customerDesc" style="width: 221px"></el-input>
  148. </el-form-item>
  149. <el-form-item prop="trackerName" :rules="rules.trackerName">
  150. <span slot="label" style="" @click="getBaseList(103,1)"><a herf="#">跟单员</a></span>
  151. <el-input v-model="modalData.trackerName" style="width: 221px"></el-input>
  152. </el-form-item>
  153. </el-form>
  154. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  155. <el-form-item prop="projectName" :rules="rules.projectName">
  156. <span slot="label" style="" @click="getBaseList(104,1)"><a herf="#">项目</a></span>
  157. <el-input v-model="modalData.projectName" style="width: 221px"></el-input>
  158. </el-form-item>
  159. <el-form-item prop="engineerName" :rules="rules.engineerName">
  160. <span slot="label" style="" @click="getBaseList(103,2)"><a herf="#">工程师</a></span>
  161. <el-input v-model="modalData.engineerName" style="width: 221px"></el-input>
  162. </el-form-item>
  163. </el-form>
  164. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  165. <el-form-item prop="partName" :rules="rules.partName">
  166. <span slot="label" @click="getProjectPartList()"><a>项目物料</a></span>
  167. <el-input v-model="modalData.partName" style="width: 221px"></el-input>
  168. </el-form-item>
  169. <el-form-item label="优先等级" prop="priorityLevel" :rules="rules.priorityLevel">
  170. <el-select v-model="modalData.priorityLevel" style="width: 221px">
  171. <el-option label="一般" value="一般"></el-option>
  172. <el-option label="紧急" value="紧急"></el-option>
  173. <el-option label="重要" value="重要"></el-option>
  174. </el-select>
  175. </el-form-item>
  176. </el-form>
  177. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  178. <el-form-item label="要求交付日期" prop="requiredDeliveryDate" :rules="rules.requiredDeliveryDate">
  179. <el-date-picker v-model="modalData.requiredDeliveryDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 142px"></el-date-picker>
  180. </el-form-item>
  181. <el-form-item label="收货人">
  182. <el-input v-model="modalData.consignee" style="width: 142px"></el-input>
  183. </el-form-item>
  184. <el-form-item label="收货人联系方式">
  185. <el-input v-model="modalData.consigneeContact" style="width: 142px"></el-input>
  186. </el-form-item>
  187. </el-form>
  188. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  189. <el-form-item label="是否需要送样">
  190. <input type="checkbox" value="Y" name="sendSamples" v-model="modalData.isNeedToSendSamples"/>
  191. </el-form-item>
  192. <el-form-item label="送样地址">
  193. <el-input v-model="modalData.sendSamplesAddress" style="width: 369px"></el-input>
  194. </el-form-item>
  195. <el-form-item label="备注">
  196. <el-input v-model="modalData.remark" style="width: 456px"></el-input>
  197. </el-form-item>
  198. </el-form>
  199. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  200. <el-form-item label="技术注意事项">
  201. <el-input type="textarea" v-model="modalData.technicalConsiderations" :rows="3" resize='none' show-word-limit style="width: 456px;height: 20px"></el-input>
  202. </el-form-item>
  203. </el-form>
  204. <el-footer style="height:30px;margin-top: 50px;text-align:center">
  205. <el-button type="primary" @click="saveData()">保存</el-button>
  206. <el-button type="primary" @click="modalFlag = false">关闭</el-button>
  207. </el-footer>
  208. </el-dialog>
  209. <!-- 录入打样结果模态框 -->
  210. <el-dialog title="录入打样结果" :close-on-click-modal="false" v-drag :visible.sync="enterResultModalFlag" width="785px">
  211. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules" style="margin-left: 0px;margin-top: 10px;">
  212. <el-form-item label="实际交付日期" prop="actualityDeliveryDate" :rules="enterResultRules.actualityDeliveryDate">
  213. <el-date-picker v-model="enterResultData.actualityDeliveryDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" style="width: 200px"></el-date-picker>
  214. </el-form-item>
  215. </el-form>
  216. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules" style="margin-left:0px;margin-top: 5px;">
  217. <el-form-item label="打样结果信息" prop="proofingResultInformation" :rules="enterResultRules.proofingResultInformation">
  218. <el-input type="textarea" v-model="enterResultData.proofingResultInformation" :rows="3" resize='none' show-word-limit style="width: 500px;height: 30px"></el-input>
  219. </el-form-item>
  220. </el-form>
  221. <el-form :inline="true" label-position="top" :model="enterResultData" style="margin-left: 0px;margin-top: 50px;">
  222. <el-form :inline="true" label-position="top" style="margin-top: 5px">
  223. <el-button type="primary" @click="uploadFile()">上传文件</el-button>
  224. </el-form>
  225. <el-table
  226. :height="200"
  227. :data="fileContentList"
  228. border
  229. v-loading="dataListLoading"
  230. style="width: 100%">
  231. <el-table-column
  232. v-for="(item,index) in fileColumnList" :key="index"
  233. :sortable="item.columnSortable"
  234. :prop="item.columnProp"
  235. :header-align="item.headerAlign"
  236. :show-overflow-tooltip="item.showOverflowTooltip"
  237. :align="item.align"
  238. :fixed="item.fixed===''?false:item.fixed"
  239. :min-width="item.columnWidth"
  240. :label="item.columnLabel">
  241. <template slot-scope="scope">
  242. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  243. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  244. </template>
  245. </el-table-column>
  246. <el-table-column
  247. fixed="right"
  248. header-align="center"
  249. align="center"
  250. width="100"
  251. label="操作">
  252. <template slot-scope="scope">
  253. <a @click="deleteFile(scope.row)">删除</a>
  254. </template>
  255. </el-table-column>
  256. </el-table>
  257. </el-form>
  258. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  259. <el-button type="primary" @click="saveProofingResult()">保存</el-button>
  260. <el-button type="primary" @click="enterResultModalFlag = false">关闭</el-button>
  261. </el-footer>
  262. </el-dialog>
  263. <!-- 录入送样信息模态框 -->
  264. <el-dialog title="录入送样信息" :close-on-click-modal="false" v-drag :visible.sync="submitResultModalFlag" width="620px">
  265. <el-form :inline="true" label-position="top" :model="submitResultData" :rules="submitResultRules" style="margin-left: 0px;margin-top: 10px;">
  266. <el-form-item label="实际送样日期" prop="actualitySendSamplesDate" :rules="submitResultRules.actualitySendSamplesDate">
  267. <el-date-picker v-model="submitResultData.actualitySendSamplesDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" style="width: 200px"></el-date-picker>
  268. </el-form-item>
  269. <el-form-item label="送样方式" prop="sendSamplesMethod" :rules="submitResultRules.sendSamplesMethod">
  270. <el-select v-model="submitResultData.sendSamplesMethod" style="width: 221px">
  271. <el-option label="客户自提" value="客户自提"></el-option>
  272. <el-option label="人员带货" value="人员带货"></el-option>
  273. <el-option label="其它" value="其它"></el-option>
  274. </el-select>
  275. </el-form-item>
  276. <el-form-item label="送货信息">
  277. <el-input v-model="submitResultData.deliverGoodsInformation" style="width: 221px"></el-input>
  278. </el-form-item>
  279. </el-form>
  280. <el-form :inline="true" label-position="top" :model="submitResultData" style="margin-left:0px;margin-top: 5px;">
  281. <el-form-item label="送货备注">
  282. <el-input type="textarea" v-model="submitResultData.deliverGoodsRemark" :rows="3" resize='none' show-word-limit style="width: 456px;height: 30px"></el-input>
  283. </el-form-item>
  284. </el-form>
  285. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  286. <el-button type="primary" @click="saveSubmitResult()">保存</el-button>
  287. <el-button type="primary" @click="submitResultModalFlag = false">关闭</el-button>
  288. </el-footer>
  289. </el-dialog>
  290. <!-- 客户回复模态框 -->
  291. <el-dialog title="客户回复" :close-on-click-modal="false" v-drag :visible.sync="customerResponseModalFlag" width="620px">
  292. <el-form :inline="true" label-position="top" :model="customerResponseData" :rules="customerResponseRules" style="margin-left: 0px;margin-top: 10px;">
  293. <el-form-item label="实际回复日期" prop="actualityReplyDate" :rules="customerResponseRules.actualityReplyDate">
  294. <el-date-picker v-model="customerResponseData.actualityReplyDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" style="width: 185px"></el-date-picker>
  295. </el-form-item>
  296. <el-form-item label="客户确认结果" prop="confirmResults" :rules="customerResponseRules.confirmResults">
  297. <el-select v-model="customerResponseData.confirmResults" style="width: 185px">
  298. <el-option label="接受" value="接受"></el-option>
  299. <el-option label="不接受" value="不接受"></el-option>
  300. </el-select>
  301. </el-form-item>
  302. <el-form-item label="客户确认人" prop="confirmBy" :rules="customerResponseRules.confirmBy">
  303. <el-input v-model="customerResponseData.confirmBy" style="width: 185px"></el-input>
  304. </el-form-item>
  305. </el-form>
  306. <el-form :inline="true" label-position="top" :model="customerResponseData" style="margin-left:0px;margin-top: 5px;">
  307. <el-form-item label="客户回复信息">
  308. <el-input type="textarea" v-model="customerResponseData.confirmInformation" :rows="3" resize='none' show-word-limit style="width: 595px;height: 30px"></el-input>
  309. </el-form-item>
  310. </el-form>
  311. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  312. <el-button type="primary" @click="saveCustomerResponse()">保存</el-button>
  313. <el-button type="primary" @click="customerResponseModalFlag = false">关闭</el-button>
  314. </el-footer>
  315. </el-dialog>
  316. <!-- 项目物料清单模态框 -->
  317. <el-dialog title="项目物料清单" :close-on-click-modal="false" v-drag :visible.sync="projectPartModelFlag" width="800px">
  318. <div class="rq">
  319. <el-form :inline="true" label-position="top" :model="projectPartData">
  320. <el-form-item :label="'产品编码'">
  321. <el-input v-model="projectPartData.testPartNo" clearable style="width: 120px"></el-input>
  322. </el-form-item>
  323. <el-form-item :label="'产品名称'">
  324. <el-input v-model="projectPartData.partName" clearable style="width: 120px"></el-input>
  325. </el-form-item>
  326. <el-form-item :label="' '">
  327. <el-button type="primary" @click="getProjectPartList()">查询</el-button>
  328. </el-form-item>
  329. </el-form>
  330. <el-table
  331. :height="300"
  332. :data="projectPartList"
  333. ref="projectPartTable"
  334. @row-click="projectPartClickRow"
  335. @selection-change="selectionProjectPart"
  336. :row-key="getRowKeys"
  337. border
  338. v-loading="dataListLoading"
  339. style="width: 100%;">
  340. <el-table-column
  341. type="selection"
  342. header-align="center"
  343. align="center"
  344. :reserve-selection="true"
  345. width="50">
  346. </el-table-column>
  347. <el-table-column
  348. v-for="(item,index) in projectPartDetailList" :key="index"
  349. :sortable="item.columnSortable"
  350. :prop="item.columnProp"
  351. :header-align="item.headerAlign"
  352. :show-overflow-tooltip="item.showOverflowTooltip"
  353. :align="item.align"
  354. :fixed="item.fixed===''?false:item.fixed"
  355. :min-width="item.columnWidth"
  356. :label="item.columnLabel">
  357. <template slot-scope="scope">
  358. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  359. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  360. </template>
  361. </el-table-column>
  362. </el-table>
  363. </div>
  364. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  365. <el-button type="primary" @click="confirmProjectPart()">确认</el-button>
  366. <el-button type="primary" @click="projectPartModelFlag = false">关闭</el-button>
  367. </el-footer>
  368. </el-dialog>
  369. <!-- 页签 -->
  370. <el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; min-height: 500px;" type="border-card" @tab-click="tabClick" class="customer-tab">
  371. <!-- 打样详细信息页签 -->
  372. <el-tab-pane label="打样详细信息" name="proofing_detail_information">
  373. <el-form :inline="true" label-position="top" :model="proofingDetailData" style="margin-left: 10px;margin-top: 10px;">
  374. <el-form-item label="技术注意事项">
  375. <el-input type="textarea" v-model="proofingDetailData.technicalConsiderations" readonly :rows="3" resize='none' show-word-limit style="width: 600px;height: 30px"></el-input>
  376. </el-form-item>
  377. </el-form>
  378. <el-form :inline="true" label-position="top" :model="proofingDetailData" style="margin-left: 10px;margin-top: 46px;">
  379. <el-form-item label="是否需要送样">
  380. <input type="checkbox" v-if="proofingDetailData.isNeedToSendSamples == 'Y'" checked onclick="return false"/>
  381. <input type="checkbox" v-if="proofingDetailData.isNeedToSendSamples != 'Y'" onclick="return false"/>
  382. </el-form-item>
  383. <el-form-item label="送样地址">
  384. <el-input v-model="proofingDetailData.sendSamplesAddress" readonly style="width: 295px"></el-input>
  385. </el-form-item>
  386. </el-form>
  387. <el-form :inline="true" label-position="top" :model="proofingDetailData" style="margin-left: 10px;margin-top: 46px;">
  388. <el-form-item label="收货人">
  389. <el-input v-model="proofingDetailData.consignee" readonly style="width: 295px"></el-input>
  390. </el-form-item>
  391. <el-form-item label="收货人联系方式">
  392. <el-input v-model="proofingDetailData.consigneeContact" readonly style="width: 295px"></el-input>
  393. </el-form-item>
  394. </el-form>
  395. </el-tab-pane>
  396. <!-- 打样结果页签 -->
  397. <el-tab-pane label="打样结果" name="proofing_result">
  398. <el-form :inline="true" label-position="top" :model="proofingResultData" style="margin-left: 10px;margin-top: 5px;">
  399. <el-button v-if="proofingResultData.proofingResultStatus === 'C'" type="primary" @click="proofingResultModal()">录入打样结果</el-button>
  400. <el-button v-if="proofingResultData.proofingResultStatus === 'E'" type="primary" @click="submitProofingModal()">录入送样信息</el-button>
  401. <el-button v-if="proofingResultData.proofingResultStatus === 'S'" type="primary" @click="customerResponseModal()">客户回复</el-button>
  402. </el-form>
  403. <el-form :inline="true" label-position="top" :model="proofingResultData" style="margin-left: 10px;margin-top: 2px;">
  404. <el-form-item label="实际交付日期">
  405. <el-date-picker v-model="proofingResultData.actualityDeliveryDate" readonly type="date" value-format="yyyy-MM-dd" style="width: 240px"></el-date-picker>
  406. </el-form-item>
  407. <el-form-item label="是否需要送样">
  408. <input type="checkbox" v-if="proofingResultData.isNeedToSendSamples == 'Y'" checked onclick="return false"/>
  409. <input type="checkbox" v-if="proofingResultData.isNeedToSendSamples != 'Y'" onclick="return false"/>
  410. </el-form-item>
  411. <el-form-item label="是否送样">
  412. <input type="checkbox" v-if="proofingResultData.proofingResultStatus == 'S' || proofingResultData.proofingResultStatus == 'R'" checked onclick="return false"/>
  413. <input type="checkbox" v-if="proofingResultData.proofingResultStatus != 'S' && proofingResultData.proofingResultStatus != 'R'" onclick="return false"/>
  414. </el-form-item>
  415. </el-form>
  416. <el-form :inline="true" label-position="top" :model="proofingResultData" style="margin-left: 10px;margin-top: -1px;">
  417. <el-form-item label="打样结果信息">
  418. <el-input type="textarea" v-model="proofingResultData.proofingResultInformation" readonly :rows="2" resize='none' show-word-limit style="width: 760px;height: 20px"></el-input>
  419. </el-form-item>
  420. </el-form>
  421. <el-form :inline="true" label-position="top" :model="proofingResultData" style="margin-left: 10px;margin-top: 26px;">
  422. <el-form-item label="附件清单">
  423. <el-table
  424. :height="90"
  425. :data="fileContentList"
  426. border
  427. v-loading="dataListLoading"
  428. style="width: 100%">
  429. <el-table-column
  430. v-for="(item,index) in fileColumnList" :key="index"
  431. :sortable="item.columnSortable"
  432. :prop="item.columnProp"
  433. :header-align="item.headerAlign"
  434. :show-overflow-tooltip="item.showOverflowTooltip"
  435. :align="item.align"
  436. :fixed="item.fixed===''?false:item.fixed"
  437. :min-width="item.columnWidth"
  438. :label="item.columnLabel">
  439. <template slot-scope="scope">
  440. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  441. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  442. </template>
  443. </el-table-column>
  444. <el-table-column
  445. fixed="right"
  446. header-align="center"
  447. align="center"
  448. width="100"
  449. label="操作">
  450. <template slot-scope="scope">
  451. <a @click="downloadFile(scope.row)">下载</a>
  452. </template>
  453. </el-table-column>
  454. </el-table>
  455. </el-form-item>
  456. </el-form>
  457. <el-form :inline="true" label-position="top" :model="proofingResultData" style="margin-left: 10px;margin-top: 69px;">
  458. <el-form-item label="实际送样日期">
  459. <el-date-picker v-model="proofingResultData.actualitySendSamplesDate" readonly type="date" value-format="yyyy-MM-dd" style="width: 240px"></el-date-picker>
  460. </el-form-item>
  461. <el-form-item label="送样方式">
  462. <el-input v-model="proofingResultData.sendSamplesMethod" readonly style="width: 240px"></el-input>
  463. </el-form-item>
  464. <el-form-item label="送货信息">
  465. <el-input v-model="proofingResultData.deliverGoodsInformation" readonly style="width: 240px"></el-input>
  466. </el-form-item>
  467. </el-form>
  468. <el-form :inline="true" label-position="top" :model="proofingResultData" style="margin-left: 10px;margin-top: -2px;">
  469. <el-form-item label="送货备注">
  470. <el-input type="textarea" v-model="proofingResultData.deliverGoodsRemark" readonly :rows="2" resize='none' show-word-limit style="width: 760px;height: 20px"></el-input>
  471. </el-form-item>
  472. </el-form>
  473. <el-form :inline="true" label-position="top" :model="proofingResultData" style="margin-left: 10px;margin-top: 26px;">
  474. <el-form-item label="客户是否回复">
  475. <input type="checkbox" v-if="proofingResultData.proofingResultStatus == 'R'" checked onclick="return false"/>
  476. <input type="checkbox" v-if="proofingResultData.proofingResultStatus != 'R'" onclick="return false"/>
  477. </el-form-item>
  478. <el-form-item label="客户确认结果">
  479. <el-input v-model="proofingResultData.confirmResults" readonly style="width: 205px"></el-input>
  480. </el-form-item>
  481. <el-form-item label="实际回复日期">
  482. <el-date-picker v-model="proofingResultData.actualityReplyDate" readonly type="date" value-format="yyyy-MM-dd" style="width: 240px"></el-date-picker>
  483. </el-form-item>
  484. <el-form-item label="客户确认人">
  485. <el-input v-model="proofingResultData.confirmBy" readonly style="width: 205px"></el-input>
  486. </el-form-item>
  487. </el-form>
  488. <el-form :inline="true" label-position="top" :model="proofingResultData" style="margin-left: 10px;margin-top: -2px;">
  489. <el-form-item label="客户回复信息">
  490. <el-input type="textarea" v-model="proofingResultData.confirmInformation" readonly :rows="2" resize='none' show-word-limit style="width: 760px;height: 20px"></el-input>
  491. </el-form-item>
  492. </el-form>
  493. </el-tab-pane>
  494. <!-- 项目信息页签 -->
  495. <el-tab-pane label="项目信息" name="project_information">
  496. <el-form label-position="top" :model="projectInformationData" style="margin-left: 10px;margin-top: 5px;margin-right: 10px">
  497. <el-row :gutter="20">
  498. <el-col :span="8">
  499. <div class="grid-content bg-purple">
  500. <el-form-item label="项目号">
  501. <el-input v-model="projectInformationData.projectId" readonly></el-input>
  502. </el-form-item>
  503. </div>
  504. </el-col>
  505. <el-col :span="8">
  506. <div class="grid-content bg-purple">
  507. <el-form-item label="项目名称">
  508. <el-input v-model="projectInformationData.projectName" readonly></el-input>
  509. </el-form-item>
  510. </div>
  511. </el-col>
  512. <el-col :span="8">
  513. <div class="grid-content bg-purple">
  514. <el-form-item label="项目类型">
  515. <el-input v-model="projectInformationData.projectType" readonly></el-input>
  516. </el-form-item>
  517. </div>
  518. </el-col>
  519. </el-row>
  520. <el-row :gutter="20">
  521. <el-col :span="8">
  522. <div class="grid-content bg-purple">
  523. <el-form-item label="客户来源">
  524. <el-input v-model="projectInformationData.projectSourceDesc" readonly></el-input>
  525. </el-form-item>
  526. </div>
  527. </el-col>
  528. <el-col :span="8">
  529. <div class="grid-content bg-purple">
  530. <el-form-item label="优先级">
  531. <el-input v-model="projectInformationData.priorityDesc" readonly></el-input>
  532. </el-form-item>
  533. </div>
  534. </el-col>
  535. <el-col :span="8">
  536. <div class="grid-content bg-purple">
  537. <el-form-item label="项目状态">
  538. <el-input v-model="projectInformationData.status" readonly></el-input>
  539. </el-form-item>
  540. </div>
  541. </el-col>
  542. </el-row>
  543. <el-row :gutter="20">
  544. <el-col :span="8">
  545. <div class="grid-content bg-purple">
  546. <el-form-item label="项目经理">
  547. <el-input v-model="projectInformationData.projectManagerName" readonly></el-input>
  548. </el-form-item>
  549. </div>
  550. </el-col>
  551. <el-col :span="8">
  552. <div class="grid-content bg-purple">
  553. <el-form-item label="项目负责人">
  554. <el-input v-model="projectInformationData.projectOwnerName" readonly></el-input>
  555. </el-form-item>
  556. </div>
  557. </el-col>
  558. <el-col :span="8">
  559. <div class="grid-content bg-purple">
  560. <el-form-item label="项目权限">
  561. <el-input v-model="projectInformationData.userRoleName" readonly></el-input>
  562. </el-form-item>
  563. </div>
  564. </el-col>
  565. </el-row>
  566. <el-row :gutter="20">
  567. <el-col :span="6">
  568. <div class="grid-content bg-purple">
  569. <el-form-item label="创建时间">
  570. <el-input v-model="projectInformationData.createDate" readonly></el-input>
  571. </el-form-item>
  572. </div>
  573. </el-col>
  574. <el-col :span="6">
  575. <div class="grid-content bg-purple">
  576. <el-form-item label="创建人">
  577. <el-input v-model="projectInformationData.createBy" readonly></el-input>
  578. </el-form-item>
  579. </div>
  580. </el-col>
  581. <el-col :span="6">
  582. <div class="grid-content bg-purple">
  583. <el-form-item label="更新时间">
  584. <el-input v-model="projectInformationData.updateDate" readonly></el-input>
  585. </el-form-item>
  586. </div>
  587. </el-col>
  588. <el-col :span="6">
  589. <div class="grid-content bg-purple">
  590. <el-form-item label="更新人">
  591. <el-input v-model="projectInformationData.updateBy" readonly></el-input>
  592. </el-form-item>
  593. </div>
  594. </el-col>
  595. </el-row>
  596. <el-row :gutter="20">
  597. <el-col :span="24">
  598. <div class="grid-content bg-purple">
  599. <el-form-item label="项目描述">
  600. <el-input v-model="projectInformationData.projectDesc" readonly></el-input>
  601. </el-form-item>
  602. </div>
  603. </el-col>
  604. </el-row>
  605. <el-row :gutter="20">
  606. <el-col :span="24">
  607. <div class="grid-content bg-purple">
  608. <el-form-item label="其它特殊要求">
  609. <el-input v-model="projectInformationData.remark" readonly></el-input>
  610. </el-form-item>
  611. </div>
  612. </el-col>
  613. </el-row>
  614. </el-form>
  615. </el-tab-pane>
  616. <!-- 客户信息页签 -->
  617. <el-tab-pane label="客户信息" name="customer_information">
  618. <el-form label-position="top" :model="customerInformationData" style="margin-left: 10px;margin-top: 5px;margin-right: 10px">
  619. <el-row :gutter="20">
  620. <el-col :span="8">
  621. <div class="grid-content bg-purple">
  622. <el-form-item label="客户代码">
  623. <el-input v-model="customerInformationData.customerNo" readonly></el-input>
  624. </el-form-item>
  625. </div>
  626. </el-col>
  627. <el-col :span="8">
  628. <div class="grid-content bg-purple">
  629. <el-form-item label="客户名称">
  630. <el-input v-model="customerInformationData.customerDesc" readonly></el-input>
  631. </el-form-item>
  632. </div>
  633. </el-col>
  634. <el-col :span="8">
  635. <div class="grid-content bg-purple">
  636. <el-form-item label="关键客户">
  637. <el-input v-model="customerInformationData.importantCustomer" readonly></el-input>
  638. </el-form-item>
  639. </div>
  640. </el-col>
  641. </el-row>
  642. <el-row :gutter="20">
  643. <el-col :span="8">
  644. <div class="grid-content bg-purple">
  645. <el-form-item label="客户币种">
  646. <el-input v-model="customerInformationData.customerCurrency" readonly></el-input>
  647. </el-form-item>
  648. </div>
  649. </el-col>
  650. <el-col :span="8">
  651. <div class="grid-content bg-purple">
  652. <el-form-item label="年营业额">
  653. <el-input v-model="customerInformationData.turnoverOfYear" readonly></el-input>
  654. </el-form-item>
  655. </div>
  656. </el-col>
  657. <el-col :span="8">
  658. <div class="grid-content bg-purple">
  659. <el-form-item label="年潜在收入">
  660. <el-input v-model="customerInformationData.potentialRevenueOfYear" readonly></el-input>
  661. </el-form-item>
  662. </div>
  663. </el-col>
  664. </el-row>
  665. <el-row :gutter="20">
  666. <el-col :span="8">
  667. <div class="grid-content bg-purple">
  668. <el-form-item label="客户状态">
  669. <el-input v-model="customerInformationData.customerStatus" readonly></el-input>
  670. </el-form-item>
  671. </div>
  672. </el-col>
  673. <el-col :span="8">
  674. <div class="grid-content bg-purple">
  675. <el-form-item label="行业">
  676. <el-input v-model="customerInformationData.customerIndustry" readonly></el-input>
  677. </el-form-item>
  678. </div>
  679. </el-col>
  680. <el-col :span="8">
  681. <div class="grid-content bg-purple">
  682. <el-form-item label="公司名称">
  683. <el-input v-model="customerInformationData.companyName" readonly></el-input>
  684. </el-form-item>
  685. </div>
  686. </el-col>
  687. </el-row>
  688. <el-row :gutter="20">
  689. <el-col :span="8">
  690. <div class="grid-content bg-purple">
  691. <el-form-item label="客户联系人">
  692. <el-input v-model="customerInformationData.contactName" readonly></el-input>
  693. </el-form-item>
  694. </div>
  695. </el-col>
  696. <el-col :span="8">
  697. <div class="grid-content bg-purple">
  698. <el-form-item label="联系人电话">
  699. <el-input v-model="customerInformationData.contactPhoneNumber1" readonly></el-input>
  700. </el-form-item>
  701. </div>
  702. </el-col>
  703. <el-col :span="8">
  704. <div class="grid-content bg-purple">
  705. <el-form-item label="联系人职务">
  706. <el-input v-model="customerInformationData.position" readonly></el-input>
  707. </el-form-item>
  708. </div>
  709. </el-col>
  710. </el-row>
  711. <el-row :gutter="20">
  712. <el-col :span="12">
  713. <div class="grid-content bg-purple">
  714. <el-form-item label="岗位描述">
  715. <el-input v-model="customerInformationData.jobDescription" readonly></el-input>
  716. </el-form-item>
  717. </div>
  718. </el-col>
  719. <el-col :span="12">
  720. <div class="grid-content bg-purple">
  721. <el-form-item label="备注信息">
  722. <el-input v-model="customerInformationData.remark" readonly></el-input>
  723. </el-form-item>
  724. </div>
  725. </el-col>
  726. </el-row>
  727. <el-row :gutter="20">
  728. <el-col :span="12">
  729. <div class="grid-content bg-purple">
  730. <el-form-item label="客户联系地址">
  731. <el-input v-model="customerInformationData.addressName" readonly></el-input>
  732. </el-form-item>
  733. </div>
  734. </el-col>
  735. <el-col :span="12">
  736. <div class="grid-content bg-purple">
  737. <el-form-item label="地址类型">
  738. <el-input v-model="customerInformationData.addressType" readonly></el-input>
  739. </el-form-item>
  740. </div>
  741. </el-col>
  742. </el-row>
  743. <el-row :gutter="20">
  744. <el-col :span="6">
  745. <div class="grid-content bg-purple">
  746. <el-form-item label="创建时间">
  747. <el-input v-model="customerInformationData.createDate" readonly></el-input>
  748. </el-form-item>
  749. </div>
  750. </el-col>
  751. <el-col :span="6">
  752. <div class="grid-content bg-purple">
  753. <el-form-item label="创建人">
  754. <el-input v-model="customerInformationData.createBy" readonly></el-input>
  755. </el-form-item>
  756. </div>
  757. </el-col>
  758. <el-col :span="6">
  759. <div class="grid-content bg-purple">
  760. <el-form-item label="更新时间">
  761. <el-input v-model="customerInformationData.updateDate" readonly></el-input>
  762. </el-form-item>
  763. </div>
  764. </el-col>
  765. <el-col :span="6">
  766. <div class="grid-content bg-purple">
  767. <el-form-item label="更新人">
  768. <el-input v-model="customerInformationData.updateBy" readonly></el-input>
  769. </el-form-item>
  770. </div>
  771. </el-col>
  772. </el-row>
  773. </el-form>
  774. </el-tab-pane>
  775. </el-tabs>
  776. <!-- chooseList模态框 -->
  777. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  778. <!-- 上传文件的modal -->
  779. <proofingUploadFile ref="proofingUploadFile" @refreshPageTables="getFileContentData()" v-drag></proofingUploadFile>
  780. </div>
  781. </template>
  782. <script>
  783. import {
  784. proofingInformationSearch, // 打样信息列表查询
  785. proofingInformationSave, // 打样信息新增
  786. proofingInformationEdit, // 打样信息编辑
  787. proofingInformationDelete, // 打样信息删除
  788. getFileContentList, // 获取打样单附件列表
  789. proofingResultSearch, // 获取打样结果对象
  790. deleteProofingFile, // 文件删除
  791. saveProofingResult, // 保存打样结果
  792. saveSubmitResult, // 保存送样结果
  793. saveCustomerResponse, // 保存客户回复
  794. getProjectPartList, // 获取产品列表
  795. getProjectInformation, // 获取项目信息
  796. getCustomerInformation // 获取客户信息
  797. } from '@/api/proofing/proofingInformation.js'
  798. import {
  799. downLoadQuotationFile // 文件下载
  800. } from '@/api/quotation/quotationInformation.js'
  801. import Chooselist from '@/views/modules/common/Chooselist'
  802. import proofingUploadFile from "./proofing_upload_file"
  803. export default {
  804. components: {
  805. Chooselist,
  806. proofingUploadFile
  807. },
  808. watch: {
  809. searchData: {
  810. deep: true,
  811. handler: function (newV, oldV) {
  812. this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
  813. this.searchData.projectId = this.searchData.projectId.toUpperCase()
  814. }
  815. },
  816. modalData: {
  817. deep: true,
  818. handler: function (newV, oldV) {
  819. this.modalData.customerNo = this.modalData.customerNo.toUpperCase()
  820. this.modalData.projectId = this.modalData.projectId.toUpperCase()
  821. this.modalData.proofingNo = this.modalData.proofingNo.toUpperCase()
  822. }
  823. }
  824. },
  825. data () {
  826. return {
  827. // 导出
  828. exportData: [],
  829. exportName: '设备分类' + this.dayjs().format('YYYYMMDDHHmmss'),
  830. exportHeader: ['设备分类'],
  831. exportFooter: [],
  832. resultList: [],
  833. // ======== 行高 ========
  834. height: 200,
  835. secondHeight: 200,
  836. // ======== 分页 ========
  837. pageIndex: 1,
  838. pageSize: 50,
  839. totalPage: 0,
  840. selectedDataNum: 0,
  841. // 条件查询
  842. searchData: {
  843. site: this.$store.state.user.site,
  844. customerNo: '',
  845. customerDesc: '',
  846. trackerName: '',
  847. testPartNo: '',
  848. partName: '',
  849. proofingStatus: '',
  850. startDate: '',
  851. endDate: '',
  852. projectId: '',
  853. projectName: '',
  854. engineerName: '',
  855. priorityLevel: '',
  856. page: 1,
  857. limit: 10
  858. },
  859. // 其它
  860. dataListLoading: false,
  861. // 初始页签
  862. activeTable: 'proofing_detail_information',
  863. // ======== 数据对象 ========
  864. modalData: {
  865. flag: '',
  866. title: '',
  867. site: this.$store.state.user.site,
  868. proofingNo: '',
  869. customerNo: '',
  870. customerDesc: '',
  871. projectId: '',
  872. projectName: '',
  873. tracker: '',
  874. trackerName: '',
  875. testPartNo: '',
  876. partName: '',
  877. engineer: '',
  878. engineerName: '',
  879. priorityLevel: '',
  880. proofingNumber: '',
  881. requiredDeliveryDate: '',
  882. remark: '',
  883. technicalConsiderations: '',
  884. isNeedToSendSamples: '',
  885. sendSamplesAddress: '',
  886. consignee: '',
  887. consigneeContact: '',
  888. actualityDeliveryDate: '',
  889. proofingResultInformation: '',
  890. actualitySendSamplesDate: '',
  891. sendSamplesMethod: '',
  892. deliverGoodsInformation: '',
  893. deliverGoodsRemark: '',
  894. actualityReplyDate: '',
  895. confirmResults: '',
  896. confirmBy: '',
  897. confirmInformation: '',
  898. proofingStatus: '',
  899. proofingResultStatus: '',
  900. nextToDo: '',
  901. createDate: '',
  902. createBy: '',
  903. updateDate: '',
  904. updateBy: ''
  905. },
  906. proofingDetailData: {
  907. technicalConsiderations: '',
  908. isNeedToSendSamples: '',
  909. sendSamplesAddress: '',
  910. consignee: '',
  911. consigneeContact: ''
  912. },
  913. proofingResultData: {
  914. proofingResultStatus: '',
  915. actualityDeliveryDate: '',
  916. isNeedToSendSamples: '',
  917. proofingResultInformation: '',
  918. actualitySendSamplesDate: '',
  919. sendSamplesMethod: '',
  920. deliverGoodsInformation: '',
  921. deliverGoodsRemark: '',
  922. confirmResults: '',
  923. actualityReplyDate: '',
  924. confirmBy: '',
  925. confirmInformation: ''
  926. },
  927. enterResultData: {
  928. site: this.$store.state.user.site,
  929. proofingNo: '',
  930. actualityDeliveryDate: '',
  931. proofingResultInformation: '',
  932. updateBy: this.$store.state.user.name,
  933. proofingResultStatus: '',
  934. fileContentList: []
  935. },
  936. submitResultData: {
  937. site: this.$store.state.user.site,
  938. proofingNo: '',
  939. actualitySendSamplesDate: '',
  940. sendSamplesMethod: '',
  941. deliverGoodsInformation: '',
  942. deliverGoodsRemark: '',
  943. updateBy: this.$store.state.user.name,
  944. proofingResultStatus: ''
  945. },
  946. customerResponseData: {
  947. site: this.$store.state.user.site,
  948. proofingNo: '',
  949. actualityReplyDate: '',
  950. confirmResults: '',
  951. confirmBy: '',
  952. confirmInformation: '',
  953. updateBy: this.$store.state.user.name,
  954. proofingResultStatus: ''
  955. },
  956. projectPartData: {
  957. site: this.$store.state.user.site,
  958. testPartNo: '',
  959. partName: ''
  960. },
  961. projectInformationData: {
  962. projectId: '',
  963. projectName: '',
  964. projectType: '',
  965. projectSourceDesc: '',
  966. priorityDesc: '',
  967. status: '',
  968. projectDesc: '',
  969. projectManagerName: '',
  970. projectOwnerName: '',
  971. userRoleName: '',
  972. remark: ''
  973. },
  974. customerInformationData: {
  975. customerNo: '',
  976. customerDesc: '',
  977. importantCustomer: '',
  978. customerCurrency: '',
  979. turnoverOfYear: '',
  980. potentialRevenueOfYear: '',
  981. customerStatus: '',
  982. customerIndustry: '',
  983. companyName: '',
  984. jobDescription: '',
  985. remark: '',
  986. contactName: '',
  987. contactPhoneNumber1: '',
  988. position: '',
  989. addressName: '',
  990. addressType: '',
  991. createDate: '',
  992. createBy: '',
  993. updateDate: '',
  994. updateBy: ''
  995. },
  996. // ======== 数据列表 ========
  997. dataList: [],
  998. fileContentList: [],
  999. projectPartList: [],
  1000. // ======== 列表表头 ========
  1001. columnList: [
  1002. {
  1003. userId: this.$store.state.user.name,
  1004. functionId: 103001,
  1005. serialNumber: '103001Table1ProofingNo',
  1006. tableId: '103001Table1',
  1007. tableName: '打样信息表',
  1008. columnProp: 'proofingNo',
  1009. headerAlign: 'center',
  1010. align: 'center',
  1011. columnLabel: '打样单号',
  1012. columnHidden: false,
  1013. columnImage: false,
  1014. columnSortable: false,
  1015. sortLv: 0,
  1016. status: true,
  1017. fixed: '',
  1018. columnWidth: 120
  1019. },
  1020. {
  1021. userId: this.$store.state.user.name,
  1022. functionId: 103001,
  1023. serialNumber: '103001Table1CustomerNo',
  1024. tableId: '103001Table1',
  1025. tableName: '打样信息表',
  1026. columnProp: 'customerNo',
  1027. headerAlign: 'center',
  1028. align: 'center',
  1029. columnLabel: '客户编码',
  1030. columnHidden: false,
  1031. columnImage: false,
  1032. columnSortable: false,
  1033. sortLv: 0,
  1034. status: true,
  1035. fixed: '',
  1036. columnWidth: 100
  1037. },
  1038. {
  1039. userId: this.$store.state.user.name,
  1040. functionId: 103001,
  1041. serialNumber: '103001Table1CustomerDesc',
  1042. tableId: '103001Table1',
  1043. tableName: '打样信息表',
  1044. columnProp: 'customerDesc',
  1045. headerAlign: 'center',
  1046. align: 'center',
  1047. columnLabel: '客户名称',
  1048. columnHidden: false,
  1049. columnImage: false,
  1050. columnSortable: false,
  1051. sortLv: 0,
  1052. status: true,
  1053. fixed: '',
  1054. columnWidth: 120
  1055. },
  1056. {
  1057. userId: this.$store.state.user.name,
  1058. functionId: 103001,
  1059. serialNumber: '103001Table1ProjectId',
  1060. tableId: '103001Table1',
  1061. tableName: '打样信息表',
  1062. columnProp: 'projectId',
  1063. headerAlign: 'center',
  1064. align: 'center',
  1065. columnLabel: '项目编码',
  1066. columnHidden: false,
  1067. columnImage: false,
  1068. columnSortable: false,
  1069. sortLv: 0,
  1070. status: true,
  1071. fixed: '',
  1072. columnWidth: 100
  1073. },
  1074. {
  1075. userId: this.$store.state.user.name,
  1076. functionId: 103001,
  1077. serialNumber: '103001Table1ProjectName',
  1078. tableId: '103001Table1',
  1079. tableName: '打样信息表',
  1080. columnProp: 'projectName',
  1081. headerAlign: 'center',
  1082. align: 'center',
  1083. columnLabel: '项目名称',
  1084. columnHidden: false,
  1085. columnImage: false,
  1086. columnSortable: false,
  1087. sortLv: 0,
  1088. status: true,
  1089. fixed: '',
  1090. columnWidth: 120
  1091. },
  1092. {
  1093. userId: this.$store.state.user.name,
  1094. functionId: 103001,
  1095. serialNumber: '103001Table1TrackerName',
  1096. tableId: '103001Table1',
  1097. tableName: '打样信息表',
  1098. columnProp: 'trackerName',
  1099. headerAlign: 'center',
  1100. align: 'center',
  1101. columnLabel: '跟单员',
  1102. columnHidden: false,
  1103. columnImage: false,
  1104. columnSortable: false,
  1105. sortLv: 0,
  1106. status: true,
  1107. fixed: '',
  1108. columnWidth: 80
  1109. },
  1110. {
  1111. userId: this.$store.state.user.name,
  1112. functionId: 103001,
  1113. serialNumber: '103001Table1EngineerName',
  1114. tableId: '103001Table1',
  1115. tableName: '打样信息表',
  1116. columnProp: 'engineerName',
  1117. headerAlign: 'center',
  1118. align: 'center',
  1119. columnLabel: '工程师',
  1120. columnHidden: false,
  1121. columnImage: false,
  1122. columnSortable: false,
  1123. sortLv: 0,
  1124. status: true,
  1125. fixed: '',
  1126. columnWidth: 80
  1127. },
  1128. {
  1129. userId: this.$store.state.user.name,
  1130. functionId: 103001,
  1131. serialNumber: '103001Table1TestPartNo',
  1132. tableId: '103001Table1',
  1133. tableName: '打样信息表',
  1134. columnProp: 'testPartNo',
  1135. headerAlign: 'center',
  1136. align: 'center',
  1137. columnLabel: '项目料号',
  1138. columnHidden: false,
  1139. columnImage: false,
  1140. columnSortable: false,
  1141. sortLv: 0,
  1142. status: true,
  1143. fixed: '',
  1144. columnWidth: 100
  1145. },
  1146. {
  1147. userId: this.$store.state.user.name,
  1148. functionId: 103001,
  1149. serialNumber: '103001Table1PartName',
  1150. tableId: '103001Table1',
  1151. tableName: '打样信息表',
  1152. columnProp: 'partName',
  1153. headerAlign: 'center',
  1154. align: 'center',
  1155. columnLabel: '物料名称',
  1156. columnHidden: false,
  1157. columnImage: false,
  1158. columnSortable: false,
  1159. sortLv: 0,
  1160. status: true,
  1161. fixed: '',
  1162. columnWidth: 100
  1163. },
  1164. {
  1165. userId: this.$store.state.user.name,
  1166. functionId: 103001,
  1167. serialNumber: '103001Table1PriorityLevel',
  1168. tableId: '103001Table1',
  1169. tableName: '打样信息表',
  1170. columnProp: 'priorityLevel',
  1171. headerAlign: 'center',
  1172. align: 'center',
  1173. columnLabel: '优先等级',
  1174. columnHidden: false,
  1175. columnImage: false,
  1176. columnSortable: false,
  1177. sortLv: 0,
  1178. status: true,
  1179. fixed: '',
  1180. columnWidth: 80
  1181. },
  1182. {
  1183. userId: this.$store.state.user.name,
  1184. functionId: 103001,
  1185. serialNumber: '103001Table1ProofingNumber',
  1186. tableId: '103001Table1',
  1187. tableName: '打样信息表',
  1188. columnProp: 'proofingNumber',
  1189. headerAlign: 'center',
  1190. align: 'center',
  1191. columnLabel: '打样数量',
  1192. columnHidden: false,
  1193. columnImage: false,
  1194. columnSortable: false,
  1195. sortLv: 0,
  1196. status: true,
  1197. fixed: '',
  1198. columnWidth: 80
  1199. },
  1200. {
  1201. userId: this.$store.state.user.name,
  1202. functionId: 103001,
  1203. serialNumber: '103001Table1RequiredDeliveryDate',
  1204. tableId: '103001Table1',
  1205. tableName: '打样信息表',
  1206. columnProp: 'requiredDeliveryDate',
  1207. headerAlign: 'center',
  1208. align: 'center',
  1209. columnLabel: '要求交付日期',
  1210. columnHidden: false,
  1211. columnImage: false,
  1212. columnSortable: false,
  1213. sortLv: 0,
  1214. status: true,
  1215. fixed: '',
  1216. columnWidth: 160
  1217. },
  1218. {
  1219. userId: this.$store.state.user.name,
  1220. functionId: 103001,
  1221. serialNumber: '103001Table1ProofingStatus',
  1222. tableId: '103001Table1',
  1223. tableName: '打样信息表',
  1224. columnProp: 'proofingStatus',
  1225. headerAlign: 'center',
  1226. align: 'center',
  1227. columnLabel: '状态',
  1228. columnHidden: false,
  1229. columnImage: false,
  1230. columnSortable: false,
  1231. sortLv: 0,
  1232. status: true,
  1233. fixed: '',
  1234. columnWidth: 80
  1235. },
  1236. {
  1237. userId: this.$store.state.user.name,
  1238. functionId: 103001,
  1239. serialNumber: '103001Table1CreateDate',
  1240. tableId: '103001Table1',
  1241. tableName: '打样信息表',
  1242. columnProp: 'createDate',
  1243. headerAlign: 'center',
  1244. align: 'center',
  1245. columnLabel: '创建时间',
  1246. columnHidden: false,
  1247. columnImage: false,
  1248. columnSortable: false,
  1249. sortLv: 0,
  1250. status: true,
  1251. fixed: '',
  1252. columnWidth: 160
  1253. },
  1254. {
  1255. userId: this.$store.state.user.name,
  1256. functionId: 103001,
  1257. serialNumber: '103001Table1CreateBy',
  1258. tableId: '103001Table1',
  1259. tableName: '打样信息表',
  1260. columnProp: 'createBy',
  1261. headerAlign: 'center',
  1262. align: 'center',
  1263. columnLabel: '创建人',
  1264. columnHidden: false,
  1265. columnImage: false,
  1266. columnSortable: false,
  1267. sortLv: 0,
  1268. status: true,
  1269. fixed: '',
  1270. columnWidth: 80
  1271. },
  1272. {
  1273. userId: this.$store.state.user.name,
  1274. functionId: 103001,
  1275. serialNumber: '103001Table1UpdateDate',
  1276. tableId: '103001Table1',
  1277. tableName: '打样信息表',
  1278. columnProp: 'updateDate',
  1279. headerAlign: 'center',
  1280. align: 'center',
  1281. columnLabel: '更新时间',
  1282. columnHidden: false,
  1283. columnImage: false,
  1284. columnSortable: false,
  1285. sortLv: 0,
  1286. status: true,
  1287. fixed: '',
  1288. columnWidth: 160
  1289. },
  1290. {
  1291. userId: this.$store.state.user.name,
  1292. functionId: 103001,
  1293. serialNumber: '103001Table1UpdateBy',
  1294. tableId: '103001Table1',
  1295. tableName: '打样信息表',
  1296. columnProp: 'updateBy',
  1297. headerAlign: 'center',
  1298. align: 'center',
  1299. columnLabel: '更新人',
  1300. columnHidden: false,
  1301. columnImage: false,
  1302. columnSortable: false,
  1303. sortLv: 0,
  1304. status: true,
  1305. fixed: '',
  1306. columnWidth: 80
  1307. }
  1308. ],
  1309. fileColumnList: [
  1310. {
  1311. userId: this.$store.state.user.name,
  1312. functionId: 103001,
  1313. serialNumber: '103001Table2FileName',
  1314. tableId: '103001Table2',
  1315. tableName: '文件信息表',
  1316. columnProp: 'fileName',
  1317. headerAlign: 'center',
  1318. align: 'center',
  1319. columnLabel: '文件名称',
  1320. columnHidden: false,
  1321. columnImage: false,
  1322. columnSortable: false,
  1323. sortLv: 0,
  1324. status: true,
  1325. fixed: '',
  1326. columnWidth: 140
  1327. },
  1328. {
  1329. userId: this.$store.state.user.name,
  1330. functionId: 103001,
  1331. serialNumber: '103001Table2FileRemark',
  1332. tableId: '103001Table2',
  1333. tableName: '文件信息表',
  1334. columnProp: 'fileRemark',
  1335. headerAlign: 'center',
  1336. align: 'center',
  1337. columnLabel: '备注',
  1338. columnHidden: false,
  1339. columnImage: false,
  1340. columnSortable: false,
  1341. sortLv: 0,
  1342. status: true,
  1343. fixed: '',
  1344. columnWidth: 240
  1345. },
  1346. // {
  1347. // userId: this.$store.state.user.name,
  1348. // functionId: 103001,
  1349. // serialNumber: '103001Table2OrderRef3',
  1350. // tableId: '103001Table2',
  1351. // tableName: '文件信息表',
  1352. // columnProp: 'orderRef3',
  1353. // headerAlign: 'center',
  1354. // align: 'center',
  1355. // columnLabel: '文件描述',
  1356. // columnHidden: false,
  1357. // columnImage: false,
  1358. // columnSortable: false,
  1359. // sortLv: 0,
  1360. // status: true,
  1361. // fixed: '',
  1362. // columnWidth: 120
  1363. // },
  1364. {
  1365. userId: this.$store.state.user.name,
  1366. functionId: 103001,
  1367. serialNumber: '103001Table2CreateDate',
  1368. tableId: '103001Table2',
  1369. tableName: '文件信息表',
  1370. columnProp: 'createDate',
  1371. headerAlign: 'center',
  1372. align: 'center',
  1373. columnLabel: '上传时间',
  1374. columnHidden: false,
  1375. columnImage: false,
  1376. columnSortable: false,
  1377. sortLv: 0,
  1378. status: true,
  1379. fixed: '',
  1380. columnWidth: 140
  1381. },
  1382. {
  1383. userId: this.$store.state.user.name,
  1384. functionId: 103001,
  1385. serialNumber: '103001Table2CreatedBy',
  1386. tableId: '103001Table2',
  1387. tableName: '文件信息表',
  1388. columnProp: 'createdBy',
  1389. headerAlign: 'center',
  1390. align: 'center',
  1391. columnLabel: '上传人',
  1392. columnHidden: false,
  1393. columnImage: false,
  1394. columnSortable: false,
  1395. sortLv: 0,
  1396. status: true,
  1397. fixed: '',
  1398. columnWidth: 140
  1399. }
  1400. ],
  1401. projectPartDetailList: [
  1402. {
  1403. userId: this.$store.state.user.name,
  1404. functionId: 103001,
  1405. serialNumber: '103001Table3CustomerNo',
  1406. tableId: '103001Table3',
  1407. tableName: '项目物料表',
  1408. columnProp: 'customerNo',
  1409. headerAlign: 'center',
  1410. align: 'center',
  1411. columnLabel: '客户编码',
  1412. columnHidden: false,
  1413. columnImage: false,
  1414. columnSortable: false,
  1415. sortLv: 0,
  1416. status: true,
  1417. fixed: '',
  1418. columnWidth: 100
  1419. },
  1420. {
  1421. userId: this.$store.state.user.name,
  1422. functionId: 103001,
  1423. serialNumber: '103001Table3CustomerDesc',
  1424. tableId: '103001Table3',
  1425. tableName: '项目物料表',
  1426. columnProp: 'customerDesc',
  1427. headerAlign: 'center',
  1428. align: 'center',
  1429. columnLabel: '客户名称',
  1430. columnHidden: false,
  1431. columnImage: false,
  1432. columnSortable: false,
  1433. sortLv: 0,
  1434. status: true,
  1435. fixed: '',
  1436. columnWidth: 120
  1437. },
  1438. {
  1439. userId: this.$store.state.user.name,
  1440. functionId: 103001,
  1441. serialNumber: '103001Table3ProjectName',
  1442. tableId: '103001Table3',
  1443. tableName: '项目物料表',
  1444. columnProp: 'projectId',
  1445. headerAlign: 'center',
  1446. align: 'center',
  1447. columnLabel: '项目编码',
  1448. columnHidden: false,
  1449. columnImage: false,
  1450. columnSortable: false,
  1451. sortLv: 0,
  1452. status: true,
  1453. fixed: '',
  1454. columnWidth: 100
  1455. },
  1456. {
  1457. userId: this.$store.state.user.name,
  1458. functionId: 103001,
  1459. serialNumber: '103001Table3ProjectId',
  1460. tableId: '103001Table3',
  1461. tableName: '项目物料表',
  1462. columnProp: 'projectName',
  1463. headerAlign: 'center',
  1464. align: 'center',
  1465. columnLabel: '项目名称',
  1466. columnHidden: false,
  1467. columnImage: false,
  1468. columnSortable: false,
  1469. sortLv: 0,
  1470. status: true,
  1471. fixed: '',
  1472. columnWidth: 120
  1473. },
  1474. {
  1475. userId: this.$store.state.user.name,
  1476. functionId: 103001,
  1477. serialNumber: '103001Table3TestPartNo',
  1478. tableId: '103001Table3',
  1479. tableName: '项目物料表',
  1480. columnProp: 'testPartNo',
  1481. headerAlign: 'center',
  1482. align: 'center',
  1483. columnLabel: '产品编码',
  1484. columnHidden: false,
  1485. columnImage: false,
  1486. columnSortable: false,
  1487. sortLv: 0,
  1488. status: true,
  1489. fixed: '',
  1490. columnWidth: 150
  1491. },
  1492. {
  1493. userId: this.$store.state.user.name,
  1494. functionId: 103001,
  1495. serialNumber: '103001Table3PartName',
  1496. tableId: '103001Table3',
  1497. tableName: '项目物料表',
  1498. columnProp: 'partName',
  1499. headerAlign: 'center',
  1500. align: 'center',
  1501. columnLabel: '产品名称',
  1502. columnHidden: false,
  1503. columnImage: false,
  1504. columnSortable: false,
  1505. sortLv: 0,
  1506. status: true,
  1507. fixed: '',
  1508. columnWidth: 120
  1509. }
  1510. ],
  1511. // ======== 必填规则 ========
  1512. rules: {
  1513. customerDesc: [
  1514. {
  1515. required: true,
  1516. message: ' ',
  1517. trigger: 'change'
  1518. }
  1519. ],
  1520. trackerName: [
  1521. {
  1522. required: true,
  1523. message: ' ',
  1524. trigger: 'change'
  1525. }
  1526. ],
  1527. projectName: [
  1528. {
  1529. required: true,
  1530. message: ' ',
  1531. trigger: 'change'
  1532. }
  1533. ],
  1534. engineerName: [
  1535. {
  1536. required: true,
  1537. message: ' ',
  1538. trigger: 'change'
  1539. }
  1540. ],
  1541. partName: [
  1542. {
  1543. required: true,
  1544. message: ' ',
  1545. trigger: 'change'
  1546. }
  1547. ],
  1548. priorityLevel: [
  1549. {
  1550. required: true,
  1551. message: ' ',
  1552. trigger: 'change'
  1553. }
  1554. ],
  1555. requiredDeliveryDate: [
  1556. {
  1557. required: true,
  1558. message: ' ',
  1559. trigger: 'change'
  1560. }
  1561. ]
  1562. },
  1563. enterResultRules: {
  1564. actualityDeliveryDate: [
  1565. {
  1566. required: true,
  1567. message: ' ',
  1568. trigger: 'change'
  1569. }
  1570. ],
  1571. proofingResultInformation: [
  1572. {
  1573. required: true,
  1574. message: ' ',
  1575. trigger: 'change'
  1576. }
  1577. ]
  1578. },
  1579. submitResultRules: {
  1580. actualitySendSamplesDate: [
  1581. {
  1582. required: true,
  1583. message: ' ',
  1584. trigger: 'change'
  1585. }
  1586. ],
  1587. sendSamplesMethod: [
  1588. {
  1589. required: true,
  1590. message: ' ',
  1591. trigger: 'change'
  1592. }
  1593. ]
  1594. },
  1595. customerResponseRules: {
  1596. actualityReplyDate: [
  1597. {
  1598. required: true,
  1599. message: ' ',
  1600. trigger: 'change'
  1601. }
  1602. ],
  1603. confirmResults: [
  1604. {
  1605. required: true,
  1606. message: ' ',
  1607. trigger: 'change'
  1608. }
  1609. ],
  1610. confirmBy: [
  1611. {
  1612. required: true,
  1613. message: ' ',
  1614. trigger: 'change'
  1615. }
  1616. ]
  1617. },
  1618. // ======== 复选数据集 ========
  1619. proofingSelections: [],
  1620. projectPartListSelections: [],
  1621. // ======== 选中的当前行数据 ========
  1622. proofingCurrentRow: {},
  1623. // ======== 模态框开关控制 ========
  1624. modalFlag: false,
  1625. modalDisableFlag: false,
  1626. enterResultModalFlag: false,
  1627. submitResultModalFlag: false,
  1628. customerResponseModalFlag: false,
  1629. projectPartModelFlag: false
  1630. }
  1631. },
  1632. mounted () {
  1633. this.$nextTick(() => {
  1634. this.height = window.innerHeight / 2 - 240;
  1635. /*第二个表格高度的动态调整*/
  1636. this.secondHeight = window.innerHeight / 2 - 206;
  1637. })
  1638. },
  1639. created () {
  1640. this.getDataList()
  1641. },
  1642. methods: {
  1643. // ======== 分页相关方法 ========
  1644. /**
  1645. * 每页数
  1646. * @param val
  1647. */
  1648. sizeChangeHandle (val) {
  1649. this.pageSize = val
  1650. this.pageIndex = 1
  1651. this.getDataList()
  1652. },
  1653. /**
  1654. * 当前页
  1655. * @param val
  1656. */
  1657. currentChangeHandle (val) {
  1658. this.pageIndex = val
  1659. this.getDataList()
  1660. },
  1661. // ======== 复选框操作相关方法 ========
  1662. /**
  1663. * 选中一行
  1664. * @param row
  1665. */
  1666. projectPartClickRow (row) {
  1667. this.$refs.projectPartTable.toggleRowSelection(row);
  1668. },
  1669. /**
  1670. * 多选
  1671. * @param val
  1672. */
  1673. selectionProjectPart (val) {
  1674. this.projectPartListSelections = val
  1675. },
  1676. /**
  1677. * 获取唯一值一般都为 id
  1678. * @param row
  1679. * @returns {*}
  1680. */
  1681. getRowKeys (row) {
  1682. return row.testPartNo;
  1683. },
  1684. /**
  1685. * 未知
  1686. * @returns {boolean}
  1687. */
  1688. selectFlag () {
  1689. return true;
  1690. },
  1691. // ======== 页签切换相关方法 ========
  1692. /**
  1693. * 列表表格选择替换
  1694. * @param tab
  1695. * @param event
  1696. */
  1697. tabClick (tab, event) {
  1698. // 刷新列表数据
  1699. this.refreshCurrentTabTable()
  1700. },
  1701. /**
  1702. * 当前值发生变化的时候修改
  1703. * @param row
  1704. * @param oldRow
  1705. */
  1706. changeCurrentRow (row, oldRow) {
  1707. // 判断是否是获取焦点的事件
  1708. if (row) {
  1709. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  1710. //刷新当前页表
  1711. this.refreshCurrentTabTable()
  1712. }
  1713. },
  1714. /**
  1715. * 刷新页签的table数据
  1716. */
  1717. refreshCurrentTabTable () {
  1718. if (this.activeTable === 'proofing_result') {
  1719. this.getProofingResult()
  1720. } else if (this.activeTable === 'project_information') {
  1721. this.getProjectInformation()
  1722. } else if (this.activeTable === 'customer_information') {
  1723. this.getCustomerInformation()
  1724. }
  1725. },
  1726. // ======== 列表数据刷新方法 ========
  1727. /**
  1728. * 获取数据列表
  1729. */
  1730. getDataList () {
  1731. this.searchData.limit = this.pageSize
  1732. this.searchData.page = this.pageIndex
  1733. proofingInformationSearch(this.searchData).then(({data}) => {
  1734. if (data.code === 0) {
  1735. this.dataList = data.page.list
  1736. this.pageIndex = data.page.currPage
  1737. this.pageSize = data.page.pageSize
  1738. this.totalPage = data.page.totalCount
  1739. this.$refs.selectDiv.setLengthAll( this.dataList.length)
  1740. // 判断是否全部存在数据
  1741. if (this.totalPage > 0) {
  1742. //设置选中行
  1743. this.$refs.proofingTable.setCurrentRow(this.dataList[0])
  1744. //加载当前的页签的table
  1745. this.refreshCurrentTabTable()
  1746. this.proofingClickRow(this.dataList[0])
  1747. } else {
  1748. //设置选中行
  1749. this.$refs.proofingTable.setCurrentRow({})
  1750. // 加载当前的页签的table
  1751. this.refreshCurrentTabTable()
  1752. this.testClickRow({})
  1753. }
  1754. }
  1755. this.dataListLoading = false
  1756. })
  1757. },
  1758. /**
  1759. * 获取打样结果列表
  1760. */
  1761. getProofingResult () {
  1762. let tempData = {
  1763. site: this.$store.state.user.site,
  1764. proofingNo: this.proofingCurrentRow.proofingNo
  1765. }
  1766. // 打样结果对象
  1767. proofingResultSearch(tempData).then(({data}) => {
  1768. if (data && data.code === 0) {
  1769. this.proofingResultData = data.rows[0]
  1770. } else {
  1771. this.proofingResultData = {}
  1772. }
  1773. })
  1774. // 附件列表
  1775. this.getFileContentData()
  1776. },
  1777. /**
  1778. * 获取项目信息
  1779. */
  1780. getProjectInformation () {
  1781. let tempData = {
  1782. site: this.$store.state.user.site,
  1783. projectId: this.proofingCurrentRow.projectId
  1784. }
  1785. // 报价结果对象
  1786. getProjectInformation(tempData).then(({data}) => {
  1787. if (data && data.code === 0) {
  1788. this.projectInformationData = data.rows[0]
  1789. } else {
  1790. this.projectInformationData = {}
  1791. }
  1792. })
  1793. },
  1794. /**
  1795. * 获取客户信息
  1796. */
  1797. getCustomerInformation () {
  1798. let tempData = {
  1799. site: this.$store.state.user.site,
  1800. customerNo: this.proofingCurrentRow.customerNo
  1801. }
  1802. // 报价结果对象
  1803. getCustomerInformation(tempData).then(({data}) => {
  1804. if (data && data.code === 0) {
  1805. this.customerInformationData = data.rows[0]
  1806. } else {
  1807. this.customerInformationData = {}
  1808. }
  1809. })
  1810. },
  1811. // ======== 新增/编辑模态框 ========
  1812. /**
  1813. * 报价信息新增模态框
  1814. */
  1815. addModal () {
  1816. this.modalData = {
  1817. flag: '1',
  1818. title: '打样新增',
  1819. site: this.$store.state.user.site,
  1820. proofingNo: '',
  1821. customerNo: '',
  1822. customerDesc: '',
  1823. projectId: '',
  1824. projectName: '',
  1825. tracker: '',
  1826. trackerName: '',
  1827. testPartNo: '',
  1828. partName: '',
  1829. engineer: '',
  1830. engineerName: '',
  1831. priorityLevel: '',
  1832. proofingNumber: '',
  1833. requiredDeliveryDate: '',
  1834. remark: '',
  1835. technicalConsiderations: '',
  1836. isNeedToSendSamples: '',
  1837. sendSamplesAddress: '',
  1838. consignee: '',
  1839. consigneeContact: '',
  1840. actualityDeliveryDate: '',
  1841. proofingResultInformation: '',
  1842. actualitySendSamplesDate: '',
  1843. sendSamplesMethod: '',
  1844. deliverGoodsInformation: '',
  1845. deliverGoodsRemark: '',
  1846. actualityReplyDate: '',
  1847. confirmResults: '',
  1848. confirmBy: '',
  1849. confirmInformation: '',
  1850. proofingStatus: '草稿',
  1851. proofingResultStatus: 'C',
  1852. nextToDo: '',
  1853. createBy: this.$store.state.user.name
  1854. }
  1855. this.modalDisableFlag = false
  1856. this.modalFlag = true
  1857. },
  1858. /**
  1859. * 报价信息编辑模态框
  1860. * @param row
  1861. */
  1862. updateModal (row) {
  1863. this.modalData = {
  1864. flag: '2',
  1865. title: '打样编辑',
  1866. site: row.site,
  1867. proofingNo: row.proofingNo,
  1868. customerNo: row.customerNo,
  1869. customerDesc: row.customerDesc,
  1870. projectId: row.projectId,
  1871. projectName: row.projectName,
  1872. tracker: row.tracker,
  1873. trackerName: row.trackerName,
  1874. testPartNo: row.testPartNo,
  1875. partName: row.partName,
  1876. engineer: row.engineer,
  1877. engineerName: row.engineerName,
  1878. priorityLevel: row.priorityLevel,
  1879. proofingNumber: row.proofingNumber,
  1880. requiredDeliveryDate: row.requiredDeliveryDate,
  1881. remark: row.remark,
  1882. technicalConsiderations: row.technicalConsiderations,
  1883. isNeedToSendSamples: row.isNeedToSendSamples,
  1884. sendSamplesAddress: row.sendSamplesAddress,
  1885. consignee: row.consignee,
  1886. consigneeContact: row.consigneeContact,
  1887. actualityDeliveryDate: row.actualityDeliveryDate,
  1888. proofingResultInformation: row.proofingResultInformation,
  1889. actualitySendSamplesDate: row.actualitySendSamplesDate,
  1890. sendSamplesMethod: row.sendSamplesMethod,
  1891. deliverGoodsInformation: row.deliverGoodsInformation,
  1892. deliverGoodsRemark: row.deliverGoodsRemark,
  1893. actualityReplyDate: row.actualityReplyDate,
  1894. confirmResults: row.confirmResults,
  1895. confirmBy: row.confirmBy,
  1896. confirmInformation: row.confirmInformation,
  1897. proofingStatus: row.proofingStatus,
  1898. proofingResultStatus: row.proofingResultStatus,
  1899. nextToDo: row.nextToDo,
  1900. updateBy: this.$store.state.user.name
  1901. }
  1902. this.modalDisableFlag = true
  1903. this.modalFlag = true
  1904. },
  1905. // ======== 新增/编辑/删除方法 ========
  1906. /**
  1907. * 获取项目物料列表
  1908. */
  1909. getProjectPartList () {
  1910. // 先清空缓存选中
  1911. this.$nextTick(() => this.$refs.projectPartTable.clearSelection())
  1912. // 拿到选中的产品编号
  1913. let projectPartList = this.modalData.testPartNo.split(';')
  1914. // 查询所有项目物料
  1915. getProjectPartList(this.projectPartData).then(({data}) => {
  1916. if (data && data.code === 0) {
  1917. this.projectPartList = data.rows
  1918. this.projectPartList.forEach (val => {
  1919. // 回显选中的项目物料
  1920. if (projectPartList.includes(val.testPartNo)) {
  1921. this.$nextTick(() => this.$refs.projectPartTable.toggleRowSelection(val, true))
  1922. }
  1923. })
  1924. this.projectPartModelFlag = true
  1925. }else {
  1926. this.$alert(data.msg, '错误', {
  1927. confirmButtonText: '确定'
  1928. })
  1929. }
  1930. })
  1931. },
  1932. /**
  1933. * 确认多选项目物料
  1934. */
  1935. confirmProjectPart () {
  1936. if(this.projectPartListSelections.length === 0){
  1937. this.$message.warning('请勾选项目物料!')
  1938. return
  1939. }
  1940. this.modalData.testPartNo = ''
  1941. this.modalData.partName = ''
  1942. for (let i = 0; i < this.projectPartListSelections.length; i++) {
  1943. this.modalData.testPartNo = this.modalData.testPartNo + ";" + this.projectPartListSelections[i].testPartNo
  1944. this.modalData.partName = this.modalData.partName + ";" + this.projectPartListSelections[i].partName
  1945. }
  1946. this.modalData.testPartNo = this.modalData.testPartNo.substring(1)
  1947. this.modalData.partName = this.modalData.partName.substring(1)
  1948. this.projectPartModelFlag = false
  1949. },
  1950. /**
  1951. * 客户信息新增/编辑
  1952. */
  1953. saveData () {
  1954. if (this.modalData.customerNo === '' || this.modalData.customerNo == null) {
  1955. this.$message.warning('请选择客户编码!')
  1956. return
  1957. }
  1958. if (this.modalData.customerDesc === '' || this.modalData.customerDesc == null) {
  1959. this.$message.warning('请选择客户名称!')
  1960. return
  1961. }
  1962. if (this.modalData.tracker === '' || this.modalData.tracker == null) {
  1963. this.$message.warning('请选择跟单员编码!')
  1964. return
  1965. }
  1966. if (this.modalData.trackerName === '' || this.modalData.trackerName == null) {
  1967. this.$message.warning('请选择跟单员名称!')
  1968. return
  1969. }
  1970. if (this.modalData.projectId === '' || this.modalData.projectId == null) {
  1971. this.$message.warning('请选择项目编码!')
  1972. return
  1973. }
  1974. if (this.modalData.projectName === '' || this.modalData.projectName == null) {
  1975. this.$message.warning('请选择项目名称!')
  1976. return
  1977. }
  1978. if (this.modalData.engineer === '' || this.modalData.engineer == null) {
  1979. this.$message.warning('请选择工程师编码!')
  1980. return
  1981. }
  1982. if (this.modalData.engineerName === '' || this.modalData.engineerName == null) {
  1983. this.$message.warning('请选择工程师名称!')
  1984. return
  1985. }
  1986. if (this.modalData.testPartNo === '' || this.modalData.testPartNo == null) {
  1987. this.$message.warning('请选择项目料号!')
  1988. return
  1989. }
  1990. if (this.modalData.partName === '' || this.modalData.partName == null) {
  1991. this.$message.warning('请选择物料名称!')
  1992. return
  1993. }
  1994. if (this.modalData.priorityLevel === '' || this.modalData.priorityLevel == null) {
  1995. this.$message.warning('请选择优先等级!')
  1996. return
  1997. }
  1998. if (this.modalData.requiredDeliveryDate === '' || this.modalData.requiredDeliveryDate == null) {
  1999. this.$message.warning('请输入要求交付日期!')
  2000. return
  2001. }
  2002. let obj = document.getElementsByName('sendSamples')
  2003. let s = ''
  2004. for (let i = 0; i < obj.length; i++) {
  2005. if (obj[i].checked) {
  2006. s += obj[i].value + ','
  2007. }
  2008. }
  2009. s = s.substring(0,s.length-1)
  2010. this.modalData.isNeedToSendSamples = s
  2011. if (this.modalData.flag === '1') {
  2012. proofingInformationSave(this.modalData).then(({data}) => {
  2013. if (data && data.code === 0) {
  2014. this.getDataList()
  2015. this.modalFlag = false
  2016. this.$message({
  2017. message: '操作成功',
  2018. type: 'success',
  2019. duration: 1500,
  2020. onClose: () => {}
  2021. })
  2022. } else {
  2023. this.$alert(data.msg, '错误', {
  2024. confirmButtonText: '确定'
  2025. })
  2026. }
  2027. })
  2028. } else {
  2029. proofingInformationEdit(this.modalData).then(({data}) => {
  2030. if (data && data.code === 0) {
  2031. this.getDataList()
  2032. this.modalFlag = false
  2033. this.$message({
  2034. message: '操作成功',
  2035. type: 'success',
  2036. duration: 1500,
  2037. onClose: () => {}
  2038. })
  2039. } else {
  2040. this.$alert(data.msg, '错误', {
  2041. confirmButtonText: '确定'
  2042. })
  2043. }
  2044. })
  2045. }
  2046. },
  2047. /**
  2048. * 打样信息删除
  2049. */
  2050. delModal () {
  2051. if(this.proofingSelections.length === 0){
  2052. this.$message.warning('请勾选要删除的打样信息!')
  2053. return
  2054. }
  2055. this.$confirm(`是否删除这 `+ this.proofingSelections.length +` 条打样信息?`, '提示', {
  2056. confirmButtonText: '确定',
  2057. cancelButtonText: '取消',
  2058. type: 'warning'
  2059. }).then(() => {
  2060. let tempData = {
  2061. informationList: this.proofingSelections
  2062. }
  2063. proofingInformationDelete(tempData).then(({data}) => {
  2064. if (data && data.code === 0) {
  2065. this.getDataList()
  2066. this.proofingSelections = []
  2067. this.$message({
  2068. message: '操作成功',
  2069. type: 'success',
  2070. duration: 1500,
  2071. onClose: () => {}
  2072. })
  2073. } else {
  2074. this.$alert(data.msg, '错误', {
  2075. confirmButtonText: '确定'
  2076. })
  2077. }
  2078. })
  2079. }).catch(() => {
  2080. })
  2081. },
  2082. // ======== 列表操作方法 ========
  2083. /**
  2084. * 单机选中报价信息
  2085. * @param row
  2086. */
  2087. proofingClickRow (row) {
  2088. // this.$refs.proofingTable.toggleRowSelection(row)
  2089. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  2090. this.proofingDetailData = JSON.parse(JSON.stringify(row))
  2091. },
  2092. /**
  2093. * 复选报价信息
  2094. * @param val
  2095. */
  2096. selectionProofing (val) {
  2097. this.proofingSelections = val
  2098. this.$refs.selectDiv.setLengthselected(this.proofingSelections.length)
  2099. },
  2100. // ======== 报价结果相关方法 ========
  2101. /**
  2102. * 封装录入方法
  2103. */
  2104. packProofingResultModal () {
  2105. // 重置对象
  2106. this.enterResultData = {
  2107. site: this.$store.state.user.site,
  2108. proofingNo: '',
  2109. actualityDeliveryDate: '',
  2110. proofingResultInformation: '',
  2111. proofingResultStatus: 'E',
  2112. fileContentList: [],
  2113. updateBy: this.$store.state.user.name
  2114. }
  2115. // 获得选中的打样号
  2116. // if (this.proofingSelections.length > 0) {
  2117. // this.proofingSelections.forEach(val => {
  2118. // this.enterResultData.proofingNo += ';' + val.proofingNo
  2119. // })
  2120. // this.enterResultData.proofingNo = this.enterResultData.proofingNo.substring(1)
  2121. // } else {
  2122. // this.enterResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2123. // }
  2124. this.enterResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2125. // // 获得这些打样号的全部附件
  2126. // this.getFileContentList()
  2127. this.enterResultModalFlag = true
  2128. },
  2129. /**
  2130. * 录入打样结果
  2131. */
  2132. proofingResultModal () {
  2133. // // 如果有选中打样单
  2134. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  2135. // let tempData = {
  2136. // currentStatus: 'C',
  2137. // informationList: this.proofingSelections,
  2138. // }
  2139. // // 检查打样单状态
  2140. // checkProofingStatus(tempData).then(({data}) => {
  2141. // if (data && data.code === 0) {
  2142. // if (data.flag === 1) { // 状态一致
  2143. // this.packProofingResultModal()
  2144. // } else { // 状态不同
  2145. // this.$message.warning('选中的打样单进度有误,请确认!')
  2146. // }
  2147. // } else {
  2148. // this.$alert(data.msg, '错误', {
  2149. // confirmButtonText: '确定'
  2150. // })
  2151. // }
  2152. // })
  2153. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  2154. // this.packProofingResultModal()
  2155. // }
  2156. this.packProofingResultModal()
  2157. },
  2158. /**
  2159. * 保存打样结果
  2160. */
  2161. saveProofingResult () {
  2162. if (this.enterResultData.actualityDeliveryDate === '' || this.enterResultData.actualityDeliveryDate == null) {
  2163. this.$message.warning('请选择实际交付日期!')
  2164. return
  2165. }
  2166. if (this.enterResultData.proofingResultInformation === '' || this.enterResultData.proofingResultInformation == null) {
  2167. this.$message.warning('请填写打样结果信息!')
  2168. return
  2169. }
  2170. // if (this.proofingSelections.length > 1) {
  2171. // this.$confirm(`是否录入多条打样结果?`, '提示', {
  2172. // confirmButtonText: '确定',
  2173. // cancelButtonText: '取消',
  2174. // type: 'warning'
  2175. // }).then(() => {
  2176. // saveProofingResult(this.enterResultData).then(({data}) => {
  2177. // if (data && data.code === 0) {
  2178. // this.getDataList()
  2179. // this.enterResultModalFlag = false
  2180. // this.$message({
  2181. // message: '操作成功',
  2182. // type: 'success',
  2183. // duration: 1500,
  2184. // onClose: () => {}
  2185. // })
  2186. // } else {
  2187. // this.$alert(data.msg, '错误', {
  2188. // confirmButtonText: '确定'
  2189. // })
  2190. // }
  2191. // })
  2192. // }).catch(() => {
  2193. // })
  2194. // } else {
  2195. saveProofingResult(this.enterResultData).then(({data}) => {
  2196. if (data && data.code === 0) {
  2197. this.getDataList()
  2198. this.enterResultModalFlag = false
  2199. this.$message({
  2200. message: '操作成功',
  2201. type: 'success',
  2202. duration: 1500,
  2203. onClose: () => {}
  2204. })
  2205. } else {
  2206. this.$alert(data.msg, '错误', {
  2207. confirmButtonText: '确定'
  2208. })
  2209. }
  2210. })
  2211. // }
  2212. },
  2213. /**
  2214. * 封装送样方法
  2215. */
  2216. packSubmitProofingModal () {
  2217. this.submitResultData = {
  2218. site: this.$store.state.user.site,
  2219. proofingNo: '',
  2220. actualitySendSamplesDate: '',
  2221. sendSamplesMethod: '',
  2222. deliverGoodsInformation: '',
  2223. deliverGoodsRemark: '',
  2224. proofingResultStatus: 'S',
  2225. updateBy: this.$store.state.user.name,
  2226. }
  2227. // 获得选中的打样号
  2228. // if (this.proofingSelections.length > 0) {
  2229. // this.proofingSelections.forEach(val => {
  2230. // this.submitResultData.quotationNo += ';' + val.quotationNo
  2231. // })
  2232. // this.submitResultData.quotationNo = this.submitResultData.quotationNo.substring(1)
  2233. // } else {
  2234. // this.submitResultData.quotationNo = this.proofingCurrentRow.quotationNo
  2235. // }
  2236. this.submitResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2237. this.submitResultModalFlag = true
  2238. },
  2239. /**
  2240. * 提交送样信息
  2241. */
  2242. submitProofingModal () {
  2243. // // 如果有选中打样单
  2244. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  2245. // let tempData = {
  2246. // currentStatus: 'E',
  2247. // informationList: this.proofingSelections,
  2248. // }
  2249. // // 检查打样单状态
  2250. // checkProofingStatus(tempData).then(({data}) => {
  2251. // if (data && data.code === 0) {
  2252. // if (data.flag === 1) { // 状态一致
  2253. // this.packSubmitProofingModal()
  2254. // } else { // 状态不同
  2255. // this.$message.warning('选中的打样单进度有误,请确认!')
  2256. // }
  2257. // } else {
  2258. // this.$alert(data.msg, '错误', {
  2259. // confirmButtonText: '确定'
  2260. // })
  2261. // }
  2262. // })
  2263. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  2264. // this.packSubmitProofingModal()
  2265. // }
  2266. this.packSubmitProofingModal()
  2267. },
  2268. /**
  2269. * 保存送样结果
  2270. */
  2271. saveSubmitResult () {
  2272. if (this.submitResultData.actualitySendSamplesDate === '' || this.submitResultData.actualitySendSamplesDate == null) {
  2273. this.$message.warning('请选择实际送样日期!')
  2274. return
  2275. }
  2276. if (this.submitResultData.sendSamplesMethod === '' || this.submitResultData.sendSamplesMethod == null) {
  2277. this.$message.warning('请选择送样方式!')
  2278. return
  2279. }
  2280. // if (this.proofingSelections.length > 1) {
  2281. // this.$confirm(`是否提交多条送样信息?`, '提示', {
  2282. // confirmButtonText: '确定',
  2283. // cancelButtonText: '取消',
  2284. // type: 'warning'
  2285. // }).then(() => {
  2286. // saveSubmitResult(this.submitResultData).then(({data}) => {
  2287. // if (data && data.code === 0) {
  2288. // this.getDataList()
  2289. // this.submitResultModalFlag = false
  2290. // this.$message({
  2291. // message: '操作成功',
  2292. // type: 'success',
  2293. // duration: 1500,
  2294. // onClose: () => {}
  2295. // })
  2296. // } else {
  2297. // this.$alert(data.msg, '错误', {
  2298. // confirmButtonText: '确定'
  2299. // })
  2300. // }
  2301. // })
  2302. // }).catch(() => {
  2303. // })
  2304. // } else {
  2305. saveSubmitResult(this.submitResultData).then(({data}) => {
  2306. if (data && data.code === 0) {
  2307. this.getDataList()
  2308. this.submitResultModalFlag = false
  2309. this.$message({
  2310. message: '操作成功',
  2311. type: 'success',
  2312. duration: 1500,
  2313. onClose: () => {}
  2314. })
  2315. } else {
  2316. this.$alert(data.msg, '错误', {
  2317. confirmButtonText: '确定'
  2318. })
  2319. }
  2320. })
  2321. // }
  2322. },
  2323. /**
  2324. * 封装回复方法
  2325. */
  2326. packCustomerResponseModal () {
  2327. this.customerResponseData = {
  2328. site: this.$store.state.user.site,
  2329. proofingNo: '',
  2330. actualityReplyDate: '',
  2331. confirmResults: '',
  2332. confirmBy: '',
  2333. confirmInformation: '',
  2334. proofingResultStatus: 'R',
  2335. updateBy: this.$store.state.user.name
  2336. }
  2337. // 获得选中的打样号
  2338. // if (this.proofingSelections.length > 0) {
  2339. // this.proofingSelections.forEach(val => {
  2340. // this.customerResponseData.proofingNo += ';' + val.proofingNo
  2341. // })
  2342. // this.customerResponseData.proofingNo = this.customerResponseData.proofingNo.substring(1)
  2343. // } else {
  2344. // this.customerResponseData.proofingNo = this.proofingCurrentRow.proofingNo
  2345. // }
  2346. this.customerResponseData.proofingNo = this.proofingCurrentRow.proofingNo
  2347. this.customerResponseModalFlag = true
  2348. },
  2349. /**
  2350. * 客户回复
  2351. */
  2352. customerResponseModal () {
  2353. // // 如果有选中打样单
  2354. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  2355. // let tempData = {
  2356. // currentStatus: 'S',
  2357. // informationList: this.proofingSelections,
  2358. // }
  2359. // // 检查打样单状态
  2360. // checkProofingStatus(tempData).then(({data}) => {
  2361. // if (data && data.code === 0) {
  2362. // if (data.flag === 1) { // 状态一致
  2363. // this.packCustomerResponseModal()
  2364. // } else { // 状态不同
  2365. // this.$message.warning('选中的打样单进度有误,请确认!')
  2366. // }
  2367. // } else {
  2368. // this.$alert(data.msg, '错误', {
  2369. // confirmButtonText: '确定'
  2370. // })
  2371. // }
  2372. // })
  2373. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  2374. // this.packCustomerResponseModal()
  2375. // }
  2376. this.packCustomerResponseModal()
  2377. },
  2378. /**
  2379. * 保存客户回复
  2380. */
  2381. saveCustomerResponse () {
  2382. if (this.customerResponseData.actualityReplyDate === '' || this.customerResponseData.actualityReplyDate == null) {
  2383. this.$message.warning('请选择实际回复日期!')
  2384. return
  2385. }
  2386. if (this.customerResponseData.confirmResults === '' || this.customerResponseData.confirmResults == null) {
  2387. this.$message.warning('请选择客户确认结果!')
  2388. return
  2389. }
  2390. if (this.customerResponseData.confirmBy === '' || this.customerResponseData.confirmBy == null) {
  2391. this.$message.warning('请填写客户确认人!')
  2392. return
  2393. }
  2394. // if (this.proofingSelections.length > 1) {
  2395. // this.$confirm(`是否提交多条客户回复?`, '提示', {
  2396. // confirmButtonText: '确定',
  2397. // cancelButtonText: '取消',
  2398. // type: 'warning'
  2399. // }).then(() => {
  2400. // saveCustomerResponse(this.customerResponseData).then(({data}) => {
  2401. // if (data && data.code === 0) {
  2402. // this.getDataList()
  2403. // this.customerResponseModalFlag = false
  2404. // this.$message({
  2405. // message: '操作成功',
  2406. // type: 'success',
  2407. // duration: 1500,
  2408. // onClose: () => {}
  2409. // })
  2410. // } else {
  2411. // this.$alert(data.msg, '错误', {
  2412. // confirmButtonText: '确定'
  2413. // })
  2414. // }
  2415. // })
  2416. // }).catch(() => {
  2417. // })
  2418. // } else {
  2419. saveCustomerResponse(this.customerResponseData).then(({data}) => {
  2420. if (data && data.code === 0) {
  2421. this.getDataList()
  2422. this.customerResponseModalFlag = false
  2423. this.$message({
  2424. message: '操作成功',
  2425. type: 'success',
  2426. duration: 1500,
  2427. onClose: () => {}
  2428. })
  2429. } else {
  2430. this.$alert(data.msg, '错误', {
  2431. confirmButtonText: '确定'
  2432. })
  2433. }
  2434. })
  2435. // }
  2436. },
  2437. // ======== 报价单附件的相关方法 ========
  2438. /**
  2439. * 获取报价单附件列表
  2440. */
  2441. getFileContentData () {
  2442. let currentData = {
  2443. orderRef1: this.$store.state.user.site,
  2444. orderRef2: this.proofingCurrentRow.proofingNo
  2445. }
  2446. getFileContentList(currentData).then(({data}) => {
  2447. if (data && data.code === 0) {
  2448. this.fileContentList = data.rows
  2449. } else {
  2450. this.fileContentList = []
  2451. }
  2452. })
  2453. },
  2454. // /**
  2455. // * 获得这些报价号的全部附件
  2456. // */
  2457. // getFileContentList () {
  2458. // let currentData = {
  2459. // orderRef1: this.$store.state.user.site,
  2460. // orderRef2: this.enterResultData.proofingNo
  2461. // }
  2462. // getFileContentList(currentData).then(({data}) => {
  2463. // if (data && data.code === 0) {
  2464. // this.enterResultData.fileContentList = data.rows
  2465. // } else {
  2466. // this.enterResultData.fileContentList = []
  2467. // }
  2468. // })
  2469. // },
  2470. /**
  2471. * 上传文件
  2472. */
  2473. uploadFile () {
  2474. let currentData = {
  2475. titleCon: '打样附件上传',
  2476. site: this.$store.state.user.site,
  2477. createBy: this.$store.state.user.name,
  2478. proofingNo: this.enterResultData.proofingNo,
  2479. fileRemark: '',
  2480. folder: 'proofingFile',
  2481. // options: []
  2482. }
  2483. // let num = 0
  2484. // let arr = this.enterResultData.proofingNo.split(';')
  2485. // arr.forEach(val => {
  2486. // currentData.options.push({key: num++, value: val})
  2487. // })
  2488. //打开组件 去做新增业务
  2489. this.$nextTick(() => {
  2490. this.$refs.proofingUploadFile.init(currentData)
  2491. })
  2492. },
  2493. /**
  2494. * 文件删除
  2495. * @param row
  2496. */
  2497. deleteFile (row) {
  2498. this.$confirm('确定要删除此文件?', '提示', {
  2499. confirmButtonText: '确定',
  2500. cancelButtonText: '取消',
  2501. type: 'warning'
  2502. }).then(() => {
  2503. deleteProofingFile(row).then(({data}) => {
  2504. if (data && data.code === 0) {
  2505. this.getFileContentList()
  2506. this.$message({
  2507. message: '操作成功',
  2508. type: 'success',
  2509. duration: 1500,
  2510. onClose: () => {}
  2511. })
  2512. } else {
  2513. this.$alert(data.msg, '错误', {
  2514. confirmButtonText: '确定'
  2515. })
  2516. }
  2517. })
  2518. }).catch(() => {
  2519. })
  2520. },
  2521. /**
  2522. * 文件下载
  2523. * @param row
  2524. */
  2525. downloadFile (row) {
  2526. downLoadQuotationFile(row).then(({data}) => {
  2527. // 不限制文件下载类型
  2528. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  2529. // 下载文件名称
  2530. const fileName = row.fileName
  2531. // a标签下载
  2532. const linkNode = document.createElement('a')
  2533. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  2534. linkNode.style.display = 'none'
  2535. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  2536. document.body.appendChild(linkNode)
  2537. linkNode.click() // 模拟在按钮上的一次鼠标单击
  2538. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  2539. document.body.removeChild(linkNode)
  2540. })
  2541. },
  2542. // ======== chooseList相关方法 ========
  2543. /**
  2544. * 获取基础数据列表S
  2545. * @param val
  2546. * @param type
  2547. */
  2548. getBaseList (val, type) {
  2549. this.tagNo = val
  2550. this.tagNo1 = type
  2551. this.$nextTick(() => {
  2552. let strVal = ''
  2553. if (val === 102) {
  2554. if(type === 1) {
  2555. strVal = this.modalData.customerNo
  2556. }
  2557. }
  2558. if (val === 103) {
  2559. if(type === 1) {
  2560. strVal = this.modalData.tracker
  2561. }
  2562. if(type === 2) {
  2563. strVal = this.modalData.engineer
  2564. }
  2565. }
  2566. if (val === 104) {
  2567. if(type === 1) {
  2568. strVal = this.modalData.projectId
  2569. }
  2570. }
  2571. this.$refs.baseList.init(val, strVal)
  2572. })
  2573. },
  2574. /**
  2575. * 列表方法的回调
  2576. * @param val
  2577. */
  2578. getBaseData (val) {
  2579. if (this.tagNo === 102) {
  2580. if(this.tagNo1 === 1) {
  2581. this.modalData.customerNo = val.Customer_no
  2582. this.modalData.customerDesc = val.Customer_desc
  2583. }
  2584. }
  2585. if (this.tagNo === 103) {
  2586. if(this.tagNo1 === 1) {
  2587. this.modalData.tracker = val.username
  2588. this.modalData.trackerName = val.user_display
  2589. }
  2590. if(this.tagNo1 === 2) {
  2591. this.modalData.engineer = val.username
  2592. this.modalData.engineerName = val.user_display
  2593. }
  2594. }
  2595. if (this.tagNo === 104) {
  2596. if(this.tagNo1 === 1) {
  2597. this.modalData.projectId = val.project_id
  2598. this.modalData.projectName = val.project_name
  2599. }
  2600. }
  2601. },
  2602. // ======== 导出相关方法 ========
  2603. /**
  2604. * 导出excel
  2605. */
  2606. async createExportData () {
  2607. this.searchData.limit = -1
  2608. this.searchData.page = 1
  2609. await proofingInformationSearch(this.searchData).then(({data}) => {
  2610. this.resultList = data.page.list
  2611. })
  2612. return this.resultList
  2613. },
  2614. startDownload () {
  2615. },
  2616. finishDownload () {
  2617. },
  2618. fields () {
  2619. let json = '{'
  2620. this.columnList.forEach((item, index) => {
  2621. if (index == this.columnList.length - 1) {
  2622. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  2623. } else {
  2624. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  2625. }
  2626. })
  2627. json += '}'
  2628. let s = eval('(' + json + ')')
  2629. return s
  2630. }
  2631. }
  2632. }
  2633. </script>
  2634. <style scoped lang="scss">
  2635. /deep/ .customer-tab .el-tabs__content {
  2636. padding: 0px !important;
  2637. height: 459px;
  2638. }
  2639. </style>