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.

3657 lines
127 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- 查询条件 -->
  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.proofingNo" clearable style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'客户编码'">
  9. <el-input v-model="searchData.customerNo" clearable style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'客户名称'">
  12. <el-input v-model="searchData.customerDesc" clearable style="width: 120px"></el-input>
  13. </el-form-item>
  14. <el-form-item :label="'CS'">
  15. <el-input v-model="searchData.trackerName" clearable style="width: 120px"></el-input>
  16. </el-form-item>
  17. <el-form-item :label="'项目料号'">
  18. <el-input v-model="searchData.testPartNo" clearable style="width: 120px"></el-input>
  19. </el-form-item>
  20. <el-form-item :label="'产品名称'">
  21. <el-input v-model="searchData.partName" clearable style="width: 120px"></el-input>
  22. </el-form-item>
  23. <el-form-item :label="'要求交付日期'">
  24. <el-date-picker
  25. style="width: 120px"
  26. v-model="searchData.startDate"
  27. type="date"
  28. value-format="yyyy-MM-dd"
  29. placeholder="选择日期">
  30. </el-date-picker>
  31. </el-form-item>
  32. <el-form-item label=" ">
  33. <div style="text-align: center;"><i class="el-icon-right"></i></div>
  34. </el-form-item>
  35. <el-form-item :label="' '">
  36. <el-date-picker
  37. style="width: 120px"
  38. v-model="searchData.endDate"
  39. type="date"
  40. value-format="yyyy-MM-dd"
  41. placeholder="选择日期">
  42. </el-date-picker>
  43. </el-form-item>
  44. </el-form>
  45. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  46. <el-form-item :label="'项目编码'">
  47. <el-input v-model="searchData.projectId" clearable style="width: 120px"></el-input>
  48. </el-form-item>
  49. <el-form-item :label="'项目名称'">
  50. <el-input v-model="searchData.projectName" clearable style="width: 120px"></el-input>
  51. </el-form-item>
  52. <el-form-item :label="'NPI工程师'">
  53. <el-input v-model="searchData.engineerName" clearable style="width: 120px"></el-input>
  54. </el-form-item>
  55. <el-form-item :label="'优先等级'">
  56. <dict-data-select v-model="searchData.priorityLevel" clearable style="width: 120px" :use-default-value="false"
  57. dict-type="priority_Level"></dict-data-select>
  58. </el-form-item>
  59. <el-form-item :label="'状态'" v-if="false">
  60. <el-select v-model="searchData.proofingResultStatus" style="width: 120px">
  61. <el-option label="全部" value=""></el-option>
  62. <el-option label="草稿" value="B"></el-option>
  63. <el-option label="已下达" value="C"></el-option>
  64. <el-option label="已完成打样" value="E"></el-option>
  65. <el-option label="已提交打样" value="S"></el-option>
  66. <el-option label="客户已反馈" value="R"></el-option>
  67. </el-select>
  68. </el-form-item>
  69. <el-form-item :label="'状态'">
  70. <el-select v-model="searchData.proofingStatus" style="width: 120px">
  71. <el-option label="全部" value=""></el-option>
  72. <el-option label="草稿" value="草稿"></el-option>
  73. <el-option label="审批中" value="审批中"></el-option>
  74. <el-option label="已完成" value="已完成"></el-option>
  75. <el-option label="下达" value="下达"></el-option>
  76. </el-select>
  77. </el-form-item>
  78. <el-form-item :label="' '">
  79. <el-button @click="getDataList()">查询</el-button>
  80. <el-button type="primary" @click="addModal()">新增</el-button>
  81. <el-button type="primary" @click="delModal()">删除</el-button>
  82. <download-excel
  83. :fields="fields()"
  84. :data="exportData"
  85. type="xls"
  86. :name="exportName"
  87. :header="exportHeader"
  88. :footer="exportFooter"
  89. :fetch="createExportData"
  90. :before-generate="startDownload"
  91. :before-finish="finishDownload"
  92. worksheet="导出信息"
  93. class="el-button el-button--primary el-button--medium">
  94. {{ "导出" }}
  95. </download-excel>
  96. </el-form-item>
  97. </el-form>
  98. <!-- 打样列表 -->
  99. <el-table
  100. :height="height"
  101. :data="dataList"
  102. border
  103. :row-style="rowStyle"
  104. ref="proofingTable"
  105. @row-click="proofingClickRow"
  106. @selection-change="selectionProofing"
  107. @current-change="changeCurrentRow"
  108. v-loading="dataListLoading"
  109. style="width: 100%;">
  110. <el-table-column
  111. type="selection"
  112. header-align="center"
  113. align="center"
  114. :selectable="selectFlag"
  115. width="50">
  116. </el-table-column>
  117. <el-table-column
  118. v-for="(item,index) in columnList" :key="index"
  119. :sortable="item.columnSortable"
  120. :prop="item.columnProp"
  121. :header-align="item.headerAlign"
  122. :show-overflow-tooltip="item.showOverflowTooltip"
  123. :align="item.align"
  124. :fixed="item.fixed === ''?false:item.fixed"
  125. :min-width="item.columnWidth"
  126. :label="item.columnLabel">
  127. <template slot-scope="scope">
  128. <div v-if="item.columnProp === 'proofingResultStatus'">
  129. <span v-if="!item.columnHidden">
  130. <span v-show="scope.row.proofingResultStatus === 'B'">草稿</span>
  131. <span v-show="scope.row.proofingResultStatus === 'C'">已下达</span>
  132. <span v-show="scope.row.proofingResultStatus === 'E'">已完成打样</span>
  133. <span v-show="scope.row.proofingResultStatus === 'S'">已提交打样</span>
  134. <span v-show="scope.row.proofingResultStatus === 'R'">客户已反馈</span>
  135. </span>
  136. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  137. style="width: 100px; height: 80px"/></span>
  138. </div>
  139. <div v-else>
  140. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  141. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  142. style="width: 100px; height: 80px"/></span>
  143. </div>
  144. </template>
  145. </el-table-column>
  146. <el-table-column
  147. fixed="right"
  148. header-align="center"
  149. align="center"
  150. width="100"
  151. label="操作">
  152. <template slot-scope="scope">
  153. <el-link style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
  154. <el-link style="cursor: pointer" v-if="scope.row.proofingResultStatus === 'B'"
  155. @click="updateModalStatus(scope.row,'C')">下达
  156. </el-link>
  157. </template>
  158. </el-table-column>
  159. </el-table>
  160. <selectDiv ref="selectDiv"></selectDiv>
  161. <!-- 分页插件 -->
  162. <el-pagination style="margin-top: 0px"
  163. @size-change="sizeChangeHandle"
  164. @current-change="currentChangeHandle"
  165. :current-page="pageIndex"
  166. :page-sizes="[20, 50, 100, 200, 500]"
  167. :page-size="pageSize"
  168. :total="totalPage"
  169. layout="total, sizes, prev, pager, next, jumper">
  170. </el-pagination>
  171. <!-- 打样模态框 -->
  172. <el-dialog :title="modalData.title" @close="closeModalDiaLog" @open="openModalDialog" :close-on-click-modal="false"
  173. v-drag :visible.sync="modalFlag" top="10vh" width="1200px">
  174. <el-form label-position="top" ref="modalForm" :model="modalData" :rules="rules">
  175. <el-row :gutter="15">
  176. <el-col :span="8">
  177. <el-row :gutter="10">
  178. <el-col :span="10">
  179. <el-form-item prop="customerNo" label="客户编码">
  180. <span style="cursor: pointer" slot="label" v-if="modalData.flag === '1'"
  181. @click="getBaseList(102,1)"><a herf="#">客户编码</a></span>
  182. <el-input :disabled="modalData.flag !== '1' && columnFlagByHeader('customerNo')" v-model="modalData.customerNo" @blur="handleQueryCustomer"></el-input>
  183. </el-form-item>
  184. </el-col>
  185. <el-col :span="14">
  186. <el-form-item label=" ">
  187. <el-input disabled v-model="modalData.customerDesc"></el-input>
  188. </el-form-item>
  189. </el-col>
  190. </el-row>
  191. </el-col>
  192. <el-col :span="4">
  193. <el-form-item label="打样数量" prop="proofingNumber">
  194. <div class="right">
  195. <el-input type="number" class="inlineNumber" :disabled="columnFlagByHeader('proofingNumber')" v-model="modalData.proofingNumber"
  196. @input="modalData.proofingNumber = modalData.proofingNumber.replace(/^(0+)|[^\d]+/g, '')"></el-input>
  197. </div>
  198. </el-form-item>
  199. </el-col>
  200. <el-col :span="4">
  201. <el-form-item label="优先等级">
  202. <dict-data-select v-if="modalFlag" :disabled="columnFlagByHeader('priorityLevel')" v-model="modalData.priorityLevel"
  203. dict-type="priority_Level"></dict-data-select>
  204. </el-form-item>
  205. </el-col>
  206. <el-col :span="4">
  207. <el-form-item label="要求交付日期" prop="requiredDeliveryDate">
  208. <el-date-picker v-model="modalData.requiredDeliveryDate" style="width: 100%" type="date"
  209. value-format="yyyy-MM-dd" placeholder="选择日期" :disabled="columnFlagByHeader('requiredDeliveryDate')"></el-date-picker>
  210. </el-form-item>
  211. </el-col>
  212. </el-row>
  213. <el-row :gutter="15">
  214. <el-col :span="8">
  215. <el-row :gutter="10">
  216. <el-col :span="10">
  217. <el-form-item prop="projectId" label="项目编码">
  218. <span slot="label" v-if="modalData.customerNo && modalData.flag === '1'"
  219. @click="chooseProjectListFlag = true"><a herf="#">项目编码</a></span>
  220. <el-input :disabled="(!modalData.customerNo || modalData.flag !== '1')"
  221. v-model="modalData.projectId" @blur="handleQueryProjectByCustomer"></el-input>
  222. </el-form-item>
  223. </el-col>
  224. <el-col :span="14">
  225. <el-form-item label=" ">
  226. <el-input disabled v-model="modalData.projectName"></el-input>
  227. </el-form-item>
  228. </el-col>
  229. </el-row>
  230. </el-col>
  231. <el-col :span="4">
  232. <el-form-item>
  233. <!-- <el-form-item prop="trackerName">-->
  234. <!-- <span style="cursor: pointer" slot="label" @click="getBaseList(103,1)"><a herf="#">CS</a></span>-->
  235. <label v-if="columnFlagByHeader('tracker')" slot="label">CS</label>
  236. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2051)"><a herf="#">CS</a></span>
  237. <el-input v-model="modalData.trackerName" :disabled="columnFlagByHeader('tracker')" readonly ></el-input>
  238. </el-form-item>
  239. </el-col>
  240. <el-col :span="4">
  241. <el-form-item>
  242. <!-- <el-form-item prop="engineerName">-->
  243. <!-- <span style="cursor: pointer" slot="label" @click="getBaseList(103,2)"><a herf="#">NPI工程师</a></span>-->
  244. <label v-if="columnFlagByHeader('engineer')" slot="label">NPI工程师</label>
  245. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2052)"><a herf="#">NPI工程师</a></span>
  246. <el-input v-model="modalData.engineerName" :disabled="columnFlagByHeader('engineer')" readonly ></el-input>
  247. </el-form-item>
  248. </el-col>
  249. <el-col :span="4">
  250. <el-form-item>
  251. <!-- <span style="cursor: pointer" slot="label" @click="getBaseList(103,2)"><a herf="#">Approver</a></span>-->
  252. <label v-if="columnFlagByHeader('approver')" slot="label">Approver</label>
  253. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2053)"><a herf="#">Approver</a></span>
  254. <el-input v-model="modalData.approverName" :disabled="columnFlagByHeader('approver')" readonly></el-input>
  255. </el-form-item>
  256. </el-col>
  257. <el-col :span="4">
  258. <el-form-item>
  259. <!-- <span style="cursor: pointer" slot="label" @click="getBaseList(103,2)"><a herf="#">Approver</a></span>-->
  260. <label v-if="columnFlagByDelegateAccess('delegateAccess')" slot="label">DelegateAccess</label>
  261. <span v-else style="cursor: pointer" slot="label" @click="delegateAccessVisible = true"><a herf="#">DelegateAccess</a></span>
  262. <el-input v-model="delegateAccessName" :disabled="columnFlagByDelegateAccess('delegateAccess')" readonly></el-input>
  263. </el-form-item>
  264. </el-col>
  265. </el-row>
  266. <el-row :gutter="15">
  267. <el-col :span="24">
  268. <el-form-item label="备注" style="height: 90px">
  269. <el-input type="textarea" v-model="modalData.technicalConsiderations" :rows="3" resize='none'
  270. show-word-limit></el-input>
  271. </el-form-item>
  272. </el-col>
  273. </el-row>
  274. </el-form>
  275. <div class="rq">
  276. <el-form :inline="true" label-position="top" :model="projectPartData">
  277. <el-form-item label="产品编码">
  278. <el-input v-model="projectPartData.testPartNo" clearable style="width: 120px"></el-input>
  279. </el-form-item>
  280. <el-form-item label="产品名称">
  281. <el-input v-model="projectPartData.partName" clearable style="width: 120px"></el-input>
  282. </el-form-item>
  283. <el-form-item label=" " v-if="modalData.projectId">
  284. <el-button type="primary" @click="getProjectPartList()">查询</el-button>
  285. </el-form-item>
  286. </el-form>
  287. <el-table
  288. :height="300"
  289. :data="projectPartList"
  290. ref="projectPartTable"
  291. @row-click="projectPartClickRow"
  292. @selection-change="selectionProjectPart"
  293. :row-key="getRowKeys"
  294. border
  295. v-loading="dataListLoading"
  296. style="width: 100%;">
  297. <el-table-column
  298. type="selection"
  299. header-align="center"
  300. align="center"
  301. :selectable="checkSelectable"
  302. :reserve-selection="true"
  303. width="50">
  304. </el-table-column>
  305. <el-table-column
  306. v-for="(item,index) in projectPartDetailList" :key="index"
  307. :sortable="item.columnSortable"
  308. :prop="item.columnProp"
  309. :header-align="item.headerAlign"
  310. :show-overflow-tooltip="item.showOverflowTooltip"
  311. :align="item.align"
  312. :fixed="item.fixed===''?false:item.fixed"
  313. :min-width="item.columnWidth"
  314. :label="item.columnLabel">
  315. <template slot-scope="scope">
  316. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  317. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  318. </template>
  319. </el-table-column>
  320. </el-table>
  321. </div>
  322. <el-footer style="height:30px;text-align:center;margin-top: 8px">
  323. <el-button type="primary" @click="saveData()">保存</el-button>
  324. <el-button type="primary" @click="modalFlag = false">关闭</el-button>
  325. <el-button v-if="modalData.proofingStatus === '审批中'" type="primary" @click="agreeSubmit">同意</el-button>
  326. <el-button v-if="modalData.proofingStatus === '审批中' && modalData.isReject === 'Y'" type="primary" @click="rejectSubmit">驳回</el-button>
  327. </el-footer>
  328. </el-dialog>
  329. <!-- 录入打样结果模态框 -->
  330. <el-dialog title="录入打样结果" :close-on-click-modal="false" v-drag :visible.sync="enterResultModalFlag"
  331. width="785px">
  332. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules"
  333. style="margin-left: 0px;margin-top: 10px;">
  334. <el-form-item label="实际交付日期" prop="actualityDeliveryDate" :rules="enterResultRules.actualityDeliveryDate">
  335. <el-date-picker v-model="enterResultData.actualityDeliveryDate" type="date" value-format="yyyy-MM-dd"
  336. placeholder="请选择日期" style="width: 200px"></el-date-picker>
  337. </el-form-item>
  338. </el-form>
  339. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules"
  340. style="margin-left:0px;margin-top: 5px;">
  341. <el-form-item label="打样结果信息" prop="proofingResultInformation"
  342. :rules="enterResultRules.proofingResultInformation">
  343. <el-input type="textarea" v-model="enterResultData.proofingResultInformation" :rows="3" resize='none'
  344. show-word-limit style="width: 500px;height: 30px"></el-input>
  345. </el-form-item>
  346. </el-form>
  347. <el-form :inline="true" label-position="top" :model="enterResultData" style="margin-left: 0px;margin-top: 50px;">
  348. <el-form :inline="true" label-position="top" style="margin-top: 5px">
  349. <el-button type="primary" @click="uploadFile()">上传文件</el-button>
  350. </el-form>
  351. <el-table
  352. :height="200"
  353. :data="fileContentList"
  354. border
  355. v-loading="dataListLoading"
  356. style="width: 100%">
  357. <el-table-column
  358. v-for="(item,index) in fileColumnList" :key="index"
  359. :sortable="item.columnSortable"
  360. :prop="item.columnProp"
  361. :header-align="item.headerAlign"
  362. :show-overflow-tooltip="item.showOverflowTooltip"
  363. :align="item.align"
  364. :fixed="item.fixed===''?false:item.fixed"
  365. :min-width="item.columnWidth"
  366. :label="item.columnLabel">
  367. <template slot-scope="scope">
  368. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  369. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  370. </template>
  371. </el-table-column>
  372. <el-table-column
  373. fixed="right"
  374. header-align="center"
  375. align="center"
  376. width="100"
  377. label="操作">
  378. <template slot-scope="scope">
  379. <a @click="deleteFile(scope.row)">删除</a>
  380. </template>
  381. </el-table-column>
  382. </el-table>
  383. </el-form>
  384. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  385. <el-button type="primary" @click="saveProofingResult()">保存</el-button>
  386. <el-button type="primary" @click="enterResultModalFlag = false">关闭</el-button>
  387. </el-footer>
  388. </el-dialog>
  389. <!-- 录入送样信息模态框 -->
  390. <el-dialog title="录入送样信息" :close-on-click-modal="false" v-drag :visible.sync="submitResultModalFlag"
  391. width="620px">
  392. <el-form :inline="true" label-position="top" :model="submitResultData" :rules="submitResultRules"
  393. style="margin-left: 0px;margin-top: 10px;">
  394. <el-form-item label="实际送样日期" prop="actualitySendSamplesDate"
  395. :rules="submitResultRules.actualitySendSamplesDate">
  396. <el-date-picker v-model="submitResultData.actualitySendSamplesDate" type="date" value-format="yyyy-MM-dd"
  397. placeholder="请选择日期" style="width: 200px"></el-date-picker>
  398. </el-form-item>
  399. <el-form-item label="送样方式" prop="sendSamplesMethod" :rules="submitResultRules.sendSamplesMethod">
  400. <el-select v-model="submitResultData.sendSamplesMethod" style="width: 221px">
  401. <el-option label="客户自提" value="客户自提"></el-option>
  402. <el-option label="人员带货" value="人员带货"></el-option>
  403. <el-option label="其它" value="其它"></el-option>
  404. </el-select>
  405. </el-form-item>
  406. <el-form-item label="送货信息">
  407. <el-input v-model="submitResultData.deliverGoodsInformation" style="width: 221px"></el-input>
  408. </el-form-item>
  409. </el-form>
  410. <el-form :inline="true" label-position="top" :model="submitResultData" style="margin-left:0px;margin-top: 5px;">
  411. <el-form-item label="送货备注">
  412. <el-input type="textarea" v-model="submitResultData.deliverGoodsRemark" :rows="3" resize='none'
  413. show-word-limit style="width: 456px;height: 30px"></el-input>
  414. </el-form-item>
  415. </el-form>
  416. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  417. <el-button type="primary" @click="saveSubmitResult()">保存</el-button>
  418. <el-button type="primary" @click="submitResultModalFlag = false">关闭</el-button>
  419. </el-footer>
  420. </el-dialog>
  421. <!-- 客户回复模态框 -->
  422. <el-dialog title="客户回复" :close-on-click-modal="false" v-drag :visible.sync="customerResponseModalFlag"
  423. width="620px">
  424. <el-form :inline="true" label-position="top" :model="customerResponseData" :rules="customerResponseRules"
  425. style="margin-left: 0px;margin-top: 10px;">
  426. <el-form-item label="实际回复日期" prop="actualityReplyDate" :rules="customerResponseRules.actualityReplyDate">
  427. <el-date-picker v-model="customerResponseData.actualityReplyDate" type="date" value-format="yyyy-MM-dd"
  428. placeholder="请选择日期" style="width: 185px"></el-date-picker>
  429. </el-form-item>
  430. <el-form-item label="客户确认结果" prop="confirmResults" :rules="customerResponseRules.confirmResults">
  431. <el-select v-model="customerResponseData.confirmResults" style="width: 185px">
  432. <el-option label="接受" value="接受"></el-option>
  433. <el-option label="不接受" value="不接受"></el-option>
  434. </el-select>
  435. </el-form-item>
  436. <el-form-item label="客户确认人" prop="confirmBy" :rules="customerResponseRules.confirmBy">
  437. <el-input v-model="customerResponseData.confirmBy" style="width: 185px"></el-input>
  438. </el-form-item>
  439. </el-form>
  440. <el-form :inline="true" label-position="top" :model="customerResponseData"
  441. style="margin-left:0px;margin-top: 5px;">
  442. <el-form-item label="客户回复信息">
  443. <el-input type="textarea" v-model="customerResponseData.confirmInformation" :rows="3" resize='none'
  444. show-word-limit style="width: 595px;height: 30px"></el-input>
  445. </el-form-item>
  446. </el-form>
  447. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  448. <el-button type="primary" @click="saveCustomerResponse()">保存</el-button>
  449. <el-button type="primary" @click="customerResponseModalFlag = false">关闭</el-button>
  450. </el-footer>
  451. </el-dialog>
  452. <!--选择项目模态框-->
  453. <el-dialog title="选择-项目" @close="closeProjectInfoDialog" @open="searchProjectInfoList"
  454. :visible.sync="chooseProjectListFlag" width="35%">
  455. <el-form label-position="top" :model="searchProjectData" ref="closeProjectInfoForm">
  456. <el-row :gutter="10">
  457. <el-col :span="6">
  458. <el-form-item label="项目编码">
  459. <el-input v-model="searchProjectData.projectId"></el-input>
  460. </el-form-item>
  461. </el-col>
  462. <el-col :span="6">
  463. <el-form-item label="项目名称">
  464. <el-input v-model="searchProjectData.projectName"></el-input>
  465. </el-form-item>
  466. </el-col>
  467. <el-col :span="6">
  468. <el-form-item label=" ">
  469. <el-button type="primary" @click="searchProjectInfoList">查询</el-button>
  470. </el-form-item>
  471. </el-col>
  472. </el-row>
  473. <el-table :height="223"
  474. :data="projectList"
  475. border
  476. @row-click="projectClickRow">
  477. <el-table-column label="项目编码" prop="projectId"/>
  478. <el-table-column label="项目名称" prop="projectName"/>
  479. </el-table>
  480. </el-form>
  481. </el-dialog>
  482. <!-- 页签 -->
  483. <el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; min-height: 300px;" type="border-card"
  484. @tab-click="tabClick" class="customer-tab">
  485. <el-tab-pane label="基本信息" name="attribute" >
  486. <proofing-attribute ref="dialogAttribute" :order-no="proofingCurrentRow.proofingNo" :code-no="'Proofing'" :function-type="'order'"></proofing-attribute>
  487. </el-tab-pane>
  488. <!-- 打样详细信息页签 -->
  489. <el-tab-pane label="打样详细信息" name="proofing_detail_information" v-if="false">
  490. <el-form :inline="true" label-position="top" :model="proofingDetailData"
  491. style="margin-left: 10px;margin-top: 10px;">
  492. <el-form-item label="备注">
  493. <el-input type="textarea" v-model="proofingDetailData.technicalConsiderations" readonly :rows="3"
  494. resize='none' show-word-limit style="width: 600px;height: 30px"></el-input>
  495. </el-form-item>
  496. </el-form>
  497. <el-form :inline="true" label-position="top" :model="proofingDetailData"
  498. style="margin-left: 10px;margin-top: 46px;">
  499. <el-form-item label="是否需要送样">
  500. <input type="checkbox" v-if="proofingDetailData.isNeedToSendSamples == 'Y'" checked onclick="return false"/>
  501. <input type="checkbox" v-if="proofingDetailData.isNeedToSendSamples != 'Y'" onclick="return false"/>
  502. </el-form-item>
  503. <el-form-item label="送样地址">
  504. <el-input v-model="proofingDetailData.sendSamplesAddress" readonly style="width: 295px"></el-input>
  505. </el-form-item>
  506. </el-form>
  507. <el-form :inline="true" label-position="top" :model="proofingDetailData"
  508. style="margin-left: 10px;margin-top: 46px;">
  509. <el-form-item label="收货人">
  510. <el-input v-model="proofingDetailData.consignee" readonly style="width: 295px"></el-input>
  511. </el-form-item>
  512. <el-form-item label="收货人联系方式">
  513. <el-input v-model="proofingDetailData.consigneeContact" readonly style="width: 295px"></el-input>
  514. </el-form-item>
  515. </el-form>
  516. </el-tab-pane>
  517. <!-- 打样结果页签 -->
  518. <el-tab-pane label="打样结果" name="proofing_result" v-if="false">
  519. <el-form :inline="true" label-position="top" :model="proofingResultData"
  520. style="margin-left: 10px;margin-top: 5px;">
  521. <el-button v-if="proofingResultData.proofingResultStatus === 'C'" type="primary"
  522. @click="proofingResultModal()">录入打样结果
  523. </el-button>
  524. <el-button v-if="proofingResultData.proofingResultStatus === 'E'" type="primary"
  525. @click="submitProofingModal()">录入送样信息
  526. </el-button>
  527. <el-button v-if="proofingResultData.proofingResultStatus === 'S'" type="primary"
  528. @click="customerResponseModal()">客户回复
  529. </el-button>
  530. </el-form>
  531. <el-form :inline="true" label-position="top" :model="proofingResultData"
  532. style="margin-left: 10px;margin-top: 2px;">
  533. <el-form-item label="实际交付日期">
  534. <el-date-picker v-model="proofingResultData.actualityDeliveryDate" readonly type="date"
  535. value-format="yyyy-MM-dd" style="width: 240px"></el-date-picker>
  536. </el-form-item>
  537. <el-form-item label="是否需要送样">
  538. <input type="checkbox" v-if="proofingResultData.isNeedToSendSamples == 'Y'" checked onclick="return false"/>
  539. <input type="checkbox" v-if="proofingResultData.isNeedToSendSamples != 'Y'" onclick="return false"/>
  540. </el-form-item>
  541. <el-form-item label="是否送样">
  542. <input type="checkbox"
  543. v-if="proofingResultData.proofingResultStatus == 'S' || proofingResultData.proofingResultStatus == 'R'"
  544. checked onclick="return false"/>
  545. <input type="checkbox"
  546. v-if="proofingResultData.proofingResultStatus != 'S' && proofingResultData.proofingResultStatus != 'R'"
  547. onclick="return false"/>
  548. </el-form-item>
  549. </el-form>
  550. <el-form :inline="true" label-position="top" :model="proofingResultData"
  551. style="margin-left: 10px;margin-top: -1px;">
  552. <el-form-item label="打样结果信息">
  553. <el-input type="textarea" v-model="proofingResultData.proofingResultInformation" readonly :rows="2"
  554. resize='none' show-word-limit style="width: 760px;height: 20px"></el-input>
  555. </el-form-item>
  556. </el-form>
  557. <el-form :inline="true" label-position="top" :model="proofingResultData"
  558. style="margin-left: 10px;margin-top: 26px;">
  559. <el-form-item label="附件清单">
  560. <el-table
  561. :height="90"
  562. :data="fileContentList"
  563. border
  564. v-loading="dataListLoading"
  565. style="width: 100%">
  566. <el-table-column
  567. v-for="(item,index) in fileColumnList" :key="index"
  568. :sortable="item.columnSortable"
  569. :prop="item.columnProp"
  570. :header-align="item.headerAlign"
  571. :show-overflow-tooltip="item.showOverflowTooltip"
  572. :align="item.align"
  573. :fixed="item.fixed===''?false:item.fixed"
  574. :min-width="item.columnWidth"
  575. :label="item.columnLabel">
  576. <template slot-scope="scope">
  577. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  578. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  579. style="width: 100px; height: 80px"/></span>
  580. </template>
  581. </el-table-column>
  582. <el-table-column
  583. fixed="right"
  584. header-align="center"
  585. align="center"
  586. width="100"
  587. label="操作">
  588. <template slot-scope="scope">
  589. <a @click="downloadFile(scope.row)">下载</a>
  590. </template>
  591. </el-table-column>
  592. </el-table>
  593. </el-form-item>
  594. </el-form>
  595. <el-form :inline="true" label-position="top" :model="proofingResultData"
  596. style="margin-left: 10px;margin-top: 69px;">
  597. <el-form-item label="实际送样日期">
  598. <el-date-picker v-model="proofingResultData.actualitySendSamplesDate" readonly type="date"
  599. value-format="yyyy-MM-dd" style="width: 240px"></el-date-picker>
  600. </el-form-item>
  601. <el-form-item label="送样方式">
  602. <el-input v-model="proofingResultData.sendSamplesMethod" readonly style="width: 240px"></el-input>
  603. </el-form-item>
  604. <el-form-item label="送货信息">
  605. <el-input v-model="proofingResultData.deliverGoodsInformation" readonly style="width: 240px"></el-input>
  606. </el-form-item>
  607. </el-form>
  608. <el-form :inline="true" label-position="top" :model="proofingResultData"
  609. style="margin-left: 10px;margin-top: -2px;">
  610. <el-form-item label="送货备注">
  611. <el-input type="textarea" v-model="proofingResultData.deliverGoodsRemark" readonly :rows="2" resize='none'
  612. show-word-limit style="width: 760px;height: 20px"></el-input>
  613. </el-form-item>
  614. </el-form>
  615. <el-form :inline="true" label-position="top" :model="proofingResultData"
  616. style="margin-left: 10px;margin-top: 26px;">
  617. <el-form-item label="客户是否回复">
  618. <input type="checkbox" v-if="proofingResultData.proofingResultStatus == 'R'" checked
  619. onclick="return false"/>
  620. <input type="checkbox" v-if="proofingResultData.proofingResultStatus != 'R'" onclick="return false"/>
  621. </el-form-item>
  622. <el-form-item label="客户确认结果">
  623. <el-input v-model="proofingResultData.confirmResults" readonly style="width: 205px"></el-input>
  624. </el-form-item>
  625. <el-form-item label="实际回复日期">
  626. <el-date-picker v-model="proofingResultData.actualityReplyDate" readonly type="date"
  627. value-format="yyyy-MM-dd" style="width: 240px"></el-date-picker>
  628. </el-form-item>
  629. <el-form-item label="客户确认人">
  630. <el-input v-model="proofingResultData.confirmBy" readonly style="width: 205px"></el-input>
  631. </el-form-item>
  632. </el-form>
  633. <el-form :inline="true" label-position="top" :model="proofingResultData"
  634. style="margin-left: 10px;margin-top: -2px;">
  635. <el-form-item label="客户回复信息">
  636. <el-input type="textarea" v-model="proofingResultData.confirmInformation" readonly :rows="2" resize='none'
  637. show-word-limit style="width: 760px;height: 20px"></el-input>
  638. </el-form-item>
  639. </el-form>
  640. </el-tab-pane>
  641. <!-- 项目信息页签 -->
  642. <el-tab-pane label="项目信息" name="project_information">
  643. <el-form label-position="top" :model="projectInformationData" style="margin-left: 10px;margin-top: 5px;margin-right: 10px">
  644. <el-row :gutter="20">
  645. <el-col :span="8">
  646. <div class="grid-content bg-purple">
  647. <el-form-item label="项目号">
  648. <el-input v-model="projectInformationData.projectId" readonly></el-input>
  649. </el-form-item>
  650. </div>
  651. </el-col>
  652. <el-col :span="8">
  653. <div class="grid-content bg-purple">
  654. <el-form-item label="项目名称">
  655. <el-input v-model="projectInformationData.projectName" readonly></el-input>
  656. </el-form-item>
  657. </div>
  658. </el-col>
  659. <el-col :span="8">
  660. <div class="grid-content bg-purple">
  661. <el-form-item label="项目类型">
  662. <el-input v-model="projectInformationData.projectType" readonly></el-input>
  663. </el-form-item>
  664. </div>
  665. </el-col>
  666. </el-row>
  667. <el-row :gutter="20">
  668. <el-col :span="8">
  669. <div class="grid-content bg-purple">
  670. <el-form-item label="客户来源">
  671. <el-input v-model="projectInformationData.projectSourceDesc" readonly></el-input>
  672. </el-form-item>
  673. </div>
  674. </el-col>
  675. <el-col :span="8">
  676. <div class="grid-content bg-purple">
  677. <el-form-item label="优先级">
  678. <el-input v-model="projectInformationData.priorityDesc" readonly></el-input>
  679. </el-form-item>
  680. </div>
  681. </el-col>
  682. <el-col :span="8">
  683. <div class="grid-content bg-purple">
  684. <el-form-item label="项目状态">
  685. <el-input v-model="projectInformationData.status" readonly></el-input>
  686. </el-form-item>
  687. </div>
  688. </el-col>
  689. </el-row>
  690. <el-row :gutter="20">
  691. <el-col :span="8">
  692. <div class="grid-content bg-purple">
  693. <el-form-item label="项目经理">
  694. <el-input v-model="projectInformationData.projectManagerName" readonly></el-input>
  695. </el-form-item>
  696. </div>
  697. </el-col>
  698. <el-col :span="8">
  699. <div class="grid-content bg-purple">
  700. <el-form-item label="项目负责人">
  701. <el-input v-model="projectInformationData.projectOwnerName" readonly></el-input>
  702. </el-form-item>
  703. </div>
  704. </el-col>
  705. <el-col :span="8">
  706. <div class="grid-content bg-purple">
  707. <el-form-item label="项目权限">
  708. <el-input v-model="projectInformationData.userRoleName" readonly></el-input>
  709. </el-form-item>
  710. </div>
  711. </el-col>
  712. </el-row>
  713. <el-row :gutter="20">
  714. <el-col :span="6">
  715. <div class="grid-content bg-purple">
  716. <el-form-item label="创建时间">
  717. <el-input v-model="projectInformationData.createDate" readonly></el-input>
  718. </el-form-item>
  719. </div>
  720. </el-col>
  721. <el-col :span="6">
  722. <div class="grid-content bg-purple">
  723. <el-form-item label="创建人">
  724. <el-input v-model="projectInformationData.createBy" readonly></el-input>
  725. </el-form-item>
  726. </div>
  727. </el-col>
  728. <el-col :span="6">
  729. <div class="grid-content bg-purple">
  730. <el-form-item label="更新时间">
  731. <el-input v-model="projectInformationData.updateDate" readonly></el-input>
  732. </el-form-item>
  733. </div>
  734. </el-col>
  735. <el-col :span="6">
  736. <div class="grid-content bg-purple">
  737. <el-form-item label="更新人">
  738. <el-input v-model="projectInformationData.updateBy" readonly></el-input>
  739. </el-form-item>
  740. </div>
  741. </el-col>
  742. </el-row>
  743. <el-row :gutter="20">
  744. <el-col :span="24">
  745. <div class="grid-content bg-purple">
  746. <el-form-item label="项目描述">
  747. <el-input v-model="projectInformationData.projectDesc" readonly></el-input>
  748. </el-form-item>
  749. </div>
  750. </el-col>
  751. </el-row>
  752. <el-row :gutter="20">
  753. <el-col :span="24">
  754. <div class="grid-content bg-purple">
  755. <el-form-item label="其它特殊要求">
  756. <el-input v-model="projectInformationData.remark" readonly></el-input>
  757. </el-form-item>
  758. </div>
  759. </el-col>
  760. </el-row>
  761. </el-form>
  762. </el-tab-pane>
  763. <!-- 客户信息页签 -->
  764. <el-tab-pane label="客户信息" name="customer_information">
  765. <el-form label-position="top" :model="customerInformationData"
  766. style="margin-left: 10px;margin-top: 5px;margin-right: 10px">
  767. <el-row :gutter="20">
  768. <el-col :span="8">
  769. <div class="grid-content bg-purple">
  770. <el-form-item label="客户代码">
  771. <el-input v-model="customerInformationData.customerNo" readonly></el-input>
  772. </el-form-item>
  773. </div>
  774. </el-col>
  775. <el-col :span="8">
  776. <div class="grid-content bg-purple">
  777. <el-form-item label="客户名称">
  778. <el-input v-model="customerInformationData.customerDesc" readonly></el-input>
  779. </el-form-item>
  780. </div>
  781. </el-col>
  782. <el-col :span="8">
  783. <div class="grid-content bg-purple">
  784. <el-form-item label="重要程度">
  785. <el-input v-model="customerInformationData.importantCustomer" readonly></el-input>
  786. </el-form-item>
  787. </div>
  788. </el-col>
  789. </el-row>
  790. <el-row :gutter="20">
  791. <el-col :span="8">
  792. <div class="grid-content bg-purple">
  793. <el-form-item label="客户币种">
  794. <el-input v-model="customerInformationData.customerCurrency" readonly></el-input>
  795. </el-form-item>
  796. </div>
  797. </el-col>
  798. <el-col :span="8">
  799. <div class="grid-content bg-purple">
  800. <el-form-item label="年营业额">
  801. <el-input v-model="customerInformationData.turnoverOfYear" readonly></el-input>
  802. </el-form-item>
  803. </div>
  804. </el-col>
  805. <el-col :span="8">
  806. <div class="grid-content bg-purple">
  807. <el-form-item label="年潜在投入">
  808. <el-input v-model="customerInformationData.potentialRevenueOfYear" readonly></el-input>
  809. </el-form-item>
  810. </div>
  811. </el-col>
  812. </el-row>
  813. <el-row :gutter="20">
  814. <el-col :span="8">
  815. <div class="grid-content bg-purple">
  816. <el-form-item label="客户状态">
  817. <el-input v-model="customerInformationData.customerStatus" readonly></el-input>
  818. </el-form-item>
  819. </div>
  820. </el-col>
  821. <el-col :span="8">
  822. <div class="grid-content bg-purple">
  823. <el-form-item label="行业">
  824. <el-input v-model="customerInformationData.customerIndustry" readonly></el-input>
  825. </el-form-item>
  826. </div>
  827. </el-col>
  828. <el-col :span="8">
  829. <div class="grid-content bg-purple">
  830. <el-form-item label="公司名称">
  831. <el-input v-model="customerInformationData.companyName" readonly></el-input>
  832. </el-form-item>
  833. </div>
  834. </el-col>
  835. </el-row>
  836. <el-row :gutter="20">
  837. <el-col :span="8">
  838. <div class="grid-content bg-purple">
  839. <el-form-item label="客户联系人">
  840. <el-input v-model="customerInformationData.contactName" readonly></el-input>
  841. </el-form-item>
  842. </div>
  843. </el-col>
  844. <el-col :span="8">
  845. <div class="grid-content bg-purple">
  846. <el-form-item label="联系人电话">
  847. <el-input v-model="customerInformationData.contactPhoneNumber1" readonly></el-input>
  848. </el-form-item>
  849. </div>
  850. </el-col>
  851. <el-col :span="8">
  852. <div class="grid-content bg-purple">
  853. <el-form-item label="联系人职务">
  854. <el-input v-model="customerInformationData.position" readonly></el-input>
  855. </el-form-item>
  856. </div>
  857. </el-col>
  858. </el-row>
  859. <el-row :gutter="20">
  860. <el-col :span="12">
  861. <div class="grid-content bg-purple">
  862. <el-form-item label="客户描述">
  863. <el-input v-model="customerInformationData.customerDescription" readonly></el-input>
  864. </el-form-item>
  865. </div>
  866. </el-col>
  867. </el-row>
  868. <el-row :gutter="20">
  869. <el-col :span="12">
  870. <div class="grid-content bg-purple">
  871. <el-form-item label="客户联系地址">
  872. <el-input v-model="customerInformationData.addressName" readonly></el-input>
  873. </el-form-item>
  874. </div>
  875. </el-col>
  876. <el-col :span="12">
  877. <div class="grid-content bg-purple">
  878. <el-form-item label="地址类型">
  879. <el-input v-model="customerInformationData.addressType" readonly></el-input>
  880. </el-form-item>
  881. </div>
  882. </el-col>
  883. </el-row>
  884. <el-row :gutter="20">
  885. <el-col :span="6">
  886. <div class="grid-content bg-purple">
  887. <el-form-item label="创建时间">
  888. <el-input v-model="customerInformationData.createDate" readonly></el-input>
  889. </el-form-item>
  890. </div>
  891. </el-col>
  892. <el-col :span="6">
  893. <div class="grid-content bg-purple">
  894. <el-form-item label="创建人">
  895. <el-input v-model="customerInformationData.createBy" readonly></el-input>
  896. </el-form-item>
  897. </div>
  898. </el-col>
  899. <el-col :span="6">
  900. <div class="grid-content bg-purple">
  901. <el-form-item label="更新时间">
  902. <el-input v-model="customerInformationData.updateDate" readonly></el-input>
  903. </el-form-item>
  904. </div>
  905. </el-col>
  906. <el-col :span="6">
  907. <div class="grid-content bg-purple">
  908. <el-form-item label="更新人">
  909. <el-input v-model="customerInformationData.updateBy" readonly></el-input>
  910. </el-form-item>
  911. </div>
  912. </el-col>
  913. </el-row>
  914. </el-form>
  915. </el-tab-pane>
  916. <el-tab-pane label="附件" name="proofing_file">
  917. <profing-file ref="profingFile" :test-no="proofingCurrentRow.proofingNo" ></profing-file>
  918. </el-tab-pane>
  919. </el-tabs>
  920. <!-- chooseList模态框 -->
  921. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  922. <!-- 客户地址 -->
  923. <el-dialog title="联系地址清单" :close-on-click-modal="false" v-drag :visible.sync="addressModelFlag" width="520px">
  924. <el-table
  925. :height="300"
  926. :data="addressList"
  927. @row-dblclick="getAddressData"
  928. border
  929. style="width: 100%;">
  930. <el-table-column
  931. v-for="(item,index) in columnAddressList" :key="index"
  932. :sortable="item.columnSortable"
  933. :prop="item.columnProp"
  934. :header-align="item.headerAlign"
  935. :show-overflow-tooltip="item.showOverflowTooltip"
  936. :align="item.align"
  937. :fixed="item.fixed==''?false:item.fixed"
  938. :min-width="item.columnWidth"
  939. :label="item.columnLabel">
  940. <template slot-scope="scope">
  941. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  942. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  943. style="width: 100px; height: 80px"/></span>
  944. </template>
  945. </el-table-column>
  946. </el-table>
  947. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  948. <el-button type="primary" @click="addressModelFlag=false">关闭</el-button>
  949. </el-footer>
  950. </el-dialog>
  951. <!-- 联系人 -->
  952. <el-dialog title="收货人清单" :close-on-click-modal="false" v-drag :visible.sync="contactModelFlag" width="520px">
  953. <el-table
  954. :height="300"
  955. :data="contactList"
  956. @row-dblclick="getContactData"
  957. border
  958. style="width: 100%;">
  959. <el-table-column
  960. v-for="(item,index) in columnContactList" :key="index"
  961. :sortable="item.columnSortable"
  962. :prop="item.columnProp"
  963. :header-align="item.headerAlign"
  964. :show-overflow-tooltip="item.showOverflowTooltip"
  965. :align="item.align"
  966. :fixed="item.fixed==''?false:item.fixed"
  967. :min-width="item.columnWidth"
  968. :label="item.columnLabel">
  969. <template slot-scope="scope">
  970. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  971. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  972. style="width: 100px; height: 80px"/></span>
  973. </template>
  974. </el-table-column>
  975. </el-table>
  976. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  977. <el-button type="primary" @click="contactModelFlag=false">关闭</el-button>
  978. </el-footer>
  979. </el-dialog>
  980. <el-dialog title="人员选择" @open="openDelegateAccess" @close="closeDelegateAccess" v-drag
  981. :visible.sync="delegateAccessVisible" width="40vw">
  982. <el-form :inline="true" label-position="top" :model="proofingDelegateAccess">
  983. <el-form-item label="编码">
  984. <el-input v-model="proofingDelegateAccess.delegateAccess" clearable style="width: 120px"></el-input>
  985. </el-form-item>
  986. <el-form-item label="名称">
  987. <el-input v-model="proofingDelegateAccess.delegateAccessName" clearable style="width: 120px"></el-input>
  988. </el-form-item>
  989. <el-form-item label=" ">
  990. <el-button type="primary" @click="searchDelegateAccessByUser()">查询</el-button>
  991. </el-form-item>
  992. </el-form>
  993. <el-table v-if="delegateAccessVisible"
  994. :height="300"
  995. :data="baseDelegateAccessList"
  996. @selection-change="handleSelectionChange"
  997. @row-click="(row,column, event)=>handleTableClick(row,column, event,'delegateAccesstTable')"
  998. ref="delegateAccesstTable"
  999. border
  1000. style="width: 100%;">
  1001. <el-table-column
  1002. type="selection"
  1003. header-align="center"
  1004. align="center"
  1005. width="50">
  1006. </el-table-column>
  1007. <el-table-column label="编码" property="delegateAccess" align="left" header-align="center"/>
  1008. <el-table-column label="名称" property="delegateAccessName" align="left" header-align="center"/>
  1009. </el-table>
  1010. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  1011. <el-button type="primary" @click="confirmDelegateAccess">确定</el-button>
  1012. <el-button type="primary" @click="delegateAccessVisible=false">关闭</el-button>
  1013. </el-footer>
  1014. </el-dialog>
  1015. <!-- 上传文件的modal -->
  1016. <proofingUploadFile ref="proofingUploadFile" @refreshPageTables="getFileContentData()" v-drag></proofingUploadFile>
  1017. </div>
  1018. </template>
  1019. <script>
  1020. import {
  1021. proofingInformationSearch, // 打样信息列表查询
  1022. proofingInformationSave, // 打样信息新增
  1023. proofingInformationEdit, // 打样信息编辑
  1024. proofingInformationDelete, // 打样信息删除
  1025. getFileContentList, // 获取打样单附件列表
  1026. proofingResultSearch, // 获取打样结果对象
  1027. deleteProofingFile, // 文件删除
  1028. saveProofingResult, // 保存打样结果
  1029. saveSubmitResult, // 保存送样结果
  1030. saveCustomerResponse, // 保存客户回复
  1031. getProjectPartList, // 获取产品列表
  1032. getProjectInformation, // 获取项目信息
  1033. getCustomerInformation, // 获取客户信息
  1034. } from '@/api/proofing/proofingInformation.js'
  1035. import {
  1036. downLoadQuotationFile, // 文件下载
  1037. searchProjectInfoList,
  1038. } from '@/api/quotation/quotationInformation.js'
  1039. import {
  1040. customerAddressSearch, // 客户联系地址列表查询
  1041. } from '@/api/customer/customerAddress.js'
  1042. import {
  1043. customerContactSearch, // 客户联系人列表查询
  1044. } from '@/api/customer/customerContact.js'
  1045. import Chooselist from '@/views/modules/common/Chooselist'
  1046. import proofingUploadFile from "./proofing_upload_file"
  1047. import DictDataSelect from "../sys/dict-data-select.vue";
  1048. import {
  1049. proofingInformationEditStatus,
  1050. searchDelegateAccess,
  1051. searchDelegateAccessByUser, submitChange
  1052. } from "../../../api/proofing/proofingInformation";
  1053. import {getNodeAuthority} from "../../../api/changeManagement/changeManagement";
  1054. import ProjectInfo from "../quotation/sellForQuotation/projectInfo.vue";
  1055. import profingFile from "./profingFile"
  1056. import proofingAttribute from "../demoComponents/orderProperties"
  1057. import {queryCustomer} from "../../../api/customer/customerInformation";
  1058. import {queryProjectByCustomer} from "../../../api/project/project";
  1059. export default {
  1060. components: {
  1061. ProjectInfo
  1062. ,DictDataSelect
  1063. ,Chooselist
  1064. ,proofingUploadFile
  1065. ,profingFile
  1066. ,proofingAttribute
  1067. },
  1068. watch: {
  1069. searchData: {
  1070. deep: true,
  1071. handler: function (newV, oldV) {
  1072. this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
  1073. this.searchData.projectId = this.searchData.projectId.toUpperCase()
  1074. }
  1075. },
  1076. 'modalData.proofingNo'(newV, oldV) {
  1077. if (newV) {
  1078. this.modalData.proofingNo = newV.toUpperCase()
  1079. }
  1080. },
  1081. 'modalData.customerNo'(newV, oldV) {
  1082. if (newV) {
  1083. this.modalData.customerNo = newV.toUpperCase()
  1084. }
  1085. if (oldV) {
  1086. if (!newV) {
  1087. this.modalData.customerDesc = ''
  1088. }
  1089. this.modalData.projectId = ''
  1090. this.modalData.consignee = ''
  1091. this.modalData.consigneeContact = ''
  1092. this.modalData.sendSamplesAddress = ''
  1093. }
  1094. },
  1095. 'modalData.projectId'(newV, oldV) {
  1096. if (newV) {
  1097. this.modalData.projectId = newV.toUpperCase()
  1098. }
  1099. if (oldV) {
  1100. if (!newV) {
  1101. this.modalData.projectName = ''
  1102. }
  1103. this.modalData.testPartNo = ''
  1104. this.modalData.partName = ''
  1105. this.projectPartListSelections = [];
  1106. this.projectPartList = [];
  1107. this.$refs.projectPartTable.clearSelection();
  1108. }
  1109. },
  1110. },
  1111. computed: {
  1112. delegateAccessName: {
  1113. get() {
  1114. return this.selectionDelegateAccess.map(item => item.delegateAccessName).join(';')
  1115. },
  1116. set(val) {
  1117. }
  1118. },
  1119. columnFlagByHeader() {
  1120. return (value) => {
  1121. if (this.modalData.flag === '1'){
  1122. return false
  1123. }
  1124. if (!this.columnFieldList1){
  1125. return true
  1126. }
  1127. let arr = this.columnFieldList1.filter(a => a.fieldId === value)
  1128. if (arr.length > 0) {
  1129. return arr[0].updateFlag === 'N'
  1130. }
  1131. return true
  1132. }
  1133. },
  1134. columnFlagByDelegateAccess() {
  1135. return (value) => {
  1136. if (this.modalData.flag === '1'){
  1137. return false
  1138. }
  1139. if (!this.columnFieldList2){
  1140. return true
  1141. }
  1142. let arr = this.columnFieldList2.filter(a => a.fieldId === value)
  1143. if (arr.length > 0) {
  1144. return arr[0].updateFlag === 'N'
  1145. }
  1146. return true
  1147. }
  1148. },
  1149. },
  1150. data() {
  1151. return {
  1152. selectionDelegateAccess: [],
  1153. selectionDelegateAccess2: [],
  1154. delegateAccessVisible: false,
  1155. baseDelegateAccessList: [],
  1156. proofingDelegateAccess: {
  1157. delegateAccess: '',
  1158. delegateAccessName: '',
  1159. },
  1160. activeName: 'part',
  1161. // 导出
  1162. exportData: [],
  1163. exportName: '设备分类' + this.dayjs().format('YYYYMMDDHHmmss'),
  1164. exportHeader: ['设备分类'],
  1165. exportFooter: [],
  1166. resultList: [],
  1167. // ======== 行高 ========
  1168. height: 300,
  1169. secondHeight: 200,
  1170. // ======== 分页 ========
  1171. pageIndex: 1,
  1172. pageSize: 50,
  1173. totalPage: 0,
  1174. selectedDataNum: 0,
  1175. // 条件查询
  1176. searchData: {
  1177. site: this.$store.state.user.site,
  1178. customerNo: '',
  1179. customerDesc: '',
  1180. trackerName: '',
  1181. testPartNo: '',
  1182. partName: '',
  1183. proofingStatus: '',
  1184. proofingResultStatus: '',
  1185. startDate: '',
  1186. endDate: '',
  1187. projectId: '',
  1188. projectName: '',
  1189. engineerName: '',
  1190. priorityLevel: '',
  1191. proofingNo: '',
  1192. page: 1,
  1193. limit: 10,
  1194. menuId: this.$route.meta.menuId,
  1195. },
  1196. // 其它
  1197. dataListLoading: false,
  1198. // 初始页签
  1199. activeTable: 'attribute',
  1200. // ======== 数据对象 ========
  1201. modalData: {
  1202. flag: '1',
  1203. title: '打样新增',
  1204. site: this.$store.state.user.site,
  1205. proofingNo: '',
  1206. customerNo: '',
  1207. customerDesc: '',
  1208. projectId: '',
  1209. projectName: '',
  1210. tracker: '',
  1211. trackerName: '',
  1212. testPartNo: '',
  1213. partName: '',
  1214. engineer: '',
  1215. engineerName: '',
  1216. approver: '',
  1217. approverName: '',
  1218. priorityLevel: '',
  1219. proofingNumber: 1,
  1220. requiredDeliveryDate: '',
  1221. remark: '',
  1222. technicalConsiderations: '',
  1223. isNeedToSendSamples: '',
  1224. sendSamplesAddress: '',
  1225. consignee: '',
  1226. consigneeContact: '',
  1227. actualityDeliveryDate: '',
  1228. proofingResultInformation: '',
  1229. actualitySendSamplesDate: '',
  1230. sendSamplesMethod: '',
  1231. deliverGoodsInformation: '',
  1232. deliverGoodsRemark: '',
  1233. actualityReplyDate: '',
  1234. confirmResults: '',
  1235. confirmBy: '',
  1236. confirmInformation: '',
  1237. proofingStatus: '草稿',
  1238. proofingResultStatus: 'B',
  1239. nextToDo: '',
  1240. createDate: '',
  1241. createBy: '',
  1242. updateDate: '',
  1243. updateBy: '',
  1244. nodeConclusion: '',
  1245. stepId: '',
  1246. rejectFlag: '',
  1247. rejectStepId: '',
  1248. isReject: ''
  1249. },
  1250. proofingDetailData: {
  1251. technicalConsiderations: '',
  1252. isNeedToSendSamples: '',
  1253. sendSamplesAddress: '',
  1254. consignee: '',
  1255. consigneeContact: ''
  1256. },
  1257. proofingResultData: {
  1258. proofingResultStatus: '',
  1259. actualityDeliveryDate: '',
  1260. isNeedToSendSamples: '',
  1261. proofingResultInformation: '',
  1262. actualitySendSamplesDate: '',
  1263. sendSamplesMethod: '',
  1264. deliverGoodsInformation: '',
  1265. deliverGoodsRemark: '',
  1266. confirmResults: '',
  1267. actualityReplyDate: '',
  1268. confirmBy: '',
  1269. confirmInformation: ''
  1270. },
  1271. enterResultData: {
  1272. site: this.$store.state.user.site,
  1273. proofingNo: '',
  1274. actualityDeliveryDate: '',
  1275. proofingResultInformation: '',
  1276. updateBy: this.$store.state.user.name,
  1277. proofingResultStatus: '',
  1278. fileContentList: []
  1279. },
  1280. submitResultData: {
  1281. site: this.$store.state.user.site,
  1282. proofingNo: '',
  1283. actualitySendSamplesDate: '',
  1284. sendSamplesMethod: '',
  1285. deliverGoodsInformation: '',
  1286. deliverGoodsRemark: '',
  1287. updateBy: this.$store.state.user.name,
  1288. proofingResultStatus: ''
  1289. },
  1290. customerResponseData: {
  1291. site: this.$store.state.user.site,
  1292. proofingNo: '',
  1293. actualityReplyDate: '',
  1294. confirmResults: '',
  1295. confirmBy: '',
  1296. confirmInformation: '',
  1297. updateBy: this.$store.state.user.name,
  1298. proofingResultStatus: ''
  1299. },
  1300. projectPartData: {
  1301. site: this.$store.state.user.site,
  1302. testPartNo: '',
  1303. partName: ''
  1304. },
  1305. projectInformationData: {
  1306. projectId: '',
  1307. projectName: '',
  1308. projectType: '',
  1309. projectSourceDesc: '',
  1310. priorityDesc: '',
  1311. status: '',
  1312. projectDesc: '',
  1313. projectManagerName: '',
  1314. projectOwnerName: '',
  1315. userRoleName: '',
  1316. remark: ''
  1317. },
  1318. customerInformationData: {
  1319. customerNo: '',
  1320. customerDesc: '',
  1321. importantCustomer: '',
  1322. customerCurrency: '',
  1323. turnoverOfYear: '',
  1324. potentialRevenueOfYear: '',
  1325. customerStatus: '',
  1326. customerIndustry: '',
  1327. companyName: '',
  1328. jobDescription: '',
  1329. customerDescription: '',
  1330. contactName: '',
  1331. contactPhoneNumber1: '',
  1332. position: '',
  1333. addressName: '',
  1334. addressType: '',
  1335. createDate: '',
  1336. createBy: '',
  1337. updateDate: '',
  1338. updateBy: ''
  1339. },
  1340. // ======== 数据列表 ========
  1341. dataList: [],
  1342. fileContentList: [],
  1343. projectPartList: [],
  1344. addressList: [],
  1345. contactList: [],
  1346. // ======== 列表表头 ========
  1347. columnList: [
  1348. {
  1349. userId: this.$store.state.user.name,
  1350. functionId: 103001,
  1351. serialNumber: '103001Table1ProofingNo',
  1352. tableId: '103001Table1',
  1353. tableName: '打样信息表',
  1354. columnProp: 'proofingNo',
  1355. headerAlign: 'center',
  1356. align: 'center',
  1357. columnLabel: '打样单号',
  1358. columnHidden: false,
  1359. columnImage: false,
  1360. columnSortable: false,
  1361. sortLv: 0,
  1362. status: true,
  1363. fixed: '',
  1364. columnWidth: 120
  1365. },
  1366. {
  1367. userId: this.$store.state.user.name,
  1368. functionId: 103001,
  1369. serialNumber: '103001Table1CustomerNo',
  1370. tableId: '103001Table1',
  1371. tableName: '打样信息表',
  1372. columnProp: 'customerNo',
  1373. headerAlign: 'center',
  1374. align: 'center',
  1375. columnLabel: '客户编码',
  1376. columnHidden: false,
  1377. columnImage: false,
  1378. columnSortable: false,
  1379. sortLv: 0,
  1380. status: true,
  1381. fixed: '',
  1382. columnWidth: 100
  1383. },
  1384. {
  1385. userId: this.$store.state.user.name,
  1386. functionId: 103001,
  1387. serialNumber: '103001Table1CustomerDesc',
  1388. tableId: '103001Table1',
  1389. tableName: '打样信息表',
  1390. columnProp: 'customerDesc',
  1391. headerAlign: 'center',
  1392. align: 'left',
  1393. columnLabel: '客户名称',
  1394. columnHidden: false,
  1395. columnImage: false,
  1396. columnSortable: false,
  1397. sortLv: 0,
  1398. status: true,
  1399. fixed: '',
  1400. columnWidth: 120
  1401. },
  1402. {
  1403. userId: this.$store.state.user.name,
  1404. functionId: 103001,
  1405. serialNumber: '103001Table1ProjectId',
  1406. tableId: '103001Table1',
  1407. tableName: '打样信息表',
  1408. columnProp: 'projectId',
  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: 110
  1419. },
  1420. {
  1421. userId: this.$store.state.user.name,
  1422. functionId: 103001,
  1423. serialNumber: '103001Table1ProjectName',
  1424. tableId: '103001Table1',
  1425. tableName: '打样信息表',
  1426. columnProp: 'projectName',
  1427. headerAlign: 'center',
  1428. align: 'left',
  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: '103001Table1TrackerName',
  1442. tableId: '103001Table1',
  1443. tableName: '打样信息表',
  1444. columnProp: 'trackerName',
  1445. headerAlign: 'center',
  1446. align: 'center',
  1447. columnLabel: 'CS',
  1448. columnHidden: false,
  1449. columnImage: false,
  1450. columnSortable: false,
  1451. sortLv: 0,
  1452. status: true,
  1453. fixed: '',
  1454. columnWidth: 80
  1455. },
  1456. {
  1457. userId: this.$store.state.user.name,
  1458. functionId: 103001,
  1459. serialNumber: '103001Table1EngineerName',
  1460. tableId: '103001Table1',
  1461. tableName: '打样信息表',
  1462. columnProp: 'engineerName',
  1463. headerAlign: 'center',
  1464. align: 'center',
  1465. columnLabel: 'NPI工程师',
  1466. columnHidden: false,
  1467. columnImage: false,
  1468. columnSortable: false,
  1469. sortLv: 0,
  1470. status: true,
  1471. fixed: '',
  1472. columnWidth: 80
  1473. },
  1474. {
  1475. userId: this.$store.state.user.name,
  1476. functionId: 103001,
  1477. serialNumber: '103001Table1EngineerName',
  1478. tableId: '103001Table1',
  1479. tableName: '打样信息表',
  1480. columnProp: 'approverName',
  1481. headerAlign: 'center',
  1482. align: 'center',
  1483. columnLabel: 'Approver',
  1484. columnHidden: false,
  1485. columnImage: false,
  1486. columnSortable: false,
  1487. sortLv: 0,
  1488. status: true,
  1489. fixed: '',
  1490. columnWidth: 80
  1491. },
  1492. {
  1493. userId: this.$store.state.user.name,
  1494. functionId: 103001,
  1495. serialNumber: '103001Table1TestPartNo',
  1496. tableId: '103001Table1',
  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: '103001Table1PartName',
  1514. tableId: '103001Table1',
  1515. tableName: '打样信息表',
  1516. columnProp: 'partName',
  1517. headerAlign: 'center',
  1518. align: 'left',
  1519. columnLabel: '物料名称',
  1520. columnHidden: false,
  1521. columnImage: false,
  1522. columnSortable: false,
  1523. sortLv: 0,
  1524. status: true,
  1525. fixed: '',
  1526. columnWidth: 100
  1527. },
  1528. {
  1529. userId: this.$store.state.user.name,
  1530. functionId: 103001,
  1531. serialNumber: '103001Table1PriorityLevel',
  1532. tableId: '103001Table1',
  1533. tableName: '打样信息表',
  1534. columnProp: 'priorityLevel',
  1535. headerAlign: 'center',
  1536. align: 'center',
  1537. columnLabel: '优先等级',
  1538. columnHidden: false,
  1539. columnImage: false,
  1540. columnSortable: false,
  1541. sortLv: 0,
  1542. status: true,
  1543. fixed: '',
  1544. columnWidth: 80
  1545. },
  1546. {
  1547. userId: this.$store.state.user.name,
  1548. functionId: 103001,
  1549. serialNumber: '103001Table1ProofingNumber',
  1550. tableId: '103001Table1',
  1551. tableName: '打样信息表',
  1552. columnProp: 'proofingNumber',
  1553. headerAlign: 'center',
  1554. align: 'right',
  1555. columnLabel: '打样数量',
  1556. columnHidden: false,
  1557. columnImage: false,
  1558. columnSortable: false,
  1559. sortLv: 0,
  1560. status: true,
  1561. fixed: '',
  1562. columnWidth: 80
  1563. },
  1564. {
  1565. userId: this.$store.state.user.name,
  1566. functionId: 103001,
  1567. serialNumber: '103001Table1RequiredDeliveryDate',
  1568. tableId: '103001Table1',
  1569. tableName: '打样信息表',
  1570. columnProp: 'requiredDeliveryDate',
  1571. headerAlign: 'center',
  1572. align: 'center',
  1573. columnLabel: '要求交付日期',
  1574. columnHidden: false,
  1575. columnImage: false,
  1576. columnSortable: false,
  1577. sortLv: 0,
  1578. status: true,
  1579. fixed: '',
  1580. columnWidth: 160
  1581. },
  1582. {
  1583. userId: this.$store.state.user.name,
  1584. functionId: 103001,
  1585. serialNumber: '103001Table1ProofingStatus',
  1586. tableId: '103001Table1',
  1587. tableName: '打样信息表',
  1588. columnProp: 'proofingStatus',
  1589. headerAlign: 'center',
  1590. align: 'left',
  1591. columnLabel: '状态',
  1592. columnHidden: false,
  1593. columnImage: false,
  1594. columnSortable: false,
  1595. sortLv: 0,
  1596. status: true,
  1597. fixed: '',
  1598. columnWidth: 80
  1599. },
  1600. {
  1601. userId: this.$store.state.user.name,
  1602. functionId: 103001,
  1603. serialNumber: '103001Table1NodeName',
  1604. tableId: '103001Table1',
  1605. tableName: '打样信息表',
  1606. columnProp: 'nodeName',
  1607. headerAlign: 'center',
  1608. align: 'left',
  1609. columnLabel: '当前节点',
  1610. columnHidden: false,
  1611. columnImage: false,
  1612. columnSortable: false,
  1613. sortLv: 0,
  1614. status: true,
  1615. fixed: '',
  1616. columnWidth: 150
  1617. },
  1618. {
  1619. userId: this.$store.state.user.name,
  1620. functionId: 103001,
  1621. serialNumber: '103001Table1CreateDate',
  1622. tableId: '103001Table1',
  1623. tableName: '打样信息表',
  1624. columnProp: 'createDate',
  1625. headerAlign: 'center',
  1626. align: 'center',
  1627. columnLabel: '创建时间',
  1628. columnHidden: false,
  1629. columnImage: false,
  1630. columnSortable: false,
  1631. sortLv: 0,
  1632. status: true,
  1633. fixed: '',
  1634. columnWidth: 160
  1635. },
  1636. {
  1637. userId: this.$store.state.user.name,
  1638. functionId: 103001,
  1639. serialNumber: '103001Table1CreateBy',
  1640. tableId: '103001Table1',
  1641. tableName: '打样信息表',
  1642. columnProp: 'createBy',
  1643. headerAlign: 'center',
  1644. align: 'center',
  1645. columnLabel: '创建人',
  1646. columnHidden: false,
  1647. columnImage: false,
  1648. columnSortable: false,
  1649. sortLv: 0,
  1650. status: true,
  1651. fixed: '',
  1652. columnWidth: 80
  1653. },
  1654. {
  1655. userId: this.$store.state.user.name,
  1656. functionId: 103001,
  1657. serialNumber: '103001Table1UpdateDate',
  1658. tableId: '103001Table1',
  1659. tableName: '打样信息表',
  1660. columnProp: 'updateDate',
  1661. headerAlign: 'center',
  1662. align: 'center',
  1663. columnLabel: '更新时间',
  1664. columnHidden: false,
  1665. columnImage: false,
  1666. columnSortable: false,
  1667. sortLv: 0,
  1668. status: true,
  1669. fixed: '',
  1670. columnWidth: 160
  1671. },
  1672. {
  1673. userId: this.$store.state.user.name,
  1674. functionId: 103001,
  1675. serialNumber: '103001Table1UpdateBy',
  1676. tableId: '103001Table1',
  1677. tableName: '打样信息表',
  1678. columnProp: 'updateBy',
  1679. headerAlign: 'center',
  1680. align: 'center',
  1681. columnLabel: '更新人',
  1682. columnHidden: false,
  1683. columnImage: false,
  1684. columnSortable: false,
  1685. sortLv: 0,
  1686. status: true,
  1687. fixed: '',
  1688. columnWidth: 80
  1689. }
  1690. ],
  1691. fileColumnList: [
  1692. {
  1693. userId: this.$store.state.user.name,
  1694. functionId: 103001,
  1695. serialNumber: '103001Table2FileName',
  1696. tableId: '103001Table2',
  1697. tableName: '文件信息表',
  1698. columnProp: 'fileName',
  1699. headerAlign: 'center',
  1700. align: 'center',
  1701. columnLabel: '文件名称',
  1702. columnHidden: false,
  1703. columnImage: false,
  1704. columnSortable: false,
  1705. sortLv: 0,
  1706. status: true,
  1707. fixed: '',
  1708. columnWidth: 140
  1709. },
  1710. {
  1711. userId: this.$store.state.user.name,
  1712. functionId: 103001,
  1713. serialNumber: '103001Table2FileRemark',
  1714. tableId: '103001Table2',
  1715. tableName: '文件信息表',
  1716. columnProp: 'fileRemark',
  1717. headerAlign: 'center',
  1718. align: 'center',
  1719. columnLabel: '备注',
  1720. columnHidden: false,
  1721. columnImage: false,
  1722. columnSortable: false,
  1723. sortLv: 0,
  1724. status: true,
  1725. fixed: '',
  1726. columnWidth: 240
  1727. },
  1728. // {
  1729. // userId: this.$store.state.user.name,
  1730. // functionId: 103001,
  1731. // serialNumber: '103001Table2OrderRef3',
  1732. // tableId: '103001Table2',
  1733. // tableName: '文件信息表',
  1734. // columnProp: 'orderRef3',
  1735. // headerAlign: 'center',
  1736. // align: 'center',
  1737. // columnLabel: '文件描述',
  1738. // columnHidden: false,
  1739. // columnImage: false,
  1740. // columnSortable: false,
  1741. // sortLv: 0,
  1742. // status: true,
  1743. // fixed: '',
  1744. // columnWidth: 120
  1745. // },
  1746. {
  1747. userId: this.$store.state.user.name,
  1748. functionId: 103001,
  1749. serialNumber: '103001Table2CreateDate',
  1750. tableId: '103001Table2',
  1751. tableName: '文件信息表',
  1752. columnProp: 'createDate',
  1753. headerAlign: 'center',
  1754. align: 'center',
  1755. columnLabel: '上传时间',
  1756. columnHidden: false,
  1757. columnImage: false,
  1758. columnSortable: false,
  1759. sortLv: 0,
  1760. status: true,
  1761. fixed: '',
  1762. columnWidth: 140
  1763. },
  1764. {
  1765. userId: this.$store.state.user.name,
  1766. functionId: 103001,
  1767. serialNumber: '103001Table2CreatedBy',
  1768. tableId: '103001Table2',
  1769. tableName: '文件信息表',
  1770. columnProp: 'createdBy',
  1771. headerAlign: 'center',
  1772. align: 'center',
  1773. columnLabel: '上传人',
  1774. columnHidden: false,
  1775. columnImage: false,
  1776. columnSortable: false,
  1777. sortLv: 0,
  1778. status: true,
  1779. fixed: '',
  1780. columnWidth: 140
  1781. }
  1782. ],
  1783. projectPartDetailList: [
  1784. {
  1785. userId: this.$store.state.user.name,
  1786. functionId: 102001,
  1787. serialNumber: '102001Table3TestPartNo',
  1788. tableId: '102001Table3',
  1789. tableName: '项目物料表',
  1790. columnProp: 'testPartNo',
  1791. headerAlign: 'center',
  1792. align: 'center',
  1793. columnLabel: '产品编码',
  1794. columnHidden: false,
  1795. columnImage: false,
  1796. columnSortable: false,
  1797. sortLv: 0,
  1798. status: true,
  1799. fixed: '',
  1800. columnWidth: 150
  1801. },
  1802. {
  1803. userId: this.$store.state.user.name,
  1804. functionId: 102001,
  1805. serialNumber: '102001Table3PartDesc',
  1806. tableId: '102001Table3',
  1807. tableName: '项目物料表',
  1808. columnProp: 'partDesc',
  1809. headerAlign: 'center',
  1810. align: 'center',
  1811. columnLabel: '产品名称',
  1812. columnHidden: false,
  1813. columnImage: false,
  1814. columnSortable: false,
  1815. sortLv: 0,
  1816. status: true,
  1817. fixed: '',
  1818. columnWidth: 120
  1819. }, {
  1820. userId: this.$store.state.user.name,
  1821. functionId: 102001,
  1822. serialNumber: '102001Table3PartSpec',
  1823. tableId: '102001Table3',
  1824. tableName: '项目物料表',
  1825. columnProp: 'partSpec',
  1826. headerAlign: 'center',
  1827. align: 'center',
  1828. columnLabel: '产品规格',
  1829. columnHidden: false,
  1830. columnImage: false,
  1831. columnSortable: false,
  1832. sortLv: 0,
  1833. status: true,
  1834. fixed: '',
  1835. columnWidth: 120
  1836. }, {
  1837. userId: this.$store.state.user.name,
  1838. functionId: 102001,
  1839. serialNumber: '102001Table3PartTypeDesc',
  1840. tableId: '102001Table3',
  1841. tableName: '项目物料表',
  1842. columnProp: 'partTypeDesc',
  1843. headerAlign: 'center',
  1844. align: 'center',
  1845. columnLabel: '产品类型',
  1846. columnHidden: false,
  1847. columnImage: false,
  1848. columnSortable: false,
  1849. sortLv: 0,
  1850. status: true,
  1851. fixed: '',
  1852. columnWidth: 120
  1853. },
  1854. {
  1855. userId: this.$store.state.user.name,
  1856. functionId: 102001,
  1857. serialNumber: '102001Table3Type',
  1858. tableId: '102001Table3',
  1859. tableName: '项目物料表',
  1860. columnProp: 'type',
  1861. headerAlign: 'center',
  1862. align: 'center',
  1863. columnLabel: '制造类型',
  1864. columnHidden: false,
  1865. columnImage: false,
  1866. columnSortable: false,
  1867. sortLv: 0,
  1868. status: true,
  1869. fixed: '',
  1870. columnWidth: 120
  1871. },
  1872. {
  1873. userId: this.$store.state.user.name,
  1874. functionId: 102001,
  1875. serialNumber: '102001Table3UmId',
  1876. tableId: '102001Table3',
  1877. tableName: '项目物料表',
  1878. columnProp: 'umId',
  1879. headerAlign: 'center',
  1880. align: 'center',
  1881. columnLabel: '单位',
  1882. columnHidden: false,
  1883. columnImage: false,
  1884. columnSortable: false,
  1885. sortLv: 0,
  1886. status: true,
  1887. fixed: '',
  1888. columnWidth: 100
  1889. },
  1890. {
  1891. userId: this.$store.state.user.name,
  1892. functionId: 102001,
  1893. serialNumber: '102001Table3CodeNo',
  1894. tableId: '102001Table3',
  1895. tableName: '项目物料表',
  1896. columnProp: 'codeNo',
  1897. headerAlign: 'center',
  1898. align: 'center',
  1899. columnLabel: '模板编码',
  1900. columnHidden: false,
  1901. columnImage: false,
  1902. columnSortable: false,
  1903. sortLv: 0,
  1904. status: true,
  1905. fixed: '',
  1906. columnWidth: 120
  1907. }, {
  1908. userId: this.$store.state.user.name,
  1909. functionId: 102001,
  1910. serialNumber: '102001Table3CodeDesc',
  1911. tableId: '102001Table3',
  1912. tableName: '项目物料表',
  1913. columnProp: 'codeDesc',
  1914. headerAlign: 'center',
  1915. align: 'center',
  1916. columnLabel: '模板名称',
  1917. columnHidden: false,
  1918. columnImage: false,
  1919. columnSortable: false,
  1920. sortLv: 0,
  1921. status: true,
  1922. fixed: '',
  1923. columnWidth: 120
  1924. }
  1925. ],
  1926. columnAddressList: [
  1927. {
  1928. userId: this.$store.state.user.name,
  1929. functionId: 103001,
  1930. serialNumber: '103001Table4AddressName',
  1931. tableId: '103001Table4',
  1932. tableName: '联系地址表',
  1933. columnProp: 'addressName',
  1934. headerAlign: 'center',
  1935. align: 'center',
  1936. columnLabel: '联系地址',
  1937. columnHidden: false,
  1938. columnImage: false,
  1939. status: true,
  1940. fixed: '',
  1941. },
  1942. {
  1943. userId: this.$store.state.user.name,
  1944. functionId: 103001,
  1945. serialNumber: '103001Table4ContactStatus',
  1946. tableId: '103001Table4',
  1947. tableName: '联系地址表',
  1948. columnProp: 'addressStatus',
  1949. headerAlign: 'center',
  1950. align: 'center',
  1951. columnLabel: '地址状态',
  1952. columnHidden: false,
  1953. columnImage: false,
  1954. status: true,
  1955. fixed: '',
  1956. },
  1957. ],
  1958. columnContactList: [
  1959. {
  1960. userId: this.$store.state.user.name,
  1961. functionId: 103001,
  1962. serialNumber: '103001Table5ContactName',
  1963. tableId: '103001Table5',
  1964. tableName: '客户联系人表',
  1965. columnProp: 'contactName',
  1966. headerAlign: 'center',
  1967. align: 'center',
  1968. columnLabel: '客户负责人',
  1969. columnHidden: false,
  1970. columnImage: false,
  1971. status: true,
  1972. fixed: '',
  1973. },
  1974. {
  1975. userId: this.$store.state.user.name,
  1976. functionId: 103001,
  1977. serialNumber: '103001Table5ContactPhoneNumber1',
  1978. tableId: '103001Table5',
  1979. tableName: '客户联系人表',
  1980. columnProp: 'contactPhoneNumber1',
  1981. headerAlign: 'center',
  1982. align: 'center',
  1983. columnLabel: '联系方式',
  1984. columnHidden: false,
  1985. columnImage: false,
  1986. status: true,
  1987. fixed: '',
  1988. },
  1989. {
  1990. userId: this.$store.state.user.name,
  1991. functionId: 103001,
  1992. serialNumber: '103001Table5PrimaryContact',
  1993. tableId: '103001Table5',
  1994. tableName: '客户联系人表',
  1995. columnProp: 'primaryContact',
  1996. headerAlign: 'center',
  1997. align: 'center',
  1998. columnLabel: '默认联系人',
  1999. columnHidden: false,
  2000. columnImage: false,
  2001. status: true,
  2002. fixed: '',
  2003. },
  2004. {
  2005. userId: this.$store.state.user.name,
  2006. functionId: 103001,
  2007. serialNumber: '103001Table5ContactStatus',
  2008. tableId: '103001Table5',
  2009. tableName: '客户联系人表',
  2010. columnProp: 'contactStatus',
  2011. headerAlign: 'center',
  2012. align: 'center',
  2013. columnLabel: '人员状态',
  2014. columnHidden: false,
  2015. columnImage: false,
  2016. status: true,
  2017. fixed: '',
  2018. },
  2019. ],
  2020. // ======== 必填规则 ========
  2021. rules: {
  2022. customerNo: [
  2023. {
  2024. required: true,
  2025. message: ' ',
  2026. trigger: ['change', 'blur']
  2027. }
  2028. ],
  2029. trackerName: [
  2030. {
  2031. required: true,
  2032. message: ' ',
  2033. trigger: ['change', 'blur']
  2034. }
  2035. ],
  2036. proofingNumber: [
  2037. {
  2038. required: true,
  2039. message: ' ',
  2040. trigger: ['change', 'blur']
  2041. }
  2042. ],
  2043. projectId: [
  2044. {
  2045. required: true,
  2046. message: ' ',
  2047. trigger: ['change', 'blur']
  2048. }
  2049. ],
  2050. engineerName: [
  2051. {
  2052. required: true,
  2053. message: ' ',
  2054. trigger: ['change', 'blur']
  2055. }
  2056. ],
  2057. partName: [
  2058. {
  2059. required: true,
  2060. message: ' ',
  2061. trigger: ['change', 'blur']
  2062. }
  2063. ],
  2064. priorityLevel: [
  2065. {
  2066. required: true,
  2067. message: ' ',
  2068. trigger: ['change', 'blur']
  2069. }
  2070. ],
  2071. requiredDeliveryDate: [
  2072. {
  2073. required: true,
  2074. message: ' ',
  2075. trigger: ['change', 'blur']
  2076. }
  2077. ]
  2078. },
  2079. enterResultRules: {
  2080. actualityDeliveryDate: [
  2081. {
  2082. required: true,
  2083. message: ' ',
  2084. trigger: 'change'
  2085. }
  2086. ],
  2087. proofingResultInformation: [
  2088. {
  2089. required: true,
  2090. message: ' ',
  2091. trigger: 'change'
  2092. }
  2093. ]
  2094. },
  2095. submitResultRules: {
  2096. actualitySendSamplesDate: [
  2097. {
  2098. required: true,
  2099. message: ' ',
  2100. trigger: 'change'
  2101. }
  2102. ],
  2103. sendSamplesMethod: [
  2104. {
  2105. required: true,
  2106. message: ' ',
  2107. trigger: 'change'
  2108. }
  2109. ]
  2110. },
  2111. customerResponseRules: {
  2112. actualityReplyDate: [
  2113. {
  2114. required: true,
  2115. message: ' ',
  2116. trigger: 'change'
  2117. }
  2118. ],
  2119. confirmResults: [
  2120. {
  2121. required: true,
  2122. message: ' ',
  2123. trigger: 'change'
  2124. }
  2125. ],
  2126. confirmBy: [
  2127. {
  2128. required: true,
  2129. message: ' ',
  2130. trigger: 'change'
  2131. }
  2132. ]
  2133. },
  2134. // ======== 复选数据集 ========
  2135. proofingSelections: [],
  2136. projectPartListSelections: [],
  2137. // ======== 选中的当前行数据 ========
  2138. proofingCurrentRow: {},
  2139. // ======== 模态框开关控制 ========
  2140. modalFlag: false,
  2141. modalDisableFlag: false,
  2142. enterResultModalFlag: false,
  2143. submitResultModalFlag: false,
  2144. customerResponseModalFlag: false,
  2145. // 选择项目弹框开关
  2146. chooseProjectListFlag: false,
  2147. //项目搜索条件
  2148. searchProjectData: {
  2149. site: this.$store.state.user.site,
  2150. projectId: undefined,
  2151. projectName: undefined,
  2152. customerId: undefined,
  2153. },
  2154. // 项目集合
  2155. projectList: [],
  2156. addressModelFlag: false,
  2157. contactModelFlag: false,
  2158. columnFieldList1: [],
  2159. columnFieldList2: [],
  2160. }
  2161. },
  2162. mounted() {
  2163. this.$nextTick(() => {
  2164. this.height = window.innerHeight / 2 - 80;
  2165. /*第二个表格高度的动态调整*/
  2166. this.secondHeight = window.innerHeight / 2 - 206;
  2167. })
  2168. },
  2169. created() {
  2170. if (this.$route.params.type){
  2171. let params = {
  2172. site: this.$route.params.site,
  2173. proofingNo: this.$route.params.docNo,
  2174. limit: this.pageSize,
  2175. page : 1,
  2176. }
  2177. this.dataListLoading = true
  2178. proofingInformationSearch(params).then(({data}) => {
  2179. if (data && data.code === 0) {
  2180. this.dataList = data.page.list
  2181. this.totalPage = data.page.totalCount
  2182. this.$refs.selectDiv.setLengthAll(this.dataList.length)
  2183. // 判断是否全部存在数据
  2184. if (this.totalPage > 0) {
  2185. //设置选中行
  2186. this.$refs.proofingTable.setCurrentRow(this.dataList[0])
  2187. //加载当前的页签的table
  2188. this.refreshCurrentTabTable()
  2189. this.proofingClickRow(this.dataList[0])
  2190. this.updateModal(this.dataList[0])
  2191. } else {
  2192. //设置选中行
  2193. this.$refs.proofingTable.setCurrentRow({})
  2194. // 加载当前的页签的table
  2195. this.refreshCurrentTabTable()
  2196. this.testClickRow({})
  2197. }
  2198. }
  2199. this.dataListLoading = false
  2200. })
  2201. }
  2202. this.getDataList();
  2203. },
  2204. activated() {
  2205. if (this.$route.params.proofingNo){
  2206. this.searchData.proofingNo = this.$route.params.proofingNo
  2207. this.getDataList();
  2208. setTimeout(()=>{
  2209. this.searchData.proofingNo = ''
  2210. },200)
  2211. }
  2212. },
  2213. methods: {
  2214. // ======== 分页相关方法 ========
  2215. /**
  2216. * 每页数
  2217. * @param val
  2218. */
  2219. sizeChangeHandle(val) {
  2220. this.pageSize = val
  2221. this.pageIndex = 1
  2222. this.getDataList()
  2223. },
  2224. /**
  2225. * 当前页
  2226. * @param val
  2227. */
  2228. currentChangeHandle(val) {
  2229. this.pageIndex = val
  2230. this.getDataList()
  2231. },
  2232. // ======== 复选框操作相关方法 ========
  2233. /**
  2234. * 选中一行
  2235. * @param row
  2236. */
  2237. projectPartClickRow(row) {
  2238. if (this.modalData.flag === '1') {
  2239. this.$refs.projectPartTable.toggleRowSelection(row);
  2240. this.confirmProjectPart();
  2241. }
  2242. },
  2243. /**
  2244. * 多选
  2245. * @param val
  2246. */
  2247. selectionProjectPart(val) {
  2248. this.projectPartListSelections = val
  2249. },
  2250. /**
  2251. * 获取唯一值一般都为 id
  2252. * @param row
  2253. * @returns {*}
  2254. */
  2255. getRowKeys(row) {
  2256. return row.testPartNo;
  2257. },
  2258. /**
  2259. * 未知
  2260. * @returns {boolean}
  2261. */
  2262. selectFlag() {
  2263. return true;
  2264. },
  2265. // ======== 页签切换相关方法 ========
  2266. /**
  2267. * 列表表格选择替换
  2268. * @param tab
  2269. * @param event
  2270. */
  2271. tabClick(tab, event) {
  2272. // 刷新列表数据
  2273. this.refreshCurrentTabTable()
  2274. },
  2275. /**
  2276. * 当前值发生变化的时候修改
  2277. * @param row
  2278. * @param oldRow
  2279. */
  2280. changeCurrentRow(row, oldRow) {
  2281. // 判断是否是获取焦点的事件
  2282. if (row) {
  2283. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  2284. //刷新当前页表
  2285. this.refreshCurrentTabTable()
  2286. }
  2287. },
  2288. /**
  2289. * 刷新页签的table数据
  2290. */
  2291. refreshCurrentTabTable() {
  2292. if (this.activeTable === 'proofing_result') {
  2293. this.getProofingResult()
  2294. } else if (this.activeTable === 'project_information') {
  2295. this.getProjectInformation()
  2296. } else if (this.activeTable === 'customer_information') {
  2297. this.getCustomerInformation()
  2298. }
  2299. // else if (this.activeTable === 'proofing_file') {
  2300. // this.getProofingFile()
  2301. // }
  2302. },
  2303. // getProofingFile(){
  2304. //
  2305. // },
  2306. // ======== 列表数据刷新方法 ========
  2307. /**
  2308. * 获取数据列表
  2309. */
  2310. getDataList() {
  2311. if (localStorage.getItem('proofingData') != undefined) {
  2312. let data = JSON.parse(localStorage.getItem('proofingData'));
  2313. this.searchData.proofingNo = data.proofingNo
  2314. localStorage.removeItem('proofingData');
  2315. }
  2316. this.searchData.limit = this.pageSize
  2317. this.searchData.page = this.pageIndex
  2318. proofingInformationSearch(this.searchData).then(({data}) => {
  2319. if (data.code === 0) {
  2320. this.dataList = data.page.list
  2321. this.pageIndex = data.page.currPage
  2322. this.pageSize = data.page.pageSize
  2323. this.totalPage = data.page.totalCount
  2324. this.$refs.selectDiv.setLengthAll(this.dataList.length)
  2325. // 判断是否全部存在数据
  2326. if (this.totalPage > 0) {
  2327. //设置选中行
  2328. this.$refs.proofingTable.setCurrentRow(this.dataList[0])
  2329. //加载当前的页签的table
  2330. this.refreshCurrentTabTable()
  2331. this.proofingClickRow(this.dataList[0])
  2332. } else {
  2333. //设置选中行
  2334. this.$refs.proofingTable.setCurrentRow({})
  2335. // 加载当前的页签的table
  2336. this.refreshCurrentTabTable()
  2337. this.testClickRow({})
  2338. }
  2339. }
  2340. this.dataListLoading = false
  2341. })
  2342. },
  2343. /**
  2344. * 获取打样结果列表
  2345. */
  2346. getProofingResult() {
  2347. let tempData = {
  2348. site: this.$store.state.user.site,
  2349. proofingNo: this.proofingCurrentRow.proofingNo
  2350. }
  2351. // 打样结果对象
  2352. proofingResultSearch(tempData).then(({data}) => {
  2353. if (data && data.code === 0) {
  2354. this.proofingResultData = data.rows[0]
  2355. } else {
  2356. this.proofingResultData = {}
  2357. }
  2358. })
  2359. // 附件列表
  2360. this.getFileContentData()
  2361. },
  2362. /**
  2363. * 获取项目信息
  2364. */
  2365. getProjectInformation() {
  2366. let tempData = {
  2367. site: this.$store.state.user.site,
  2368. projectId: this.proofingCurrentRow.projectId
  2369. }
  2370. // 报价结果对象
  2371. getProjectInformation(tempData).then(({data}) => {
  2372. if (data && data.code === 0) {
  2373. this.projectInformationData = data.rows[0]
  2374. } else {
  2375. this.projectInformationData = {}
  2376. }
  2377. })
  2378. },
  2379. /**
  2380. * 获取客户信息
  2381. */
  2382. getCustomerInformation() {
  2383. let tempData = {
  2384. site: this.$store.state.user.site,
  2385. customerNo: this.proofingCurrentRow.customerNo
  2386. }
  2387. // 报价结果对象
  2388. getCustomerInformation(tempData).then(({data}) => {
  2389. if (data && data.code === 0) {
  2390. this.customerInformationData = data.rows[0]
  2391. } else {
  2392. this.customerInformationData = {}
  2393. }
  2394. })
  2395. },
  2396. // ======== 新增/编辑模态框 ========
  2397. /**
  2398. * 报价信息新增模态框
  2399. */
  2400. addModal () {
  2401. this.searchDelegateAccessByUser();
  2402. this.modalDisableFlag = false
  2403. this.modalFlag = true
  2404. },
  2405. /**
  2406. * 报价信息编辑模态框
  2407. * @param row
  2408. */
  2409. async updateModal (row) {
  2410. await this.getNodeAuthority(row)
  2411. this.modalData = {
  2412. flag: '2',
  2413. title: '打样编辑-'+row.proofingNo,
  2414. site: row.site,
  2415. proofingNo: row.proofingNo,
  2416. customerNo: row.customerNo,
  2417. customerDesc: row.customerDesc,
  2418. projectId: row.projectId,
  2419. projectName: row.projectName,
  2420. tracker: row.tracker,
  2421. trackerName: row.trackerName,
  2422. testPartNo: row.testPartNo,
  2423. partName: row.partName,
  2424. engineer: row.engineer,
  2425. engineerName: row.engineerName,
  2426. approver: row.approver,
  2427. approverName: row.approverName,
  2428. priorityLevel: row.priorityLevel,
  2429. proofingNumber: row.proofingNumber,
  2430. requiredDeliveryDate: row.requiredDeliveryDate,
  2431. remark: row.remark,
  2432. technicalConsiderations: row.technicalConsiderations,
  2433. isNeedToSendSamples: row.isNeedToSendSamples,
  2434. sendSamplesAddress: row.sendSamplesAddress,
  2435. consignee: row.consignee,
  2436. consigneeContact: row.consigneeContact,
  2437. actualityDeliveryDate: row.actualityDeliveryDate,
  2438. proofingResultInformation: row.proofingResultInformation,
  2439. actualitySendSamplesDate: row.actualitySendSamplesDate,
  2440. sendSamplesMethod: row.sendSamplesMethod,
  2441. deliverGoodsInformation: row.deliverGoodsInformation,
  2442. deliverGoodsRemark: row.deliverGoodsRemark,
  2443. actualityReplyDate: row.actualityReplyDate,
  2444. confirmResults: row.confirmResults,
  2445. confirmBy: row.confirmBy,
  2446. confirmInformation: row.confirmInformation,
  2447. proofingStatus: row.proofingStatus,
  2448. proofingResultStatus: row.proofingResultStatus,
  2449. nextToDo: row.nextToDo,
  2450. updateBy: this.$store.state.user.name,
  2451. nodeConclusion: '',
  2452. stepId: row.stepId,
  2453. rejectFlag: row.rejectFlag,
  2454. rejectStepId: row.rejectStepId,
  2455. isReject: row.isReject
  2456. }
  2457. this.searchDelegateAccessByUser();
  2458. this.modalDisableFlag = true
  2459. this.modalFlag = true
  2460. },
  2461. // ======== 新增/编辑/删除方法 ========
  2462. /**
  2463. * 获取项目物料列表
  2464. */
  2465. openModalDialog() {
  2466. if (this.modalData.proofingNo) {
  2467. this.searchDelegateAccess();
  2468. }
  2469. this.getProjectPartList();
  2470. },
  2471. getProjectPartList() {
  2472. if (!this.modalData.projectId) {
  2473. this.projectPartList = [];
  2474. return
  2475. }
  2476. // 先清空缓存选中
  2477. this.$nextTick(() => this.$refs.projectPartTable.clearSelection())
  2478. // 拿到选中的产品编号
  2479. let projectPartList = this.modalData.testPartNo.split(';')
  2480. this.projectPartData.projectId = this.modalData.projectId;
  2481. // 查询所有项目物料
  2482. getProjectPartList(this.projectPartData).then(({data}) => {
  2483. if (data && data.code === 0) {
  2484. this.projectPartList = data.rows
  2485. this.projectPartList.forEach(val => {
  2486. // 回显选中的项目物料
  2487. if (projectPartList.includes(val.testPartNo)) {
  2488. this.$nextTick(() => this.$refs.projectPartTable.toggleRowSelection(val, true))
  2489. }
  2490. })
  2491. // this.projectPartModelFlag = true
  2492. } else {
  2493. this.$alert(data.msg, '错误', {
  2494. confirmButtonText: '确定'
  2495. })
  2496. }
  2497. })
  2498. },
  2499. /**
  2500. * 确认多选项目物料
  2501. */
  2502. confirmProjectPart() {
  2503. this.modalData.testPartNo = ''
  2504. this.modalData.partName = ''
  2505. for (let i = 0; i < this.projectPartListSelections.length; i++) {
  2506. this.modalData.testPartNo = this.modalData.testPartNo + ";" + this.projectPartListSelections[i].testPartNo
  2507. this.modalData.partName = this.modalData.partName + ";" + this.projectPartListSelections[i].partName
  2508. }
  2509. this.modalData.testPartNo = this.modalData.testPartNo.substring(1)
  2510. this.modalData.partName = this.modalData.partName.substring(1)
  2511. this.projectPartModelFlag = false
  2512. },
  2513. /**
  2514. * 客户信息新增/编辑
  2515. */
  2516. saveData() {
  2517. this.$refs.modalForm.validate((valid) => {
  2518. if (!valid) {
  2519. this.validateDataValue()
  2520. } else {
  2521. if (this.projectPartListSelections.length <= 0) {
  2522. this.$message.warning('请选择项目料号')
  2523. return
  2524. }
  2525. if(this.modalData.trackerName==''||this.modalData.trackerName==null){
  2526. this.$message.warning('请选择CS')
  2527. return
  2528. }
  2529. if(this.modalData.engineerName==''||this.modalData.engineerName==null){
  2530. this.$message.warning('请选择NPI工程师')
  2531. return
  2532. }
  2533. if(this.modalData.approverName==''||this.modalData.approverName==null){
  2534. this.$message.warning('请选择Approver')
  2535. return
  2536. }
  2537. if(this.delegateAccessName==''||this.delegateAccessName==null){
  2538. this.$message.warning('请选择DelegateAccess')
  2539. return
  2540. }
  2541. this.confirmProjectPart();
  2542. // 将选中的 人员信息添加到请求
  2543. this.modalData.delegateAccessList = this.selectionDelegateAccess
  2544. if (this.modalData.flag === '1') {
  2545. this.saveProofing()
  2546. } else {
  2547. this.updateProofing()
  2548. }
  2549. }
  2550. })
  2551. },
  2552. updateProofing() {
  2553. proofingInformationEdit(this.modalData).then(({data}) => {
  2554. if (data && data.code === 0) {
  2555. this.getDataList()
  2556. this.modalFlag = false
  2557. this.$message({
  2558. message: '操作成功',
  2559. type: 'success',
  2560. duration: 1500,
  2561. onClose: () => {
  2562. }
  2563. })
  2564. } else {
  2565. this.$alert(data.msg, '错误', {
  2566. confirmButtonText: '确定'
  2567. })
  2568. }
  2569. })
  2570. },
  2571. saveProofing() {
  2572. proofingInformationSave(this.modalData).then(({data}) => {
  2573. if (data && data.code === 0) {
  2574. this.getDataList()
  2575. this.modalFlag = false
  2576. this.$message({
  2577. message: '操作成功',
  2578. type: 'success',
  2579. duration: 1500,
  2580. onClose: () => {
  2581. }
  2582. })
  2583. } else {
  2584. this.$alert(data.msg, '错误', {
  2585. confirmButtonText: '确定'
  2586. })
  2587. }
  2588. })
  2589. },
  2590. /**
  2591. * 验证必填项
  2592. */
  2593. validateDataValue() {
  2594. if (this.modalData.customerNo === '' || this.modalData.customerNo == null) {
  2595. this.$message.warning('请选择客户编码!')
  2596. return
  2597. }
  2598. if (this.modalData.customerDesc === '' || this.modalData.customerDesc == null) {
  2599. this.$message.warning('请选择客户名称!')
  2600. return
  2601. }
  2602. if (this.modalData.tracker === '' || this.modalData.tracker == null) {
  2603. this.$message.warning('请选择跟单员编码!')
  2604. return
  2605. }
  2606. if (this.modalData.trackerName === '' || this.modalData.trackerName == null) {
  2607. this.$message.warning('请选择跟单员名称!')
  2608. return
  2609. }
  2610. if (this.modalData.projectId === '' || this.modalData.projectId == null) {
  2611. this.$message.warning('请选择项目编码!')
  2612. return
  2613. }
  2614. if (this.modalData.projectName === '' || this.modalData.projectName == null) {
  2615. this.$message.warning('请选择项目名称!')
  2616. return
  2617. }
  2618. // if (this.modalData.engineer === '' || this.modalData.engineer == null) {
  2619. // this.$message.warning('请选择工程师编码!')
  2620. // return
  2621. // }
  2622. // if (this.modalData.engineerName === '' || this.modalData.engineerName == null) {
  2623. // this.$message.warning('请选择工程师名称!')
  2624. // return
  2625. // }
  2626. if (!this.modalData.proofingNumber && this.modalData.proofingNumber > 0) {
  2627. this.$message.warning('请输入正确的打样数量!')
  2628. return
  2629. }
  2630. // if (this.modalData.priorityLevel === '' || this.modalData.priorityLevel == null) {
  2631. // this.$message.warning('请选择优先等级!')
  2632. // return
  2633. // }
  2634. if (!this.modalData.requiredDeliveryDate) {
  2635. this.$message.warning('请输入要求交付日期!')
  2636. return
  2637. }
  2638. },
  2639. /**
  2640. * 打样信息删除
  2641. */
  2642. delModal() {
  2643. if (this.proofingSelections.length === 0) {
  2644. this.$message.warning('请勾选要删除的打样信息!')
  2645. return
  2646. }
  2647. this.$confirm(`是否删除这 ` + this.proofingSelections.length + ` 条打样信息?`, '提示', {
  2648. confirmButtonText: '确定',
  2649. cancelButtonText: '取消',
  2650. type: 'warning'
  2651. }).then(() => {
  2652. let tempData = {
  2653. informationList: this.proofingSelections
  2654. }
  2655. proofingInformationDelete(tempData).then(({data}) => {
  2656. if (data && data.code === 0) {
  2657. this.getDataList()
  2658. this.proofingSelections = []
  2659. this.$message({
  2660. message: '操作成功',
  2661. type: 'success',
  2662. duration: 1500,
  2663. onClose: () => {
  2664. }
  2665. })
  2666. } else {
  2667. this.$alert(data.msg, '错误', {
  2668. confirmButtonText: '确定'
  2669. })
  2670. }
  2671. })
  2672. }).catch(() => {
  2673. })
  2674. },
  2675. // ======== 列表操作方法 ========
  2676. /**
  2677. * 单机选中报价信息
  2678. * @param row
  2679. */
  2680. proofingClickRow(row) {
  2681. // this.$refs.proofingTable.toggleRowSelection(row)
  2682. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  2683. this.proofingDetailData = JSON.parse(JSON.stringify(row))
  2684. },
  2685. /**
  2686. * 复选报价信息
  2687. * @param val
  2688. */
  2689. selectionProofing(val) {
  2690. this.proofingSelections = val
  2691. this.$refs.selectDiv.setLengthselected(this.proofingSelections.length)
  2692. },
  2693. // ======== 报价结果相关方法 ========
  2694. /**
  2695. * 封装录入方法
  2696. */
  2697. packProofingResultModal() {
  2698. // 重置对象
  2699. this.enterResultData = {
  2700. site: this.$store.state.user.site,
  2701. proofingNo: '',
  2702. actualityDeliveryDate: new Date(),
  2703. proofingResultInformation: '',
  2704. proofingResultStatus: 'E',
  2705. fileContentList: [],
  2706. updateBy: this.$store.state.user.name
  2707. }
  2708. // 获得选中的打样号
  2709. // if (this.proofingSelections.length > 0) {
  2710. // this.proofingSelections.forEach(val => {
  2711. // this.enterResultData.proofingNo += ';' + val.proofingNo
  2712. // })
  2713. // this.enterResultData.proofingNo = this.enterResultData.proofingNo.substring(1)
  2714. // } else {
  2715. // this.enterResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2716. // }
  2717. this.enterResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2718. // // 获得这些打样号的全部附件
  2719. // this.getFileContentList()
  2720. this.enterResultModalFlag = true
  2721. },
  2722. /**
  2723. * 录入打样结果
  2724. */
  2725. proofingResultModal() {
  2726. // // 如果有选中打样单
  2727. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  2728. // let tempData = {
  2729. // currentStatus: 'C',
  2730. // informationList: this.proofingSelections,
  2731. // }
  2732. // // 检查打样单状态
  2733. // checkProofingStatus(tempData).then(({data}) => {
  2734. // if (data && data.code === 0) {
  2735. // if (data.flag === 1) { // 状态一致
  2736. // this.packProofingResultModal()
  2737. // } else { // 状态不同
  2738. // this.$message.warning('选中的打样单进度有误,请确认!')
  2739. // }
  2740. // } else {
  2741. // this.$alert(data.msg, '错误', {
  2742. // confirmButtonText: '确定'
  2743. // })
  2744. // }
  2745. // })
  2746. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  2747. // this.packProofingResultModal()
  2748. // }
  2749. this.packProofingResultModal()
  2750. },
  2751. /**
  2752. * 保存打样结果
  2753. */
  2754. saveProofingResult() {
  2755. if (this.enterResultData.actualityDeliveryDate === '' || this.enterResultData.actualityDeliveryDate == null) {
  2756. this.$message.warning('请选择实际交付日期!')
  2757. return
  2758. }
  2759. if (this.enterResultData.proofingResultInformation === '' || this.enterResultData.proofingResultInformation == null) {
  2760. this.$message.warning('请填写打样结果信息!')
  2761. return
  2762. }
  2763. // if (this.proofingSelections.length > 1) {
  2764. // this.$confirm(`是否录入多条打样结果?`, '提示', {
  2765. // confirmButtonText: '确定',
  2766. // cancelButtonText: '取消',
  2767. // type: 'warning'
  2768. // }).then(() => {
  2769. // saveProofingResult(this.enterResultData).then(({data}) => {
  2770. // if (data && data.code === 0) {
  2771. // this.getDataList()
  2772. // this.enterResultModalFlag = false
  2773. // this.$message({
  2774. // message: '操作成功',
  2775. // type: 'success',
  2776. // duration: 1500,
  2777. // onClose: () => {}
  2778. // })
  2779. // } else {
  2780. // this.$alert(data.msg, '错误', {
  2781. // confirmButtonText: '确定'
  2782. // })
  2783. // }
  2784. // })
  2785. // }).catch(() => {
  2786. // })
  2787. // } else {
  2788. saveProofingResult(this.enterResultData).then(({data}) => {
  2789. if (data && data.code === 0) {
  2790. this.getDataList()
  2791. this.enterResultModalFlag = false
  2792. this.$message({
  2793. message: '操作成功',
  2794. type: 'success',
  2795. duration: 1500,
  2796. onClose: () => {
  2797. }
  2798. })
  2799. } else {
  2800. this.$alert(data.msg, '错误', {
  2801. confirmButtonText: '确定'
  2802. })
  2803. }
  2804. })
  2805. // }
  2806. },
  2807. /**
  2808. * 封装送样方法
  2809. */
  2810. packSubmitProofingModal() {
  2811. this.submitResultData = {
  2812. site: this.$store.state.user.site,
  2813. proofingNo: '',
  2814. actualitySendSamplesDate: new Date(),
  2815. sendSamplesMethod: '',
  2816. deliverGoodsInformation: '',
  2817. deliverGoodsRemark: '',
  2818. proofingResultStatus: 'S',
  2819. updateBy: this.$store.state.user.name,
  2820. }
  2821. // 获得选中的打样号
  2822. // if (this.proofingSelections.length > 0) {
  2823. // this.proofingSelections.forEach(val => {
  2824. // this.submitResultData.quotationNo += ';' + val.quotationNo
  2825. // })
  2826. // this.submitResultData.quotationNo = this.submitResultData.quotationNo.substring(1)
  2827. // } else {
  2828. // this.submitResultData.quotationNo = this.proofingCurrentRow.quotationNo
  2829. // }
  2830. this.submitResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2831. this.submitResultModalFlag = true
  2832. },
  2833. /**
  2834. * 提交送样信息
  2835. */
  2836. submitProofingModal() {
  2837. // // 如果有选中打样单
  2838. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  2839. // let tempData = {
  2840. // currentStatus: 'E',
  2841. // informationList: this.proofingSelections,
  2842. // }
  2843. // // 检查打样单状态
  2844. // checkProofingStatus(tempData).then(({data}) => {
  2845. // if (data && data.code === 0) {
  2846. // if (data.flag === 1) { // 状态一致
  2847. // this.packSubmitProofingModal()
  2848. // } else { // 状态不同
  2849. // this.$message.warning('选中的打样单进度有误,请确认!')
  2850. // }
  2851. // } else {
  2852. // this.$alert(data.msg, '错误', {
  2853. // confirmButtonText: '确定'
  2854. // })
  2855. // }
  2856. // })
  2857. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  2858. // this.packSubmitProofingModal()
  2859. // }
  2860. this.packSubmitProofingModal()
  2861. },
  2862. /**
  2863. * 保存送样结果
  2864. */
  2865. saveSubmitResult() {
  2866. if (this.submitResultData.actualitySendSamplesDate === '' || this.submitResultData.actualitySendSamplesDate == null) {
  2867. this.$message.warning('请选择实际送样日期!')
  2868. return
  2869. }
  2870. if (this.submitResultData.sendSamplesMethod === '' || this.submitResultData.sendSamplesMethod == null) {
  2871. this.$message.warning('请选择送样方式!')
  2872. return
  2873. }
  2874. // if (this.proofingSelections.length > 1) {
  2875. // this.$confirm(`是否提交多条送样信息?`, '提示', {
  2876. // confirmButtonText: '确定',
  2877. // cancelButtonText: '取消',
  2878. // type: 'warning'
  2879. // }).then(() => {
  2880. // saveSubmitResult(this.submitResultData).then(({data}) => {
  2881. // if (data && data.code === 0) {
  2882. // this.getDataList()
  2883. // this.submitResultModalFlag = false
  2884. // this.$message({
  2885. // message: '操作成功',
  2886. // type: 'success',
  2887. // duration: 1500,
  2888. // onClose: () => {}
  2889. // })
  2890. // } else {
  2891. // this.$alert(data.msg, '错误', {
  2892. // confirmButtonText: '确定'
  2893. // })
  2894. // }
  2895. // })
  2896. // }).catch(() => {
  2897. // })
  2898. // } else {
  2899. saveSubmitResult(this.submitResultData).then(({data}) => {
  2900. if (data && data.code === 0) {
  2901. this.getDataList()
  2902. this.submitResultModalFlag = false
  2903. this.$message({
  2904. message: '操作成功',
  2905. type: 'success',
  2906. duration: 1500,
  2907. onClose: () => {
  2908. }
  2909. })
  2910. } else {
  2911. this.$alert(data.msg, '错误', {
  2912. confirmButtonText: '确定'
  2913. })
  2914. }
  2915. })
  2916. // }
  2917. },
  2918. /**
  2919. * 封装回复方法
  2920. */
  2921. packCustomerResponseModal() {
  2922. this.customerResponseData = {
  2923. site: this.$store.state.user.site,
  2924. proofingNo: '',
  2925. actualityReplyDate: new Date(),
  2926. confirmResults: '接受',
  2927. confirmBy: '',
  2928. confirmInformation: '',
  2929. proofingResultStatus: 'R',
  2930. updateBy: this.$store.state.user.name
  2931. }
  2932. // 获得选中的打样号
  2933. // if (this.proofingSelections.length > 0) {
  2934. // this.proofingSelections.forEach(val => {
  2935. // this.customerResponseData.proofingNo += ';' + val.proofingNo
  2936. // })
  2937. // this.customerResponseData.proofingNo = this.customerResponseData.proofingNo.substring(1)
  2938. // } else {
  2939. // this.customerResponseData.proofingNo = this.proofingCurrentRow.proofingNo
  2940. // }
  2941. this.customerResponseData.proofingNo = this.proofingCurrentRow.proofingNo
  2942. this.customerResponseModalFlag = true
  2943. },
  2944. /**
  2945. * 客户回复
  2946. */
  2947. customerResponseModal() {
  2948. // // 如果有选中打样单
  2949. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  2950. // let tempData = {
  2951. // currentStatus: 'S',
  2952. // informationList: this.proofingSelections,
  2953. // }
  2954. // // 检查打样单状态
  2955. // checkProofingStatus(tempData).then(({data}) => {
  2956. // if (data && data.code === 0) {
  2957. // if (data.flag === 1) { // 状态一致
  2958. // this.packCustomerResponseModal()
  2959. // } else { // 状态不同
  2960. // this.$message.warning('选中的打样单进度有误,请确认!')
  2961. // }
  2962. // } else {
  2963. // this.$alert(data.msg, '错误', {
  2964. // confirmButtonText: '确定'
  2965. // })
  2966. // }
  2967. // })
  2968. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  2969. // this.packCustomerResponseModal()
  2970. // }
  2971. this.packCustomerResponseModal()
  2972. },
  2973. /**
  2974. * 保存客户回复
  2975. */
  2976. saveCustomerResponse() {
  2977. if (this.customerResponseData.actualityReplyDate === '' || this.customerResponseData.actualityReplyDate == null) {
  2978. this.$message.warning('请选择实际回复日期!')
  2979. return
  2980. }
  2981. if (this.customerResponseData.confirmResults === '' || this.customerResponseData.confirmResults == null) {
  2982. this.$message.warning('请选择客户确认结果!')
  2983. return
  2984. }
  2985. if (this.customerResponseData.confirmBy === '' || this.customerResponseData.confirmBy == null) {
  2986. this.$message.warning('请填写客户确认人!')
  2987. return
  2988. }
  2989. // if (this.proofingSelections.length > 1) {
  2990. // this.$confirm(`是否提交多条客户回复?`, '提示', {
  2991. // confirmButtonText: '确定',
  2992. // cancelButtonText: '取消',
  2993. // type: 'warning'
  2994. // }).then(() => {
  2995. // saveCustomerResponse(this.customerResponseData).then(({data}) => {
  2996. // if (data && data.code === 0) {
  2997. // this.getDataList()
  2998. // this.customerResponseModalFlag = false
  2999. // this.$message({
  3000. // message: '操作成功',
  3001. // type: 'success',
  3002. // duration: 1500,
  3003. // onClose: () => {}
  3004. // })
  3005. // } else {
  3006. // this.$alert(data.msg, '错误', {
  3007. // confirmButtonText: '确定'
  3008. // })
  3009. // }
  3010. // })
  3011. // }).catch(() => {
  3012. // })
  3013. // } else {
  3014. saveCustomerResponse(this.customerResponseData).then(({data}) => {
  3015. if (data && data.code === 0) {
  3016. this.getDataList()
  3017. this.customerResponseModalFlag = false
  3018. this.$message({
  3019. message: '操作成功',
  3020. type: 'success',
  3021. duration: 1500,
  3022. onClose: () => {
  3023. }
  3024. })
  3025. } else {
  3026. this.$alert(data.msg, '错误', {
  3027. confirmButtonText: '确定'
  3028. })
  3029. }
  3030. })
  3031. // }
  3032. },
  3033. // ======== 报价单附件的相关方法 ========
  3034. /**
  3035. * 获取报价单附件列表
  3036. */
  3037. getFileContentData() {
  3038. let currentData = {
  3039. orderRef1: this.$store.state.user.site,
  3040. orderRef2: this.proofingCurrentRow.proofingNo
  3041. }
  3042. getFileContentList(currentData).then(({data}) => {
  3043. if (data && data.code === 0) {
  3044. this.fileContentList = data.rows
  3045. } else {
  3046. this.fileContentList = []
  3047. }
  3048. })
  3049. },
  3050. // /**
  3051. // * 获得这些报价号的全部附件
  3052. // */
  3053. // getFileContentList () {
  3054. // let currentData = {
  3055. // orderRef1: this.$store.state.user.site,
  3056. // orderRef2: this.enterResultData.proofingNo
  3057. // }
  3058. // getFileContentList(currentData).then(({data}) => {
  3059. // if (data && data.code === 0) {
  3060. // this.enterResultData.fileContentList = data.rows
  3061. // } else {
  3062. // this.enterResultData.fileContentList = []
  3063. // }
  3064. // })
  3065. // },
  3066. /**
  3067. * 上传文件
  3068. */
  3069. uploadFile() {
  3070. let currentData = {
  3071. titleCon: '打样附件上传',
  3072. site: this.$store.state.user.site,
  3073. createBy: this.$store.state.user.name,
  3074. proofingNo: this.enterResultData.proofingNo,
  3075. fileRemark: '',
  3076. folder: 'proofingFile',
  3077. // options: []
  3078. }
  3079. // let num = 0
  3080. // let arr = this.enterResultData.proofingNo.split(';')
  3081. // arr.forEach(val => {
  3082. // currentData.options.push({key: num++, value: val})
  3083. // })
  3084. //打开组件 去做新增业务
  3085. this.$nextTick(() => {
  3086. this.$refs.proofingUploadFile.init(currentData)
  3087. })
  3088. },
  3089. /**
  3090. * 文件删除
  3091. * @param row
  3092. */
  3093. deleteFile(row) {
  3094. this.$confirm('确定要删除此文件?', '提示', {
  3095. confirmButtonText: '确定',
  3096. cancelButtonText: '取消',
  3097. type: 'warning'
  3098. }).then(() => {
  3099. deleteProofingFile(row).then(({data}) => {
  3100. if (data && data.code === 0) {
  3101. this.getFileContentList()
  3102. this.$message({
  3103. message: '操作成功',
  3104. type: 'success',
  3105. duration: 1500,
  3106. onClose: () => {
  3107. }
  3108. })
  3109. } else {
  3110. this.$alert(data.msg, '错误', {
  3111. confirmButtonText: '确定'
  3112. })
  3113. }
  3114. })
  3115. }).catch(() => {
  3116. })
  3117. },
  3118. /**
  3119. * 文件下载
  3120. * @param row
  3121. */
  3122. downloadFile(row) {
  3123. downLoadQuotationFile(row).then(({data}) => {
  3124. // 不限制文件下载类型
  3125. const blob = new Blob([data], {type: 'application/octet-stream;charset=utf-8'})
  3126. // 下载文件名称
  3127. const fileName = row.fileName
  3128. // a标签下载
  3129. const linkNode = document.createElement('a')
  3130. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  3131. linkNode.style.display = 'none'
  3132. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  3133. document.body.appendChild(linkNode)
  3134. linkNode.click() // 模拟在按钮上的一次鼠标单击
  3135. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  3136. document.body.removeChild(linkNode)
  3137. })
  3138. },
  3139. /**
  3140. * 获取该客户的客户地址
  3141. */
  3142. getCustomerAddressList() {
  3143. let tempData = {
  3144. site: this.$store.state.user.site,
  3145. customerNo: this.modalData.customerNo,
  3146. addressType: 'A'
  3147. }
  3148. customerAddressSearch(tempData).then(({data}) => {
  3149. if (data && data.code === 0) {
  3150. this.addressList = data.rows
  3151. this.addressModelFlag = true
  3152. } else {
  3153. this.addressList = []
  3154. }
  3155. })
  3156. },
  3157. // 双击选择负责人
  3158. getAddressData(row) {
  3159. this.modalData.sendSamplesAddress = row.addressName
  3160. this.addressModelFlag = false
  3161. },
  3162. /**
  3163. * 获取该客户的客户负责人
  3164. */
  3165. getCustomerContactList() {
  3166. let tempData = {
  3167. site: this.$store.state.user.site,
  3168. customerNo: this.modalData.customerNo
  3169. }
  3170. customerContactSearch(tempData).then(({data}) => {
  3171. if (data && data.code === 0) {
  3172. this.contactList = data.rows
  3173. this.contactModelFlag = true
  3174. } else {
  3175. this.contactList = []
  3176. }
  3177. })
  3178. },
  3179. // 双击选择负责人
  3180. getContactData(row) {
  3181. this.modalData.consignee = row.contactName
  3182. this.modalData.consigneeContact = row.contactPhoneNumber1
  3183. this.contactModelFlag = false
  3184. },
  3185. // ======== chooseList相关方法 ========
  3186. /**
  3187. * 获取基础数据列表S
  3188. * @param val
  3189. * @param type
  3190. */
  3191. getBaseList(val, type) {
  3192. this.tagNo = val
  3193. this.tagNo1 = type
  3194. this.$nextTick(() => {
  3195. let strVal = ''
  3196. let conSql = ''
  3197. if (val === 102) {
  3198. if (type === 1) {
  3199. strVal = this.modalData.customerNo
  3200. }
  3201. }
  3202. // if (val === 103) {
  3203. // if(type === 1) {
  3204. // strVal = this.modalData.tracker
  3205. // }
  3206. // if(type === 2) {
  3207. // strVal = this.modalData.engineer
  3208. // }
  3209. // }
  3210. if (val === 104) {
  3211. if (type === 1) {
  3212. strVal = this.modalData.projectId
  3213. }
  3214. }
  3215. if (val === 2051) {
  3216. strVal = this.modalData.trackerName
  3217. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3218. }
  3219. if (val === 2052) {
  3220. strVal = this.modalData.engineerName
  3221. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3222. }
  3223. if (val === 2053) {
  3224. strVal = this.modalData.approverName
  3225. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3226. }
  3227. this.$refs.baseList.init(val, strVal, conSql)
  3228. })
  3229. },
  3230. /**
  3231. * 列表方法的回调
  3232. * @param val
  3233. */
  3234. getBaseData(val) {
  3235. if (this.tagNo === 102) {
  3236. if (this.tagNo1 === 1) {
  3237. if (val.Customer_no === this.modalData.customerNo) {
  3238. return
  3239. }
  3240. this.modalData.customerNo = val.Customer_no
  3241. this.modalData.customerDesc = val.Customer_desc
  3242. this.modalData.projectId = undefined
  3243. this.modalData.projectName = undefined
  3244. this.projectPartList = []
  3245. }
  3246. }
  3247. // if (this.tagNo === 103) {
  3248. // if(this.tagNo1 === 1) {
  3249. // this.modalData.tracker = val.username
  3250. // this.modalData.trackerName = val.user_display
  3251. // }
  3252. // if(this.tagNo1 === 2) {
  3253. // this.modalData.engineer = val.username
  3254. // this.modalData.engineerName = val.user_display
  3255. // }
  3256. // }
  3257. if (this.tagNo === 104) {
  3258. if (this.tagNo1 === 1) {
  3259. this.modalData.projectId = val.project_id
  3260. this.modalData.projectName = val.project_name
  3261. this.getProjectPartList();
  3262. }
  3263. }
  3264. if (this.tagNo === 2051) {
  3265. this.modalData.tracker = val.username
  3266. this.modalData.trackerName = val.user_display
  3267. }
  3268. if (this.tagNo === 2052) {
  3269. this.modalData.engineer = val.username
  3270. this.modalData.engineerName = val.user_display
  3271. }
  3272. if (this.tagNo === 2053) {
  3273. this.modalData.approver = val.username
  3274. this.modalData.approverName = val.user_display
  3275. }
  3276. },
  3277. // ======== 导出相关方法 ========
  3278. /**
  3279. * 导出excel
  3280. */
  3281. async createExportData() {
  3282. this.searchData.limit = -1
  3283. this.searchData.page = 1
  3284. await proofingInformationSearch(this.searchData).then(({data}) => {
  3285. this.resultList = data.page.list
  3286. })
  3287. return this.resultList
  3288. },
  3289. startDownload() {
  3290. },
  3291. finishDownload() {
  3292. },
  3293. fields() {
  3294. let json = '{'
  3295. this.columnList.forEach((item, index) => {
  3296. if (index === this.columnList.length - 1) {
  3297. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  3298. } else {
  3299. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  3300. }
  3301. })
  3302. json += '}'
  3303. let s = eval('(' + json + ')')
  3304. return s
  3305. },
  3306. closeModalDiaLog() {
  3307. this.$refs.modalForm.resetFields();
  3308. this.modalData = {
  3309. flag: '1',
  3310. title: '打样新增',
  3311. site: this.$store.state.user.site,
  3312. proofingNo: '',
  3313. customerNo: '',
  3314. customerDesc: '',
  3315. projectId: '',
  3316. projectName: '',
  3317. tracker: '',
  3318. trackerName: '',
  3319. approver: '',
  3320. approverName: '',
  3321. testPartNo: '',
  3322. partName: '',
  3323. engineer: '',
  3324. engineerName: '',
  3325. priorityLevel: '',
  3326. proofingNumber: 1,
  3327. requiredDeliveryDate: '',
  3328. remark: '',
  3329. technicalConsiderations: '',
  3330. isNeedToSendSamples: '',
  3331. sendSamplesAddress: '',
  3332. consignee: '',
  3333. consigneeContact: '',
  3334. actualityDeliveryDate: '',
  3335. proofingResultInformation: '',
  3336. actualitySendSamplesDate: '',
  3337. sendSamplesMethod: '',
  3338. deliverGoodsInformation: '',
  3339. deliverGoodsRemark: '',
  3340. actualityReplyDate: '',
  3341. confirmResults: '',
  3342. confirmBy: '',
  3343. confirmInformation: '',
  3344. proofingStatus: '草稿',
  3345. proofingResultStatus: 'B',
  3346. nextToDo: '',
  3347. createBy: this.$store.state.user.name
  3348. };
  3349. this.selectionDelegateAccess = [];
  3350. this.activeName = 'part'
  3351. Object.keys(this.proofingDelegateAccess).forEach(key => {
  3352. this.proofingDelegateAccess[key] = '';
  3353. })
  3354. },
  3355. checkSelectable(row, index) {
  3356. if (this.modalData.flag === '1') {
  3357. return true
  3358. } else {
  3359. return false
  3360. }
  3361. },
  3362. projectClickRow(row) {
  3363. this.modalData.projectId = row.projectId
  3364. this.modalData.projectName = row.projectName
  3365. this.getProjectPartList()
  3366. this.chooseProjectListFlag = false
  3367. },
  3368. // 查询searchProjectInfoList
  3369. searchProjectInfoList() {
  3370. this.projectList = [];
  3371. this.searchProjectData.customerId = this.modalData.customerNo
  3372. searchProjectInfoList(this.searchProjectData).then(({data}) => {
  3373. if (data && data.code === 0) {
  3374. this.projectList = data.rows
  3375. } else {
  3376. this.projectList = []
  3377. }
  3378. }).catch((error) => {
  3379. this.$message.error('查询项目信息失败')
  3380. })
  3381. },
  3382. closeProjectInfoDialog() {
  3383. this.$refs.closeProjectInfoForm.resetFields();
  3384. this.searchProjectData = {
  3385. site: this.$store.state.user.site,
  3386. projectId: undefined,
  3387. projectName: undefined,
  3388. customerId: undefined,
  3389. }
  3390. },
  3391. rowStyle({row}) {
  3392. if (this.proofingCurrentRow.proofingNo === row.proofingNo) {
  3393. return {'background-color': '#E8F7F6', cursor: 'pointer'};
  3394. }
  3395. },
  3396. updateModalStatus(row, status) {
  3397. this.$confirm(`是否确认下达?`, '提示', {
  3398. confirmButtonText: '确定',
  3399. cancelButtonText: '取消',
  3400. type: 'warning'
  3401. }).then(() => {
  3402. let params = JSON.parse(JSON.stringify(row))
  3403. params.proofingResultStatus = status;
  3404. params.proofingStatus = '下达';
  3405. params.userName = this.$store.state.user.name
  3406. params.menuId = this.$route.meta.menuId
  3407. proofingInformationEditStatus(params).then(({data}) => {
  3408. if (data && data.code === 0) {
  3409. this.getDataList()
  3410. this.modalFlag = false
  3411. this.$message.success('打样单已下达')
  3412. } else {
  3413. this.$alert(data.msg, '错误', {
  3414. confirmButtonText: '确定'
  3415. })
  3416. }
  3417. })
  3418. })
  3419. },
  3420. searchDelegateAccessByUser() {
  3421. // 角色 ROO7 的用户
  3422. let params = {
  3423. ...this.proofingDelegateAccess,
  3424. site: this.$store.state.user.site,
  3425. }
  3426. searchDelegateAccessByUser(params).then(({data}) => {
  3427. if (data && data.code === 0) {
  3428. this.baseDelegateAccessList = data.rows;
  3429. } else {
  3430. this.$message.warning(data.msg)
  3431. }
  3432. }).catch((error) => {
  3433. this.$message.error(error)
  3434. })
  3435. },
  3436. handleSelectionChange(val) {
  3437. // 获得选中的 用户
  3438. this.selectionDelegateAccess2 = val;
  3439. },
  3440. handleTableClick(row, column, event, val) {
  3441. // 表格行点击选择
  3442. this.$refs[val].toggleRowSelection(row);
  3443. },
  3444. openDelegateAccess() {
  3445. let rows = JSON.parse(JSON.stringify(this.selectionDelegateAccess))
  3446. if (rows && rows.length > 0) {
  3447. this.$nextTick(() => {
  3448. rows.forEach(item => {
  3449. let row = this.baseDelegateAccessList.find(row => row.delegateAccess === item.delegateAccess);
  3450. this.$refs.delegateAccesstTable.toggleRowSelection(row);
  3451. })
  3452. })
  3453. }
  3454. },
  3455. closeDelegateAccess() {
  3456. this.selectionDelegateAccess2 = [];
  3457. },
  3458. confirmDelegateAccess() {
  3459. this.selectionDelegateAccess = JSON.parse(JSON.stringify(this.selectionDelegateAccess2))
  3460. this.delegateAccessVisible = false;
  3461. },
  3462. searchDelegateAccess() {
  3463. let params = {
  3464. site: this.modalData.site,
  3465. proofingNo: this.modalData.proofingNo,
  3466. }
  3467. searchDelegateAccess(params).then(({data}) => {
  3468. if (data && data.code === 0) {
  3469. this.selectionDelegateAccess = data.rows.map(item => {
  3470. return {
  3471. delegateAccess: item.delegateAccess,
  3472. delegateAccessName: item.delegateAccessName,
  3473. }
  3474. })
  3475. } else {
  3476. this.$message.warning(data.msg)
  3477. }
  3478. }).catch((error) => {
  3479. this.$message.error(error)
  3480. })
  3481. },
  3482. // 同意提交
  3483. agreeSubmit() {
  3484. this.$confirm(`是否确认提交?`, '提示', {
  3485. confirmButtonText: '确定',
  3486. cancelButtonText: '取消',
  3487. type: 'warning'
  3488. }).then(() => {
  3489. this.modalData.nodeConclusion = 'Y'
  3490. this.submitData()
  3491. })
  3492. },
  3493. // 驳回提交
  3494. rejectSubmit() {
  3495. this.$confirm(`是否确认驳回?`, '提示', {
  3496. confirmButtonText: '确定',
  3497. cancelButtonText: '取消',
  3498. type: 'warning'
  3499. }).then(() => {
  3500. this.modalData.nodeConclusion = 'N'
  3501. this.submitData()
  3502. })
  3503. },
  3504. // 提交
  3505. submitData() {
  3506. if (this.columnFieldList1 ){
  3507. for (let i = 0; i < this.columnFieldList1.length; i++) {
  3508. let row = this.columnFieldList1[i]
  3509. if (!this.modalData[row.fieldId] && row.required === 'Y'){
  3510. this.$message.error(row.fieldName + '不能为空')
  3511. return
  3512. }
  3513. }
  3514. }
  3515. if (this.columnFieldList2 ){
  3516. if (!this.delegateAccessName) {
  3517. this.$message.error('Delegate Access不能为空')
  3518. return;
  3519. }
  3520. }
  3521. let tempData = {
  3522. ...this.modalData,
  3523. userName:this.$store.state.user.name,
  3524. menuId: this.$route.meta.menuId,
  3525. }
  3526. submitChange(tempData).then(({data}) => {
  3527. if (data && data.code === 0) {
  3528. this.getDataList()
  3529. this.$message({message: '操作成功', type: 'success'})
  3530. this.submitModalFlag = false
  3531. this.modalFlag = false
  3532. } else {
  3533. this.$alert(data.msg, '错误', {
  3534. confirmButtonText: '确定'
  3535. })
  3536. }
  3537. })
  3538. },
  3539. // 获取流程的配置权限
  3540. async getNodeAuthority(row) {
  3541. let tempData = {
  3542. site: row.site,
  3543. stepId: row.stepId,
  3544. menuId: this.$route.meta.menuId
  3545. }
  3546. await getNodeAuthority(tempData).then(({data}) => {
  3547. if (data && data.code === 0) {
  3548. this.columnFieldList1 = data.rows.plm_proofing_information
  3549. this.columnFieldList2 = data.rows.plm_proofing_delegate_access
  3550. }
  3551. })
  3552. },
  3553. handleQueryCustomer(){
  3554. let params = {
  3555. site:this.$store.state.user.site,
  3556. customerNo:this.modalData.customerNo
  3557. }
  3558. queryCustomer(params).then(({data})=>{
  3559. if (data && data.code === 0 ) {
  3560. if (data.rows && data.rows.length === 1){
  3561. this.modalData.customerDesc = data.rows[0].customerDesc
  3562. }else {
  3563. this.modalData.customerDesc = ''
  3564. }
  3565. }else {
  3566. this.$message.warning(data.msg)
  3567. }
  3568. }).catch((error)=>{
  3569. this.$message.error(error)
  3570. })
  3571. },
  3572. handleQueryProjectByCustomer(){
  3573. let params = {
  3574. site:this.$store.state.user.site,
  3575. customerId:this.modalData.customerNo,
  3576. projectId:this.modalData.projectId
  3577. }
  3578. queryProjectByCustomer(params).then(({data})=>{
  3579. if (data && data.code === 0 ){
  3580. if (data.rows && data.rows.length === 1){
  3581. this.modalData.projectName = data.rows[0].projectName
  3582. }else {
  3583. this.modalData.projectName = ''
  3584. }
  3585. }else {
  3586. this.$message.warning(data.msg)
  3587. }
  3588. }).catch((error)=>{
  3589. this.$message.error(error)
  3590. })
  3591. }
  3592. }
  3593. }
  3594. </script>
  3595. <style scoped lang="scss">
  3596. /deep/ .customer-tab .el-tabs__content {
  3597. padding: 0px !important;
  3598. height: 300px;
  3599. }
  3600. .right /deep/ .el-input__inner {
  3601. text-align: right;
  3602. }
  3603. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  3604. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  3605. -webkit-appearance: none;
  3606. }
  3607. /deep/ .inlineNumber input[type="number"] {
  3608. -moz-appearance: textfield;
  3609. padding-right: 5px !important;
  3610. }
  3611. </style>