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.

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