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.

3758 lines
131 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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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)" v-if="scope.row.proofingStatus !== '已完成'">编辑</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%" :close-on-click-modal="false">
  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. <oss-components label="打样单号" style="margin-top: 5px" height="28vh" :columns="ossColumns" :order-ref2="proofingCurrentRow.proofingNo" :order-ref1="proofingCurrentRow.site"></oss-components>
  919. </el-tab-pane>
  920. <!-- 审批信息 -->
  921. <el-tab-pane label="审批信息" name="approvalInformation">
  922. <approval-information ref="approvalTable" v-model:data-list="approvalList" :height="320"></approval-information>
  923. </el-tab-pane>
  924. </el-tabs>
  925. <!-- chooseList模态框 -->
  926. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  927. <!-- 客户地址 -->
  928. <el-dialog title="联系地址清单" :close-on-click-modal="false" v-drag :visible.sync="addressModelFlag" width="520px">
  929. <el-table
  930. :height="300"
  931. :data="addressList"
  932. @row-dblclick="getAddressData"
  933. border
  934. style="width: 100%;">
  935. <el-table-column
  936. v-for="(item,index) in columnAddressList" :key="index"
  937. :sortable="item.columnSortable"
  938. :prop="item.columnProp"
  939. :header-align="item.headerAlign"
  940. :show-overflow-tooltip="item.showOverflowTooltip"
  941. :align="item.align"
  942. :fixed="item.fixed==''?false:item.fixed"
  943. :min-width="item.columnWidth"
  944. :label="item.columnLabel">
  945. <template slot-scope="scope">
  946. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  947. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  948. style="width: 100px; height: 80px"/></span>
  949. </template>
  950. </el-table-column>
  951. </el-table>
  952. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  953. <el-button type="primary" @click="addressModelFlag=false">关闭</el-button>
  954. </el-footer>
  955. </el-dialog>
  956. <!-- 联系人 -->
  957. <el-dialog title="收货人清单" :close-on-click-modal="false" v-drag :visible.sync="contactModelFlag" width="520px">
  958. <el-table
  959. :height="300"
  960. :data="contactList"
  961. @row-dblclick="getContactData"
  962. border
  963. style="width: 100%;">
  964. <el-table-column
  965. v-for="(item,index) in columnContactList" :key="index"
  966. :sortable="item.columnSortable"
  967. :prop="item.columnProp"
  968. :header-align="item.headerAlign"
  969. :show-overflow-tooltip="item.showOverflowTooltip"
  970. :align="item.align"
  971. :fixed="item.fixed==''?false:item.fixed"
  972. :min-width="item.columnWidth"
  973. :label="item.columnLabel">
  974. <template slot-scope="scope">
  975. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  976. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  977. style="width: 100px; height: 80px"/></span>
  978. </template>
  979. </el-table-column>
  980. </el-table>
  981. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  982. <el-button type="primary" @click="contactModelFlag=false">关闭</el-button>
  983. </el-footer>
  984. </el-dialog>
  985. <el-dialog title="人员选择" @open="openDelegateAccess" @close="closeDelegateAccess" v-drag
  986. :visible.sync="delegateAccessVisible" width="40vw">
  987. <el-form :inline="true" label-position="top" :model="proofingDelegateAccess">
  988. <el-form-item label="编码">
  989. <el-input v-model="proofingDelegateAccess.delegateAccess" clearable style="width: 120px"></el-input>
  990. </el-form-item>
  991. <el-form-item label="名称">
  992. <el-input v-model="proofingDelegateAccess.delegateAccessName" clearable style="width: 120px"></el-input>
  993. </el-form-item>
  994. <el-form-item label=" ">
  995. <el-button type="primary" @click="searchDelegateAccessByUser()">查询</el-button>
  996. </el-form-item>
  997. </el-form>
  998. <el-table v-if="delegateAccessVisible"
  999. :height="300"
  1000. :data="baseDelegateAccessList"
  1001. @selection-change="handleSelectionChange"
  1002. @row-click="(row,column, event)=>handleTableClick(row,column, event,'delegateAccesstTable')"
  1003. ref="delegateAccesstTable"
  1004. border
  1005. style="width: 100%;">
  1006. <el-table-column
  1007. type="selection"
  1008. header-align="center"
  1009. align="center"
  1010. width="50">
  1011. </el-table-column>
  1012. <el-table-column label="编码" property="delegateAccess" align="left" header-align="center"/>
  1013. <el-table-column label="名称" property="delegateAccessName" align="left" header-align="center"/>
  1014. </el-table>
  1015. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  1016. <el-button type="primary" @click="confirmDelegateAccess">确定</el-button>
  1017. <el-button type="primary" @click="delegateAccessVisible=false">关闭</el-button>
  1018. </el-footer>
  1019. </el-dialog>
  1020. <!-- 上传文件的modal -->
  1021. <proofingUploadFile ref="proofingUploadFile" @refreshPageTables="getFileContentData()" v-drag></proofingUploadFile>
  1022. </div>
  1023. </template>
  1024. <script>
  1025. import {
  1026. proofingInformationSearch, // 打样信息列表查询
  1027. proofingInformationSave, // 打样信息新增
  1028. proofingInformationEdit, // 打样信息编辑
  1029. proofingInformationDelete, // 打样信息删除
  1030. getFileContentList, // 获取打样单附件列表
  1031. proofingResultSearch, // 获取打样结果对象
  1032. deleteProofingFile, // 文件删除
  1033. saveProofingResult, // 保存打样结果
  1034. saveSubmitResult, // 保存送样结果
  1035. saveCustomerResponse, // 保存客户回复
  1036. getProjectPartList, // 获取产品列表
  1037. getProjectInformation, // 获取项目信息
  1038. getCustomerInformation, // 获取客户信息
  1039. } from '@/api/proofing/proofingInformation.js'
  1040. import {
  1041. downLoadQuotationFile, // 文件下载
  1042. searchProjectInfoList,
  1043. } from '@/api/quotation/quotationInformation.js'
  1044. import {
  1045. customerAddressSearch, // 客户联系地址列表查询
  1046. } from '@/api/customer/customerAddress.js'
  1047. import {
  1048. customerContactSearch, // 客户联系人列表查询
  1049. } from '@/api/customer/customerContact.js'
  1050. import Chooselist from '@/views/modules/common/Chooselist'
  1051. import proofingUploadFile from "./proofing_upload_file"
  1052. import DictDataSelect from "../sys/dict-data-select.vue";
  1053. import {
  1054. proofingInformationEditStatus,
  1055. searchDelegateAccess,
  1056. searchDelegateAccessByUser, submitChange
  1057. } from "../../../api/proofing/proofingInformation";
  1058. import {getNodeAuthority, getApprovalList} from "../../../api/changeManagement/changeManagement";
  1059. import ProjectInfo from "../quotation/sellForQuotation/projectInfo.vue";
  1060. import profingFile from "./profingFile"
  1061. import proofingAttribute from "../demoComponents/orderProperties"
  1062. import ApprovalInformation from "../changeManagement/approvalInformation.vue";
  1063. import {queryCustomer} from "../../../api/customer/customerInformation";
  1064. import {queryProjectByCustomer} from "../../../api/project/project";
  1065. import OssComponents from "../oss/ossComponents.vue";
  1066. export default {
  1067. components: {
  1068. OssComponents,
  1069. ApprovalInformation,
  1070. ProjectInfo
  1071. ,DictDataSelect
  1072. ,Chooselist
  1073. ,proofingUploadFile
  1074. ,profingFile
  1075. ,proofingAttribute
  1076. },
  1077. watch: {
  1078. searchData: {
  1079. deep: true,
  1080. handler: function (newV, oldV) {
  1081. this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
  1082. this.searchData.projectId = this.searchData.projectId.toUpperCase()
  1083. }
  1084. },
  1085. 'modalData.proofingNo'(newV, oldV) {
  1086. if (newV) {
  1087. this.modalData.proofingNo = newV.toUpperCase()
  1088. }
  1089. },
  1090. 'modalData.customerNo'(newV, oldV) {
  1091. if (newV) {
  1092. this.modalData.customerNo = newV.toUpperCase()
  1093. }
  1094. if (oldV) {
  1095. if (!newV) {
  1096. this.modalData.customerDesc = ''
  1097. }
  1098. this.modalData.projectId = ''
  1099. this.modalData.consignee = ''
  1100. this.modalData.consigneeContact = ''
  1101. this.modalData.sendSamplesAddress = ''
  1102. }
  1103. },
  1104. 'modalData.projectId'(newV, oldV) {
  1105. if (newV) {
  1106. this.modalData.projectId = newV.toUpperCase()
  1107. }
  1108. if (oldV) {
  1109. if (!newV) {
  1110. this.modalData.projectName = ''
  1111. }
  1112. this.modalData.testPartNo = ''
  1113. this.modalData.partName = ''
  1114. this.projectPartListSelections = [];
  1115. this.projectPartList = [];
  1116. this.$refs.projectPartTable.clearSelection();
  1117. }
  1118. },
  1119. },
  1120. computed: {
  1121. delegateAccessName: {
  1122. get() {
  1123. return this.selectionDelegateAccess.map(item => item.delegateAccessName).join(';')
  1124. },
  1125. set(val) {
  1126. }
  1127. },
  1128. columnFlagByHeader() {
  1129. return (value) => {
  1130. if (this.modalData.flag === '1'){
  1131. return false
  1132. }
  1133. if (!this.columnFieldList1){
  1134. return true
  1135. }
  1136. let arr = this.columnFieldList1.filter(a => a.fieldId === value)
  1137. if (arr.length > 0) {
  1138. return arr[0].updateFlag === 'N'
  1139. }
  1140. return true
  1141. }
  1142. },
  1143. columnFlagByDelegateAccess() {
  1144. return (value) => {
  1145. if (this.modalData.flag === '1'){
  1146. return false
  1147. }
  1148. if (!this.columnFieldList2){
  1149. return true
  1150. }
  1151. let arr = this.columnFieldList2.filter(a => a.fieldId === value)
  1152. if (arr.length > 0) {
  1153. return arr[0].updateFlag === 'N'
  1154. }
  1155. return true
  1156. }
  1157. },
  1158. },
  1159. data() {
  1160. return {
  1161. selectionDelegateAccess: [],
  1162. selectionDelegateAccess2: [],
  1163. delegateAccessVisible: false,
  1164. baseDelegateAccessList: [],
  1165. proofingDelegateAccess: {
  1166. delegateAccess: '',
  1167. delegateAccessName: '',
  1168. },
  1169. activeName: 'part',
  1170. // 导出
  1171. exportData: [],
  1172. exportName: '设备分类' + this.dayjs().format('YYYYMMDDHHmmss'),
  1173. exportHeader: ['设备分类'],
  1174. exportFooter: [],
  1175. resultList: [],
  1176. // ======== 行高 ========
  1177. height: 300,
  1178. secondHeight: 200,
  1179. // ======== 分页 ========
  1180. pageIndex: 1,
  1181. pageSize: 50,
  1182. totalPage: 0,
  1183. selectedDataNum: 0,
  1184. // 条件查询
  1185. searchData: {
  1186. site: this.$store.state.user.site,
  1187. customerNo: '',
  1188. customerDesc: '',
  1189. trackerName: '',
  1190. testPartNo: '',
  1191. partName: '',
  1192. proofingStatus: '',
  1193. proofingResultStatus: '',
  1194. startDate: '',
  1195. endDate: '',
  1196. projectId: '',
  1197. projectName: '',
  1198. engineerName: '',
  1199. priorityLevel: '',
  1200. proofingNo: '',
  1201. page: 1,
  1202. limit: 10,
  1203. menuId: this.$route.meta.menuId,
  1204. },
  1205. // 其它
  1206. dataListLoading: false,
  1207. // 初始页签
  1208. activeTable: 'attribute',
  1209. // ======== 数据对象 ========
  1210. modalData: {
  1211. flag: '1',
  1212. title: '打样新增',
  1213. site: this.$store.state.user.site,
  1214. proofingNo: '',
  1215. customerNo: '',
  1216. customerDesc: '',
  1217. projectId: '',
  1218. projectName: '',
  1219. tracker: '',
  1220. trackerName: '',
  1221. testPartNo: '',
  1222. partName: '',
  1223. engineer: '',
  1224. engineerName: '',
  1225. approver: '',
  1226. approverName: '',
  1227. priorityLevel: '',
  1228. proofingNumber: 1,
  1229. requiredDeliveryDate: '',
  1230. remark: '',
  1231. technicalConsiderations: '',
  1232. isNeedToSendSamples: '',
  1233. sendSamplesAddress: '',
  1234. consignee: '',
  1235. consigneeContact: '',
  1236. actualityDeliveryDate: '',
  1237. proofingResultInformation: '',
  1238. actualitySendSamplesDate: '',
  1239. sendSamplesMethod: '',
  1240. deliverGoodsInformation: '',
  1241. deliverGoodsRemark: '',
  1242. actualityReplyDate: '',
  1243. confirmResults: '',
  1244. confirmBy: '',
  1245. confirmInformation: '',
  1246. proofingStatus: '草稿',
  1247. proofingResultStatus: 'B',
  1248. nextToDo: '',
  1249. createDate: '',
  1250. createBy: '',
  1251. updateDate: '',
  1252. updateBy: '',
  1253. nodeConclusion: '',
  1254. stepId: '',
  1255. rejectFlag: '',
  1256. rejectStepId: '',
  1257. isReject: ''
  1258. },
  1259. proofingDetailData: {
  1260. technicalConsiderations: '',
  1261. isNeedToSendSamples: '',
  1262. sendSamplesAddress: '',
  1263. consignee: '',
  1264. consigneeContact: ''
  1265. },
  1266. proofingResultData: {
  1267. proofingResultStatus: '',
  1268. actualityDeliveryDate: '',
  1269. isNeedToSendSamples: '',
  1270. proofingResultInformation: '',
  1271. actualitySendSamplesDate: '',
  1272. sendSamplesMethod: '',
  1273. deliverGoodsInformation: '',
  1274. deliverGoodsRemark: '',
  1275. confirmResults: '',
  1276. actualityReplyDate: '',
  1277. confirmBy: '',
  1278. confirmInformation: ''
  1279. },
  1280. enterResultData: {
  1281. site: this.$store.state.user.site,
  1282. proofingNo: '',
  1283. actualityDeliveryDate: '',
  1284. proofingResultInformation: '',
  1285. updateBy: this.$store.state.user.name,
  1286. proofingResultStatus: '',
  1287. fileContentList: []
  1288. },
  1289. submitResultData: {
  1290. site: this.$store.state.user.site,
  1291. proofingNo: '',
  1292. actualitySendSamplesDate: '',
  1293. sendSamplesMethod: '',
  1294. deliverGoodsInformation: '',
  1295. deliverGoodsRemark: '',
  1296. updateBy: this.$store.state.user.name,
  1297. proofingResultStatus: ''
  1298. },
  1299. customerResponseData: {
  1300. site: this.$store.state.user.site,
  1301. proofingNo: '',
  1302. actualityReplyDate: '',
  1303. confirmResults: '',
  1304. confirmBy: '',
  1305. confirmInformation: '',
  1306. updateBy: this.$store.state.user.name,
  1307. proofingResultStatus: ''
  1308. },
  1309. projectPartData: {
  1310. site: this.$store.state.user.site,
  1311. testPartNo: '',
  1312. partName: ''
  1313. },
  1314. projectInformationData: {
  1315. projectId: '',
  1316. projectName: '',
  1317. projectType: '',
  1318. projectSourceDesc: '',
  1319. priorityDesc: '',
  1320. status: '',
  1321. projectDesc: '',
  1322. projectManagerName: '',
  1323. projectOwnerName: '',
  1324. userRoleName: '',
  1325. remark: ''
  1326. },
  1327. customerInformationData: {
  1328. customerNo: '',
  1329. customerDesc: '',
  1330. importantCustomer: '',
  1331. customerCurrency: '',
  1332. turnoverOfYear: '',
  1333. potentialRevenueOfYear: '',
  1334. customerStatus: '',
  1335. customerIndustry: '',
  1336. companyName: '',
  1337. jobDescription: '',
  1338. customerDescription: '',
  1339. contactName: '',
  1340. contactPhoneNumber1: '',
  1341. position: '',
  1342. addressName: '',
  1343. addressType: '',
  1344. createDate: '',
  1345. createBy: '',
  1346. updateDate: '',
  1347. updateBy: ''
  1348. },
  1349. // ======== 数据列表 ========
  1350. dataList: [],
  1351. fileContentList: [],
  1352. projectPartList: [],
  1353. addressList: [],
  1354. contactList: [],
  1355. // ======== 列表表头 ========
  1356. columnList: [
  1357. {
  1358. userId: this.$store.state.user.name,
  1359. functionId: 103001,
  1360. serialNumber: '103001Table1ProofingNo',
  1361. tableId: '103001Table1',
  1362. tableName: '打样信息表',
  1363. columnProp: 'proofingNo',
  1364. headerAlign: 'center',
  1365. align: 'center',
  1366. columnLabel: '打样单号',
  1367. columnHidden: false,
  1368. columnImage: false,
  1369. columnSortable: false,
  1370. sortLv: 0,
  1371. status: true,
  1372. fixed: '',
  1373. columnWidth: 120
  1374. },
  1375. {
  1376. userId: this.$store.state.user.name,
  1377. functionId: 103001,
  1378. serialNumber: '103001Table1CustomerNo',
  1379. tableId: '103001Table1',
  1380. tableName: '打样信息表',
  1381. columnProp: 'customerNo',
  1382. headerAlign: 'center',
  1383. align: 'center',
  1384. columnLabel: '客户编码',
  1385. columnHidden: false,
  1386. columnImage: false,
  1387. columnSortable: false,
  1388. sortLv: 0,
  1389. status: true,
  1390. fixed: '',
  1391. columnWidth: 100
  1392. },
  1393. {
  1394. userId: this.$store.state.user.name,
  1395. functionId: 103001,
  1396. serialNumber: '103001Table1CustomerDesc',
  1397. tableId: '103001Table1',
  1398. tableName: '打样信息表',
  1399. columnProp: 'customerDesc',
  1400. headerAlign: 'center',
  1401. align: 'left',
  1402. columnLabel: '客户名称',
  1403. columnHidden: false,
  1404. columnImage: false,
  1405. columnSortable: false,
  1406. sortLv: 0,
  1407. status: true,
  1408. fixed: '',
  1409. columnWidth: 120
  1410. },
  1411. {
  1412. userId: this.$store.state.user.name,
  1413. functionId: 103001,
  1414. serialNumber: '103001Table1ProjectId',
  1415. tableId: '103001Table1',
  1416. tableName: '打样信息表',
  1417. columnProp: 'projectId',
  1418. headerAlign: 'center',
  1419. align: 'center',
  1420. columnLabel: '项目编码',
  1421. columnHidden: false,
  1422. columnImage: false,
  1423. columnSortable: false,
  1424. sortLv: 0,
  1425. status: true,
  1426. fixed: '',
  1427. columnWidth: 110
  1428. },
  1429. {
  1430. userId: this.$store.state.user.name,
  1431. functionId: 103001,
  1432. serialNumber: '103001Table1ProjectName',
  1433. tableId: '103001Table1',
  1434. tableName: '打样信息表',
  1435. columnProp: 'projectName',
  1436. headerAlign: 'center',
  1437. align: 'left',
  1438. columnLabel: '项目名称',
  1439. columnHidden: false,
  1440. columnImage: false,
  1441. columnSortable: false,
  1442. sortLv: 0,
  1443. status: true,
  1444. fixed: '',
  1445. columnWidth: 120
  1446. },
  1447. {
  1448. userId: this.$store.state.user.name,
  1449. functionId: 103001,
  1450. serialNumber: '103001Table1TrackerName',
  1451. tableId: '103001Table1',
  1452. tableName: '打样信息表',
  1453. columnProp: 'trackerName',
  1454. headerAlign: 'center',
  1455. align: 'center',
  1456. columnLabel: 'CS',
  1457. columnHidden: false,
  1458. columnImage: false,
  1459. columnSortable: false,
  1460. sortLv: 0,
  1461. status: true,
  1462. fixed: '',
  1463. columnWidth: 80
  1464. },
  1465. {
  1466. userId: this.$store.state.user.name,
  1467. functionId: 103001,
  1468. serialNumber: '103001Table1EngineerName',
  1469. tableId: '103001Table1',
  1470. tableName: '打样信息表',
  1471. columnProp: 'engineerName',
  1472. headerAlign: 'center',
  1473. align: 'center',
  1474. columnLabel: 'NPI工程师',
  1475. columnHidden: false,
  1476. columnImage: false,
  1477. columnSortable: false,
  1478. sortLv: 0,
  1479. status: true,
  1480. fixed: '',
  1481. columnWidth: 80
  1482. },
  1483. {
  1484. userId: this.$store.state.user.name,
  1485. functionId: 103001,
  1486. serialNumber: '103001Table1EngineerName',
  1487. tableId: '103001Table1',
  1488. tableName: '打样信息表',
  1489. columnProp: 'approverName',
  1490. headerAlign: 'center',
  1491. align: 'center',
  1492. columnLabel: 'Approver',
  1493. columnHidden: false,
  1494. columnImage: false,
  1495. columnSortable: false,
  1496. sortLv: 0,
  1497. status: true,
  1498. fixed: '',
  1499. columnWidth: 80
  1500. },
  1501. {
  1502. userId: this.$store.state.user.name,
  1503. functionId: 103001,
  1504. serialNumber: '103001Table1TestPartNo',
  1505. tableId: '103001Table1',
  1506. tableName: '打样信息表',
  1507. columnProp: 'testPartNo',
  1508. headerAlign: 'center',
  1509. align: 'center',
  1510. columnLabel: '项目料号',
  1511. columnHidden: false,
  1512. columnImage: false,
  1513. columnSortable: false,
  1514. sortLv: 0,
  1515. status: true,
  1516. fixed: '',
  1517. columnWidth: 150
  1518. },
  1519. {
  1520. userId: this.$store.state.user.name,
  1521. functionId: 103001,
  1522. serialNumber: '103001Table1PartName',
  1523. tableId: '103001Table1',
  1524. tableName: '打样信息表',
  1525. columnProp: 'partName',
  1526. headerAlign: 'center',
  1527. align: 'left',
  1528. columnLabel: '物料名称',
  1529. columnHidden: false,
  1530. columnImage: false,
  1531. columnSortable: false,
  1532. sortLv: 0,
  1533. status: true,
  1534. fixed: '',
  1535. columnWidth: 100
  1536. },
  1537. {
  1538. userId: this.$store.state.user.name,
  1539. functionId: 103001,
  1540. serialNumber: '103001Table1PriorityLevel',
  1541. tableId: '103001Table1',
  1542. tableName: '打样信息表',
  1543. columnProp: 'priorityLevel',
  1544. headerAlign: 'center',
  1545. align: 'center',
  1546. columnLabel: '优先等级',
  1547. columnHidden: false,
  1548. columnImage: false,
  1549. columnSortable: false,
  1550. sortLv: 0,
  1551. status: true,
  1552. fixed: '',
  1553. columnWidth: 80
  1554. },
  1555. {
  1556. userId: this.$store.state.user.name,
  1557. functionId: 103001,
  1558. serialNumber: '103001Table1ProofingNumber',
  1559. tableId: '103001Table1',
  1560. tableName: '打样信息表',
  1561. columnProp: 'proofingNumber',
  1562. headerAlign: 'center',
  1563. align: 'right',
  1564. columnLabel: '打样数量',
  1565. columnHidden: false,
  1566. columnImage: false,
  1567. columnSortable: false,
  1568. sortLv: 0,
  1569. status: true,
  1570. fixed: '',
  1571. columnWidth: 80
  1572. },
  1573. {
  1574. userId: this.$store.state.user.name,
  1575. functionId: 103001,
  1576. serialNumber: '103001Table1RequiredDeliveryDate',
  1577. tableId: '103001Table1',
  1578. tableName: '打样信息表',
  1579. columnProp: 'requiredDeliveryDate',
  1580. headerAlign: 'center',
  1581. align: 'center',
  1582. columnLabel: '要求交付日期',
  1583. columnHidden: false,
  1584. columnImage: false,
  1585. columnSortable: false,
  1586. sortLv: 0,
  1587. status: true,
  1588. fixed: '',
  1589. columnWidth: 160
  1590. },
  1591. {
  1592. userId: this.$store.state.user.name,
  1593. functionId: 103001,
  1594. serialNumber: '103001Table1ProofingStatus',
  1595. tableId: '103001Table1',
  1596. tableName: '打样信息表',
  1597. columnProp: 'proofingStatus',
  1598. headerAlign: 'center',
  1599. align: 'left',
  1600. columnLabel: '状态',
  1601. columnHidden: false,
  1602. columnImage: false,
  1603. columnSortable: false,
  1604. sortLv: 0,
  1605. status: true,
  1606. fixed: '',
  1607. columnWidth: 80
  1608. },
  1609. {
  1610. userId: this.$store.state.user.name,
  1611. functionId: 103001,
  1612. serialNumber: '103001Table1NodeName',
  1613. tableId: '103001Table1',
  1614. tableName: '打样信息表',
  1615. columnProp: 'nodeName',
  1616. headerAlign: 'center',
  1617. align: 'left',
  1618. columnLabel: '当前节点',
  1619. columnHidden: false,
  1620. columnImage: false,
  1621. columnSortable: false,
  1622. sortLv: 0,
  1623. status: true,
  1624. fixed: '',
  1625. columnWidth: 150
  1626. },
  1627. {
  1628. userId: this.$store.state.user.name,
  1629. functionId: 103001,
  1630. serialNumber: '103001Table1CreateDate',
  1631. tableId: '103001Table1',
  1632. tableName: '打样信息表',
  1633. columnProp: 'createDate',
  1634. headerAlign: 'center',
  1635. align: 'center',
  1636. columnLabel: '创建时间',
  1637. columnHidden: false,
  1638. columnImage: false,
  1639. columnSortable: false,
  1640. sortLv: 0,
  1641. status: true,
  1642. fixed: '',
  1643. columnWidth: 160
  1644. },
  1645. {
  1646. userId: this.$store.state.user.name,
  1647. functionId: 103001,
  1648. serialNumber: '103001Table1CreateBy',
  1649. tableId: '103001Table1',
  1650. tableName: '打样信息表',
  1651. columnProp: 'createBy',
  1652. headerAlign: 'center',
  1653. align: 'center',
  1654. columnLabel: '创建人',
  1655. columnHidden: false,
  1656. columnImage: false,
  1657. columnSortable: false,
  1658. sortLv: 0,
  1659. status: true,
  1660. fixed: '',
  1661. columnWidth: 80
  1662. },
  1663. {
  1664. userId: this.$store.state.user.name,
  1665. functionId: 103001,
  1666. serialNumber: '103001Table1UpdateDate',
  1667. tableId: '103001Table1',
  1668. tableName: '打样信息表',
  1669. columnProp: 'updateDate',
  1670. headerAlign: 'center',
  1671. align: 'center',
  1672. columnLabel: '更新时间',
  1673. columnHidden: false,
  1674. columnImage: false,
  1675. columnSortable: false,
  1676. sortLv: 0,
  1677. status: true,
  1678. fixed: '',
  1679. columnWidth: 160
  1680. },
  1681. {
  1682. userId: this.$store.state.user.name,
  1683. functionId: 103001,
  1684. serialNumber: '103001Table1UpdateBy',
  1685. tableId: '103001Table1',
  1686. tableName: '打样信息表',
  1687. columnProp: 'updateBy',
  1688. headerAlign: 'center',
  1689. align: 'center',
  1690. columnLabel: '更新人',
  1691. columnHidden: false,
  1692. columnImage: false,
  1693. columnSortable: false,
  1694. sortLv: 0,
  1695. status: true,
  1696. fixed: '',
  1697. columnWidth: 80
  1698. }
  1699. ],
  1700. fileColumnList: [
  1701. {
  1702. userId: this.$store.state.user.name,
  1703. functionId: 103001,
  1704. serialNumber: '103001Table2FileName',
  1705. tableId: '103001Table2',
  1706. tableName: '文件信息表',
  1707. columnProp: 'fileName',
  1708. headerAlign: 'center',
  1709. align: 'center',
  1710. columnLabel: '文件名称',
  1711. columnHidden: false,
  1712. columnImage: false,
  1713. columnSortable: false,
  1714. sortLv: 0,
  1715. status: true,
  1716. fixed: '',
  1717. columnWidth: 140
  1718. },
  1719. {
  1720. userId: this.$store.state.user.name,
  1721. functionId: 103001,
  1722. serialNumber: '103001Table2FileRemark',
  1723. tableId: '103001Table2',
  1724. tableName: '文件信息表',
  1725. columnProp: 'fileRemark',
  1726. headerAlign: 'center',
  1727. align: 'center',
  1728. columnLabel: '备注',
  1729. columnHidden: false,
  1730. columnImage: false,
  1731. columnSortable: false,
  1732. sortLv: 0,
  1733. status: true,
  1734. fixed: '',
  1735. columnWidth: 240
  1736. },
  1737. // {
  1738. // userId: this.$store.state.user.name,
  1739. // functionId: 103001,
  1740. // serialNumber: '103001Table2OrderRef3',
  1741. // tableId: '103001Table2',
  1742. // tableName: '文件信息表',
  1743. // columnProp: 'orderRef3',
  1744. // headerAlign: 'center',
  1745. // align: 'center',
  1746. // columnLabel: '文件描述',
  1747. // columnHidden: false,
  1748. // columnImage: false,
  1749. // columnSortable: false,
  1750. // sortLv: 0,
  1751. // status: true,
  1752. // fixed: '',
  1753. // columnWidth: 120
  1754. // },
  1755. {
  1756. userId: this.$store.state.user.name,
  1757. functionId: 103001,
  1758. serialNumber: '103001Table2CreateDate',
  1759. tableId: '103001Table2',
  1760. tableName: '文件信息表',
  1761. columnProp: 'createDate',
  1762. headerAlign: 'center',
  1763. align: 'center',
  1764. columnLabel: '上传时间',
  1765. columnHidden: false,
  1766. columnImage: false,
  1767. columnSortable: false,
  1768. sortLv: 0,
  1769. status: true,
  1770. fixed: '',
  1771. columnWidth: 140
  1772. },
  1773. {
  1774. userId: this.$store.state.user.name,
  1775. functionId: 103001,
  1776. serialNumber: '103001Table2CreatedBy',
  1777. tableId: '103001Table2',
  1778. tableName: '文件信息表',
  1779. columnProp: 'createdBy',
  1780. headerAlign: 'center',
  1781. align: 'center',
  1782. columnLabel: '上传人',
  1783. columnHidden: false,
  1784. columnImage: false,
  1785. columnSortable: false,
  1786. sortLv: 0,
  1787. status: true,
  1788. fixed: '',
  1789. columnWidth: 140
  1790. }
  1791. ],
  1792. projectPartDetailList: [
  1793. {
  1794. userId: this.$store.state.user.name,
  1795. functionId: 102001,
  1796. serialNumber: '102001Table3TestPartNo',
  1797. tableId: '102001Table3',
  1798. tableName: '项目物料表',
  1799. columnProp: 'testPartNo',
  1800. headerAlign: 'center',
  1801. align: 'center',
  1802. columnLabel: '产品编码',
  1803. columnHidden: false,
  1804. columnImage: false,
  1805. columnSortable: false,
  1806. sortLv: 0,
  1807. status: true,
  1808. fixed: '',
  1809. columnWidth: 150
  1810. },
  1811. {
  1812. userId: this.$store.state.user.name,
  1813. functionId: 102001,
  1814. serialNumber: '102001Table3PartDesc',
  1815. tableId: '102001Table3',
  1816. tableName: '项目物料表',
  1817. columnProp: 'partDesc',
  1818. headerAlign: 'center',
  1819. align: 'center',
  1820. columnLabel: '产品名称',
  1821. columnHidden: false,
  1822. columnImage: false,
  1823. columnSortable: false,
  1824. sortLv: 0,
  1825. status: true,
  1826. fixed: '',
  1827. columnWidth: 120
  1828. }, {
  1829. userId: this.$store.state.user.name,
  1830. functionId: 102001,
  1831. serialNumber: '102001Table3PartSpec',
  1832. tableId: '102001Table3',
  1833. tableName: '项目物料表',
  1834. columnProp: 'partSpec',
  1835. headerAlign: 'center',
  1836. align: 'center',
  1837. columnLabel: '产品规格',
  1838. columnHidden: false,
  1839. columnImage: false,
  1840. columnSortable: false,
  1841. sortLv: 0,
  1842. status: true,
  1843. fixed: '',
  1844. columnWidth: 120
  1845. }, {
  1846. userId: this.$store.state.user.name,
  1847. functionId: 102001,
  1848. serialNumber: '102001Table3PartTypeDesc',
  1849. tableId: '102001Table3',
  1850. tableName: '项目物料表',
  1851. columnProp: 'partTypeDesc',
  1852. headerAlign: 'center',
  1853. align: 'center',
  1854. columnLabel: '产品类型',
  1855. columnHidden: false,
  1856. columnImage: false,
  1857. columnSortable: false,
  1858. sortLv: 0,
  1859. status: true,
  1860. fixed: '',
  1861. columnWidth: 120
  1862. },
  1863. {
  1864. userId: this.$store.state.user.name,
  1865. functionId: 102001,
  1866. serialNumber: '102001Table3Type',
  1867. tableId: '102001Table3',
  1868. tableName: '项目物料表',
  1869. columnProp: 'type',
  1870. headerAlign: 'center',
  1871. align: 'center',
  1872. columnLabel: '制造类型',
  1873. columnHidden: false,
  1874. columnImage: false,
  1875. columnSortable: false,
  1876. sortLv: 0,
  1877. status: true,
  1878. fixed: '',
  1879. columnWidth: 120
  1880. },
  1881. {
  1882. userId: this.$store.state.user.name,
  1883. functionId: 102001,
  1884. serialNumber: '102001Table3UmId',
  1885. tableId: '102001Table3',
  1886. tableName: '项目物料表',
  1887. columnProp: 'umId',
  1888. headerAlign: 'center',
  1889. align: 'center',
  1890. columnLabel: '单位',
  1891. columnHidden: false,
  1892. columnImage: false,
  1893. columnSortable: false,
  1894. sortLv: 0,
  1895. status: true,
  1896. fixed: '',
  1897. columnWidth: 100
  1898. },
  1899. {
  1900. userId: this.$store.state.user.name,
  1901. functionId: 102001,
  1902. serialNumber: '102001Table3CodeNo',
  1903. tableId: '102001Table3',
  1904. tableName: '项目物料表',
  1905. columnProp: 'codeNo',
  1906. headerAlign: 'center',
  1907. align: 'center',
  1908. columnLabel: '模板编码',
  1909. columnHidden: false,
  1910. columnImage: false,
  1911. columnSortable: false,
  1912. sortLv: 0,
  1913. status: true,
  1914. fixed: '',
  1915. columnWidth: 120
  1916. }, {
  1917. userId: this.$store.state.user.name,
  1918. functionId: 102001,
  1919. serialNumber: '102001Table3CodeDesc',
  1920. tableId: '102001Table3',
  1921. tableName: '项目物料表',
  1922. columnProp: 'codeDesc',
  1923. headerAlign: 'center',
  1924. align: 'center',
  1925. columnLabel: '模板名称',
  1926. columnHidden: false,
  1927. columnImage: false,
  1928. columnSortable: false,
  1929. sortLv: 0,
  1930. status: true,
  1931. fixed: '',
  1932. columnWidth: 120
  1933. }
  1934. ],
  1935. columnAddressList: [
  1936. {
  1937. userId: this.$store.state.user.name,
  1938. functionId: 103001,
  1939. serialNumber: '103001Table4AddressName',
  1940. tableId: '103001Table4',
  1941. tableName: '联系地址表',
  1942. columnProp: 'addressName',
  1943. headerAlign: 'center',
  1944. align: 'center',
  1945. columnLabel: '联系地址',
  1946. columnHidden: false,
  1947. columnImage: false,
  1948. status: true,
  1949. fixed: '',
  1950. },
  1951. {
  1952. userId: this.$store.state.user.name,
  1953. functionId: 103001,
  1954. serialNumber: '103001Table4ContactStatus',
  1955. tableId: '103001Table4',
  1956. tableName: '联系地址表',
  1957. columnProp: 'addressStatus',
  1958. headerAlign: 'center',
  1959. align: 'center',
  1960. columnLabel: '地址状态',
  1961. columnHidden: false,
  1962. columnImage: false,
  1963. status: true,
  1964. fixed: '',
  1965. },
  1966. ],
  1967. columnContactList: [
  1968. {
  1969. userId: this.$store.state.user.name,
  1970. functionId: 103001,
  1971. serialNumber: '103001Table5ContactName',
  1972. tableId: '103001Table5',
  1973. tableName: '客户联系人表',
  1974. columnProp: 'contactName',
  1975. headerAlign: 'center',
  1976. align: 'center',
  1977. columnLabel: '客户负责人',
  1978. columnHidden: false,
  1979. columnImage: false,
  1980. status: true,
  1981. fixed: '',
  1982. },
  1983. {
  1984. userId: this.$store.state.user.name,
  1985. functionId: 103001,
  1986. serialNumber: '103001Table5ContactPhoneNumber1',
  1987. tableId: '103001Table5',
  1988. tableName: '客户联系人表',
  1989. columnProp: 'contactPhoneNumber1',
  1990. headerAlign: 'center',
  1991. align: 'center',
  1992. columnLabel: '联系方式',
  1993. columnHidden: false,
  1994. columnImage: false,
  1995. status: true,
  1996. fixed: '',
  1997. },
  1998. {
  1999. userId: this.$store.state.user.name,
  2000. functionId: 103001,
  2001. serialNumber: '103001Table5PrimaryContact',
  2002. tableId: '103001Table5',
  2003. tableName: '客户联系人表',
  2004. columnProp: 'primaryContact',
  2005. headerAlign: 'center',
  2006. align: 'center',
  2007. columnLabel: '默认联系人',
  2008. columnHidden: false,
  2009. columnImage: false,
  2010. status: true,
  2011. fixed: '',
  2012. },
  2013. {
  2014. userId: this.$store.state.user.name,
  2015. functionId: 103001,
  2016. serialNumber: '103001Table5ContactStatus',
  2017. tableId: '103001Table5',
  2018. tableName: '客户联系人表',
  2019. columnProp: 'contactStatus',
  2020. headerAlign: 'center',
  2021. align: 'center',
  2022. columnLabel: '人员状态',
  2023. columnHidden: false,
  2024. columnImage: false,
  2025. status: true,
  2026. fixed: '',
  2027. },
  2028. ],
  2029. // ======== 必填规则 ========
  2030. rules: {
  2031. customerNo: [
  2032. {
  2033. required: true,
  2034. message: ' ',
  2035. trigger: ['change', 'blur']
  2036. }
  2037. ],
  2038. trackerName: [
  2039. {
  2040. required: true,
  2041. message: ' ',
  2042. trigger: ['change', 'blur']
  2043. }
  2044. ],
  2045. proofingNumber: [
  2046. {
  2047. required: true,
  2048. message: ' ',
  2049. trigger: ['change', 'blur']
  2050. }
  2051. ],
  2052. projectId: [
  2053. {
  2054. required: true,
  2055. message: ' ',
  2056. trigger: ['change', 'blur']
  2057. }
  2058. ],
  2059. engineerName: [
  2060. {
  2061. required: true,
  2062. message: ' ',
  2063. trigger: ['change', 'blur']
  2064. }
  2065. ],
  2066. partName: [
  2067. {
  2068. required: true,
  2069. message: ' ',
  2070. trigger: ['change', 'blur']
  2071. }
  2072. ],
  2073. priorityLevel: [
  2074. {
  2075. required: true,
  2076. message: ' ',
  2077. trigger: ['change', 'blur']
  2078. }
  2079. ],
  2080. requiredDeliveryDate: [
  2081. {
  2082. required: true,
  2083. message: ' ',
  2084. trigger: ['change', 'blur']
  2085. }
  2086. ]
  2087. },
  2088. enterResultRules: {
  2089. actualityDeliveryDate: [
  2090. {
  2091. required: true,
  2092. message: ' ',
  2093. trigger: 'change'
  2094. }
  2095. ],
  2096. proofingResultInformation: [
  2097. {
  2098. required: true,
  2099. message: ' ',
  2100. trigger: 'change'
  2101. }
  2102. ]
  2103. },
  2104. submitResultRules: {
  2105. actualitySendSamplesDate: [
  2106. {
  2107. required: true,
  2108. message: ' ',
  2109. trigger: 'change'
  2110. }
  2111. ],
  2112. sendSamplesMethod: [
  2113. {
  2114. required: true,
  2115. message: ' ',
  2116. trigger: 'change'
  2117. }
  2118. ]
  2119. },
  2120. customerResponseRules: {
  2121. actualityReplyDate: [
  2122. {
  2123. required: true,
  2124. message: ' ',
  2125. trigger: 'change'
  2126. }
  2127. ],
  2128. confirmResults: [
  2129. {
  2130. required: true,
  2131. message: ' ',
  2132. trigger: 'change'
  2133. }
  2134. ],
  2135. confirmBy: [
  2136. {
  2137. required: true,
  2138. message: ' ',
  2139. trigger: 'change'
  2140. }
  2141. ]
  2142. },
  2143. // ======== 复选数据集 ========
  2144. proofingSelections: [],
  2145. projectPartListSelections: [],
  2146. // ======== 选中的当前行数据 ========
  2147. proofingCurrentRow: {},
  2148. // ======== 模态框开关控制 ========
  2149. modalFlag: false,
  2150. modalDisableFlag: false,
  2151. enterResultModalFlag: false,
  2152. submitResultModalFlag: false,
  2153. customerResponseModalFlag: false,
  2154. // 选择项目弹框开关
  2155. chooseProjectListFlag: false,
  2156. //项目搜索条件
  2157. searchProjectData: {
  2158. site: this.$store.state.user.site,
  2159. projectId: undefined,
  2160. projectName: undefined,
  2161. customerId: undefined,
  2162. },
  2163. // 项目集合
  2164. projectList: [],
  2165. addressModelFlag: false,
  2166. contactModelFlag: false,
  2167. columnFieldList1: [],
  2168. columnFieldList2: [],
  2169. ossColumns:[
  2170. {
  2171. userId: this.$store.state.user.name,
  2172. functionId: 103001,
  2173. serialNumber: '103001Table2FileName',
  2174. tableId: '103001Table2',
  2175. tableName: '文件信息表',
  2176. columnProp: 'fileName',
  2177. headerAlign: 'center',
  2178. align: 'center',
  2179. columnLabel: '文件名称',
  2180. columnHidden: false,
  2181. columnImage: false,
  2182. columnSortable: false,
  2183. sortLv: 0,
  2184. status: true,
  2185. fixed: '',
  2186. columnWidth: 140
  2187. },
  2188. {
  2189. userId: this.$store.state.user.name,
  2190. functionId: 103001,
  2191. serialNumber: '103001Table2FileRemark',
  2192. tableId: '103001Table2',
  2193. tableName: '文件信息表',
  2194. columnProp: 'fileRemark',
  2195. headerAlign: 'center',
  2196. align: 'center',
  2197. columnLabel: '备注',
  2198. columnHidden: false,
  2199. columnImage: false,
  2200. columnSortable: false,
  2201. sortLv: 0,
  2202. status: true,
  2203. fixed: '',
  2204. columnWidth: 240
  2205. },
  2206. // {
  2207. // userId: this.$store.state.user.name,
  2208. // functionId: 103001,
  2209. // serialNumber: '103001Table2OrderRef3',
  2210. // tableId: '103001Table2',
  2211. // tableName: '文件信息表',
  2212. // columnProp: 'orderRef3',
  2213. // headerAlign: 'center',
  2214. // align: 'center',
  2215. // columnLabel: '文件描述',
  2216. // columnHidden: false,
  2217. // columnImage: false,
  2218. // columnSortable: false,
  2219. // sortLv: 0,
  2220. // status: true,
  2221. // fixed: '',
  2222. // columnWidth: 120
  2223. // },
  2224. {
  2225. userId: this.$store.state.user.name,
  2226. functionId: 103001,
  2227. serialNumber: '103001Table2CreateDate',
  2228. tableId: '103001Table2',
  2229. tableName: '文件信息表',
  2230. columnProp: 'createDate',
  2231. headerAlign: 'center',
  2232. align: 'center',
  2233. columnLabel: '上传时间',
  2234. columnHidden: false,
  2235. columnImage: false,
  2236. columnSortable: false,
  2237. sortLv: 0,
  2238. status: true,
  2239. fixed: '',
  2240. columnWidth: 140
  2241. },
  2242. {
  2243. userId: this.$store.state.user.name,
  2244. functionId: 103001,
  2245. serialNumber: '103001Table2CreatedBy',
  2246. tableId: '103001Table2',
  2247. tableName: '文件信息表',
  2248. columnProp: 'createBy',
  2249. headerAlign: 'center',
  2250. align: 'center',
  2251. columnLabel: '上传人',
  2252. columnHidden: false,
  2253. columnImage: false,
  2254. columnSortable: false,
  2255. sortLv: 0,
  2256. status: true,
  2257. fixed: '',
  2258. columnWidth: 140
  2259. }
  2260. ],
  2261. }
  2262. },
  2263. mounted() {
  2264. this.$nextTick(() => {
  2265. this.height = window.innerHeight / 2 - 80;
  2266. /*第二个表格高度的动态调整*/
  2267. this.secondHeight = window.innerHeight / 2 - 206;
  2268. })
  2269. },
  2270. created() {
  2271. if (this.$route.params.type){
  2272. let params = {
  2273. site: this.$route.params.site,
  2274. proofingNo: this.$route.params.docNo,
  2275. limit: this.pageSize,
  2276. page : 1,
  2277. }
  2278. this.dataListLoading = true
  2279. proofingInformationSearch(params).then(({data}) => {
  2280. if (data && data.code === 0) {
  2281. this.dataList = data.page.list
  2282. this.totalPage = data.page.totalCount
  2283. this.$refs.selectDiv.setLengthAll(this.dataList.length)
  2284. // 判断是否全部存在数据
  2285. if (this.totalPage > 0) {
  2286. //设置选中行
  2287. this.$refs.proofingTable.setCurrentRow(this.dataList[0])
  2288. //加载当前的页签的table
  2289. this.refreshCurrentTabTable()
  2290. this.proofingClickRow(this.dataList[0])
  2291. this.updateModal(this.dataList[0])
  2292. } else {
  2293. //设置选中行
  2294. this.$refs.proofingTable.setCurrentRow({})
  2295. // 加载当前的页签的table
  2296. this.refreshCurrentTabTable()
  2297. this.testClickRow({})
  2298. }
  2299. }
  2300. this.dataListLoading = false
  2301. })
  2302. }
  2303. this.getDataList();
  2304. },
  2305. activated() {
  2306. if (this.$route.params.proofingNo){
  2307. this.searchData.proofingNo = this.$route.params.proofingNo
  2308. this.getDataList();
  2309. setTimeout(()=>{
  2310. this.searchData.proofingNo = ''
  2311. },200)
  2312. }
  2313. },
  2314. methods: {
  2315. // ======== 分页相关方法 ========
  2316. /**
  2317. * 每页数
  2318. * @param val
  2319. */
  2320. sizeChangeHandle(val) {
  2321. this.pageSize = val
  2322. this.pageIndex = 1
  2323. this.getDataList()
  2324. },
  2325. /**
  2326. * 当前页
  2327. * @param val
  2328. */
  2329. currentChangeHandle(val) {
  2330. this.pageIndex = val
  2331. this.getDataList()
  2332. },
  2333. // ======== 复选框操作相关方法 ========
  2334. /**
  2335. * 选中一行
  2336. * @param row
  2337. */
  2338. projectPartClickRow(row) {
  2339. if (this.modalData.flag === '1') {
  2340. this.$refs.projectPartTable.toggleRowSelection(row);
  2341. this.confirmProjectPart();
  2342. }
  2343. },
  2344. /**
  2345. * 多选
  2346. * @param val
  2347. */
  2348. selectionProjectPart(val) {
  2349. this.projectPartListSelections = val
  2350. },
  2351. /**
  2352. * 获取唯一值一般都为 id
  2353. * @param row
  2354. * @returns {*}
  2355. */
  2356. getRowKeys(row) {
  2357. return row.testPartNo;
  2358. },
  2359. /**
  2360. * 未知
  2361. * @returns {boolean}
  2362. */
  2363. selectFlag() {
  2364. return true;
  2365. },
  2366. // ======== 页签切换相关方法 ========
  2367. /**
  2368. * 列表表格选择替换
  2369. * @param tab
  2370. * @param event
  2371. */
  2372. tabClick(tab, event) {
  2373. // 刷新列表数据
  2374. this.refreshCurrentTabTable()
  2375. },
  2376. /**
  2377. * 当前值发生变化的时候修改
  2378. * @param row
  2379. * @param oldRow
  2380. */
  2381. changeCurrentRow(row, oldRow) {
  2382. // 判断是否是获取焦点的事件
  2383. if (row) {
  2384. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  2385. //刷新当前页表
  2386. this.refreshCurrentTabTable()
  2387. }
  2388. },
  2389. /**
  2390. * 刷新页签的table数据
  2391. */
  2392. refreshCurrentTabTable() {
  2393. if (this.activeTable === 'proofing_result') {
  2394. this.getProofingResult()
  2395. } else if (this.activeTable === 'project_information') {
  2396. this.getProjectInformation()
  2397. } else if (this.activeTable === 'customer_information') {
  2398. this.getCustomerInformation()
  2399. }
  2400. // else if (this.activeTable === 'proofing_file') {
  2401. // this.getProofingFile()
  2402. // }
  2403. },
  2404. // getProofingFile(){
  2405. //
  2406. // },
  2407. // ======== 列表数据刷新方法 ========
  2408. /**
  2409. * 获取数据列表
  2410. */
  2411. getDataList() {
  2412. if (localStorage.getItem('proofingData') != undefined) {
  2413. let data = JSON.parse(localStorage.getItem('proofingData'));
  2414. this.searchData.proofingNo = data.proofingNo
  2415. localStorage.removeItem('proofingData');
  2416. }
  2417. this.searchData.limit = this.pageSize
  2418. this.searchData.page = this.pageIndex
  2419. proofingInformationSearch(this.searchData).then(({data}) => {
  2420. if (data.code === 0) {
  2421. this.dataList = data.page.list
  2422. this.pageIndex = data.page.currPage
  2423. this.pageSize = data.page.pageSize
  2424. this.totalPage = data.page.totalCount
  2425. this.$refs.selectDiv.setLengthAll(this.dataList.length)
  2426. // 判断是否全部存在数据
  2427. if (this.totalPage > 0) {
  2428. //设置选中行
  2429. this.$refs.proofingTable.setCurrentRow(this.dataList[0])
  2430. //加载当前的页签的table
  2431. this.refreshCurrentTabTable()
  2432. this.proofingClickRow(this.dataList[0])
  2433. } else {
  2434. //设置选中行
  2435. this.$refs.proofingTable.setCurrentRow({})
  2436. // 加载当前的页签的table
  2437. this.refreshCurrentTabTable()
  2438. this.testClickRow({})
  2439. }
  2440. }
  2441. this.dataListLoading = false
  2442. })
  2443. },
  2444. /**
  2445. * 获取打样结果列表
  2446. */
  2447. getProofingResult() {
  2448. let tempData = {
  2449. site: this.$store.state.user.site,
  2450. proofingNo: this.proofingCurrentRow.proofingNo
  2451. }
  2452. // 打样结果对象
  2453. proofingResultSearch(tempData).then(({data}) => {
  2454. if (data && data.code === 0) {
  2455. this.proofingResultData = data.rows[0]
  2456. } else {
  2457. this.proofingResultData = {}
  2458. }
  2459. })
  2460. // 附件列表
  2461. this.getFileContentData()
  2462. },
  2463. /**
  2464. * 获取项目信息
  2465. */
  2466. getProjectInformation() {
  2467. let tempData = {
  2468. site: this.$store.state.user.site,
  2469. projectId: this.proofingCurrentRow.projectId
  2470. }
  2471. // 报价结果对象
  2472. getProjectInformation(tempData).then(({data}) => {
  2473. if (data && data.code === 0) {
  2474. this.projectInformationData = data.rows[0]
  2475. } else {
  2476. this.projectInformationData = {}
  2477. }
  2478. })
  2479. },
  2480. /**
  2481. * 获取客户信息
  2482. */
  2483. getCustomerInformation() {
  2484. let tempData = {
  2485. site: this.$store.state.user.site,
  2486. customerNo: this.proofingCurrentRow.customerNo
  2487. }
  2488. // 报价结果对象
  2489. getCustomerInformation(tempData).then(({data}) => {
  2490. if (data && data.code === 0) {
  2491. this.customerInformationData = data.rows[0]
  2492. } else {
  2493. this.customerInformationData = {}
  2494. }
  2495. })
  2496. },
  2497. // ======== 新增/编辑模态框 ========
  2498. /**
  2499. * 报价信息新增模态框
  2500. */
  2501. addModal () {
  2502. this.searchDelegateAccessByUser();
  2503. this.modalDisableFlag = false
  2504. this.modalFlag = true
  2505. },
  2506. /**
  2507. * 报价信息编辑模态框
  2508. * @param row
  2509. */
  2510. async updateModal (row) {
  2511. await this.getNodeAuthority(row)
  2512. this.modalData = {
  2513. flag: '2',
  2514. title: '打样编辑-'+row.proofingNo,
  2515. site: row.site,
  2516. proofingNo: row.proofingNo,
  2517. customerNo: row.customerNo,
  2518. customerDesc: row.customerDesc,
  2519. projectId: row.projectId,
  2520. projectName: row.projectName,
  2521. tracker: row.tracker,
  2522. trackerName: row.trackerName,
  2523. testPartNo: row.testPartNo,
  2524. partName: row.partName,
  2525. engineer: row.engineer,
  2526. engineerName: row.engineerName,
  2527. approver: row.approver,
  2528. approverName: row.approverName,
  2529. priorityLevel: row.priorityLevel,
  2530. proofingNumber: row.proofingNumber,
  2531. requiredDeliveryDate: row.requiredDeliveryDate,
  2532. remark: row.remark,
  2533. technicalConsiderations: row.technicalConsiderations,
  2534. isNeedToSendSamples: row.isNeedToSendSamples,
  2535. sendSamplesAddress: row.sendSamplesAddress,
  2536. consignee: row.consignee,
  2537. consigneeContact: row.consigneeContact,
  2538. actualityDeliveryDate: row.actualityDeliveryDate,
  2539. proofingResultInformation: row.proofingResultInformation,
  2540. actualitySendSamplesDate: row.actualitySendSamplesDate,
  2541. sendSamplesMethod: row.sendSamplesMethod,
  2542. deliverGoodsInformation: row.deliverGoodsInformation,
  2543. deliverGoodsRemark: row.deliverGoodsRemark,
  2544. actualityReplyDate: row.actualityReplyDate,
  2545. confirmResults: row.confirmResults,
  2546. confirmBy: row.confirmBy,
  2547. confirmInformation: row.confirmInformation,
  2548. proofingStatus: row.proofingStatus,
  2549. proofingResultStatus: row.proofingResultStatus,
  2550. nextToDo: row.nextToDo,
  2551. updateBy: this.$store.state.user.name,
  2552. nodeConclusion: '',
  2553. stepId: row.stepId,
  2554. rejectFlag: row.rejectFlag,
  2555. rejectStepId: row.rejectStepId,
  2556. isReject: row.isReject
  2557. }
  2558. this.searchDelegateAccessByUser();
  2559. this.modalDisableFlag = true
  2560. this.modalFlag = true
  2561. },
  2562. // ======== 新增/编辑/删除方法 ========
  2563. /**
  2564. * 获取项目物料列表
  2565. */
  2566. openModalDialog() {
  2567. if (this.modalData.proofingNo) {
  2568. this.searchDelegateAccess();
  2569. }
  2570. this.getProjectPartList();
  2571. },
  2572. getProjectPartList() {
  2573. if (!this.modalData.projectId) {
  2574. this.projectPartList = [];
  2575. return
  2576. }
  2577. // 先清空缓存选中
  2578. this.$nextTick(() => this.$refs.projectPartTable.clearSelection())
  2579. // 拿到选中的产品编号
  2580. let projectPartList = this.modalData.testPartNo.split(';')
  2581. this.projectPartData.projectId = this.modalData.projectId;
  2582. // 查询所有项目物料
  2583. getProjectPartList(this.projectPartData).then(({data}) => {
  2584. if (data && data.code === 0) {
  2585. this.projectPartList = data.rows
  2586. this.projectPartList.forEach(val => {
  2587. // 回显选中的项目物料
  2588. if (projectPartList.includes(val.testPartNo)) {
  2589. this.$nextTick(() => this.$refs.projectPartTable.toggleRowSelection(val, true))
  2590. }
  2591. })
  2592. // this.projectPartModelFlag = true
  2593. } else {
  2594. this.$alert(data.msg, '错误', {
  2595. confirmButtonText: '确定'
  2596. })
  2597. }
  2598. })
  2599. },
  2600. /**
  2601. * 确认多选项目物料
  2602. */
  2603. confirmProjectPart() {
  2604. this.modalData.testPartNo = ''
  2605. this.modalData.partName = ''
  2606. for (let i = 0; i < this.projectPartListSelections.length; i++) {
  2607. this.modalData.testPartNo = this.modalData.testPartNo + ";" + this.projectPartListSelections[i].testPartNo
  2608. this.modalData.partName = this.modalData.partName + ";" + this.projectPartListSelections[i].partName
  2609. }
  2610. this.modalData.testPartNo = this.modalData.testPartNo.substring(1)
  2611. this.modalData.partName = this.modalData.partName.substring(1)
  2612. this.projectPartModelFlag = false
  2613. },
  2614. /**
  2615. * 客户信息新增/编辑
  2616. */
  2617. saveData() {
  2618. this.$refs.modalForm.validate((valid) => {
  2619. if (!valid) {
  2620. this.validateDataValue()
  2621. } else {
  2622. if (this.projectPartListSelections.length <= 0) {
  2623. this.$message.warning('请选择项目料号')
  2624. return
  2625. }
  2626. if(this.modalData.trackerName==''||this.modalData.trackerName==null){
  2627. this.$message.warning('请选择CS')
  2628. return
  2629. }
  2630. if(this.modalData.engineerName==''||this.modalData.engineerName==null){
  2631. this.$message.warning('请选择NPI工程师')
  2632. return
  2633. }
  2634. if(this.modalData.approverName==''||this.modalData.approverName==null){
  2635. this.$message.warning('请选择Approver')
  2636. return
  2637. }
  2638. if(this.delegateAccessName==''||this.delegateAccessName==null){
  2639. this.$message.warning('请选择DelegateAccess')
  2640. return
  2641. }
  2642. this.confirmProjectPart();
  2643. // 将选中的 人员信息添加到请求
  2644. this.modalData.delegateAccessList = this.selectionDelegateAccess
  2645. if (this.modalData.flag === '1') {
  2646. this.saveProofing()
  2647. } else {
  2648. this.updateProofing()
  2649. }
  2650. }
  2651. })
  2652. },
  2653. updateProofing() {
  2654. proofingInformationEdit(this.modalData).then(({data}) => {
  2655. if (data && data.code === 0) {
  2656. this.getDataList()
  2657. this.modalFlag = false
  2658. this.$message({
  2659. message: '操作成功',
  2660. type: 'success',
  2661. duration: 1500,
  2662. onClose: () => {
  2663. }
  2664. })
  2665. } else {
  2666. this.$alert(data.msg, '错误', {
  2667. confirmButtonText: '确定'
  2668. })
  2669. }
  2670. })
  2671. },
  2672. saveProofing() {
  2673. proofingInformationSave(this.modalData).then(({data}) => {
  2674. if (data && data.code === 0) {
  2675. this.getDataList()
  2676. this.modalFlag = false
  2677. this.$message({
  2678. message: '操作成功',
  2679. type: 'success',
  2680. duration: 1500,
  2681. onClose: () => {
  2682. }
  2683. })
  2684. } else {
  2685. this.$alert(data.msg, '错误', {
  2686. confirmButtonText: '确定'
  2687. })
  2688. }
  2689. })
  2690. },
  2691. /**
  2692. * 验证必填项
  2693. */
  2694. validateDataValue() {
  2695. if (this.modalData.customerNo === '' || this.modalData.customerNo == null) {
  2696. this.$message.warning('请选择客户编码!')
  2697. return
  2698. }
  2699. if (this.modalData.customerDesc === '' || this.modalData.customerDesc == null) {
  2700. this.$message.warning('请选择客户名称!')
  2701. return
  2702. }
  2703. if (this.modalData.tracker === '' || this.modalData.tracker == null) {
  2704. this.$message.warning('请选择跟单员编码!')
  2705. return
  2706. }
  2707. if (this.modalData.trackerName === '' || this.modalData.trackerName == null) {
  2708. this.$message.warning('请选择跟单员名称!')
  2709. return
  2710. }
  2711. if (this.modalData.projectId === '' || this.modalData.projectId == null) {
  2712. this.$message.warning('请选择项目编码!')
  2713. return
  2714. }
  2715. if (this.modalData.projectName === '' || this.modalData.projectName == null) {
  2716. this.$message.warning('请选择项目名称!')
  2717. return
  2718. }
  2719. // if (this.modalData.engineer === '' || this.modalData.engineer == null) {
  2720. // this.$message.warning('请选择工程师编码!')
  2721. // return
  2722. // }
  2723. // if (this.modalData.engineerName === '' || this.modalData.engineerName == null) {
  2724. // this.$message.warning('请选择工程师名称!')
  2725. // return
  2726. // }
  2727. if (!this.modalData.proofingNumber && this.modalData.proofingNumber > 0) {
  2728. this.$message.warning('请输入正确的打样数量!')
  2729. return
  2730. }
  2731. // if (this.modalData.priorityLevel === '' || this.modalData.priorityLevel == null) {
  2732. // this.$message.warning('请选择优先等级!')
  2733. // return
  2734. // }
  2735. if (!this.modalData.requiredDeliveryDate) {
  2736. this.$message.warning('请输入要求交付日期!')
  2737. return
  2738. }
  2739. },
  2740. /**
  2741. * 打样信息删除
  2742. */
  2743. delModal() {
  2744. if (this.proofingSelections.length === 0) {
  2745. this.$message.warning('请勾选要删除的打样信息!')
  2746. return
  2747. }
  2748. this.$confirm(`是否删除这 ` + this.proofingSelections.length + ` 条打样信息?`, '提示', {
  2749. confirmButtonText: '确定',
  2750. cancelButtonText: '取消',
  2751. type: 'warning'
  2752. }).then(() => {
  2753. let tempData = {
  2754. informationList: this.proofingSelections
  2755. }
  2756. proofingInformationDelete(tempData).then(({data}) => {
  2757. if (data && data.code === 0) {
  2758. this.getDataList()
  2759. this.proofingSelections = []
  2760. this.$message({
  2761. message: '操作成功',
  2762. type: 'success',
  2763. duration: 1500,
  2764. onClose: () => {
  2765. }
  2766. })
  2767. } else {
  2768. this.$alert(data.msg, '错误', {
  2769. confirmButtonText: '确定'
  2770. })
  2771. }
  2772. })
  2773. }).catch(() => {
  2774. })
  2775. },
  2776. // ======== 列表操作方法 ========
  2777. /**
  2778. * 单机选中报价信息
  2779. * @param row
  2780. */
  2781. proofingClickRow(row) {
  2782. // this.$refs.proofingTable.toggleRowSelection(row)
  2783. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  2784. this.proofingDetailData = JSON.parse(JSON.stringify(row))
  2785. },
  2786. /**
  2787. * 复选报价信息
  2788. * @param val
  2789. */
  2790. selectionProofing(val) {
  2791. this.proofingSelections = val
  2792. this.$refs.selectDiv.setLengthselected(this.proofingSelections.length)
  2793. },
  2794. // ======== 报价结果相关方法 ========
  2795. /**
  2796. * 封装录入方法
  2797. */
  2798. packProofingResultModal() {
  2799. // 重置对象
  2800. this.enterResultData = {
  2801. site: this.$store.state.user.site,
  2802. proofingNo: '',
  2803. actualityDeliveryDate: new Date(),
  2804. proofingResultInformation: '',
  2805. proofingResultStatus: 'E',
  2806. fileContentList: [],
  2807. updateBy: this.$store.state.user.name
  2808. }
  2809. // 获得选中的打样号
  2810. // if (this.proofingSelections.length > 0) {
  2811. // this.proofingSelections.forEach(val => {
  2812. // this.enterResultData.proofingNo += ';' + val.proofingNo
  2813. // })
  2814. // this.enterResultData.proofingNo = this.enterResultData.proofingNo.substring(1)
  2815. // } else {
  2816. // this.enterResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2817. // }
  2818. this.enterResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2819. // // 获得这些打样号的全部附件
  2820. // this.getFileContentList()
  2821. this.enterResultModalFlag = true
  2822. },
  2823. /**
  2824. * 录入打样结果
  2825. */
  2826. proofingResultModal() {
  2827. // // 如果有选中打样单
  2828. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  2829. // let tempData = {
  2830. // currentStatus: 'C',
  2831. // informationList: this.proofingSelections,
  2832. // }
  2833. // // 检查打样单状态
  2834. // checkProofingStatus(tempData).then(({data}) => {
  2835. // if (data && data.code === 0) {
  2836. // if (data.flag === 1) { // 状态一致
  2837. // this.packProofingResultModal()
  2838. // } else { // 状态不同
  2839. // this.$message.warning('选中的打样单进度有误,请确认!')
  2840. // }
  2841. // } else {
  2842. // this.$alert(data.msg, '错误', {
  2843. // confirmButtonText: '确定'
  2844. // })
  2845. // }
  2846. // })
  2847. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  2848. // this.packProofingResultModal()
  2849. // }
  2850. this.packProofingResultModal()
  2851. },
  2852. /**
  2853. * 保存打样结果
  2854. */
  2855. saveProofingResult() {
  2856. if (this.enterResultData.actualityDeliveryDate === '' || this.enterResultData.actualityDeliveryDate == null) {
  2857. this.$message.warning('请选择实际交付日期!')
  2858. return
  2859. }
  2860. if (this.enterResultData.proofingResultInformation === '' || this.enterResultData.proofingResultInformation == null) {
  2861. this.$message.warning('请填写打样结果信息!')
  2862. return
  2863. }
  2864. // if (this.proofingSelections.length > 1) {
  2865. // this.$confirm(`是否录入多条打样结果?`, '提示', {
  2866. // confirmButtonText: '确定',
  2867. // cancelButtonText: '取消',
  2868. // type: 'warning'
  2869. // }).then(() => {
  2870. // saveProofingResult(this.enterResultData).then(({data}) => {
  2871. // if (data && data.code === 0) {
  2872. // this.getDataList()
  2873. // this.enterResultModalFlag = false
  2874. // this.$message({
  2875. // message: '操作成功',
  2876. // type: 'success',
  2877. // duration: 1500,
  2878. // onClose: () => {}
  2879. // })
  2880. // } else {
  2881. // this.$alert(data.msg, '错误', {
  2882. // confirmButtonText: '确定'
  2883. // })
  2884. // }
  2885. // })
  2886. // }).catch(() => {
  2887. // })
  2888. // } else {
  2889. saveProofingResult(this.enterResultData).then(({data}) => {
  2890. if (data && data.code === 0) {
  2891. this.getDataList()
  2892. this.enterResultModalFlag = false
  2893. this.$message({
  2894. message: '操作成功',
  2895. type: 'success',
  2896. duration: 1500,
  2897. onClose: () => {
  2898. }
  2899. })
  2900. } else {
  2901. this.$alert(data.msg, '错误', {
  2902. confirmButtonText: '确定'
  2903. })
  2904. }
  2905. })
  2906. // }
  2907. },
  2908. /**
  2909. * 封装送样方法
  2910. */
  2911. packSubmitProofingModal() {
  2912. this.submitResultData = {
  2913. site: this.$store.state.user.site,
  2914. proofingNo: '',
  2915. actualitySendSamplesDate: new Date(),
  2916. sendSamplesMethod: '',
  2917. deliverGoodsInformation: '',
  2918. deliverGoodsRemark: '',
  2919. proofingResultStatus: 'S',
  2920. updateBy: this.$store.state.user.name,
  2921. }
  2922. // 获得选中的打样号
  2923. // if (this.proofingSelections.length > 0) {
  2924. // this.proofingSelections.forEach(val => {
  2925. // this.submitResultData.quotationNo += ';' + val.quotationNo
  2926. // })
  2927. // this.submitResultData.quotationNo = this.submitResultData.quotationNo.substring(1)
  2928. // } else {
  2929. // this.submitResultData.quotationNo = this.proofingCurrentRow.quotationNo
  2930. // }
  2931. this.submitResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2932. this.submitResultModalFlag = true
  2933. },
  2934. /**
  2935. * 提交送样信息
  2936. */
  2937. submitProofingModal() {
  2938. // // 如果有选中打样单
  2939. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  2940. // let tempData = {
  2941. // currentStatus: 'E',
  2942. // informationList: this.proofingSelections,
  2943. // }
  2944. // // 检查打样单状态
  2945. // checkProofingStatus(tempData).then(({data}) => {
  2946. // if (data && data.code === 0) {
  2947. // if (data.flag === 1) { // 状态一致
  2948. // this.packSubmitProofingModal()
  2949. // } else { // 状态不同
  2950. // this.$message.warning('选中的打样单进度有误,请确认!')
  2951. // }
  2952. // } else {
  2953. // this.$alert(data.msg, '错误', {
  2954. // confirmButtonText: '确定'
  2955. // })
  2956. // }
  2957. // })
  2958. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  2959. // this.packSubmitProofingModal()
  2960. // }
  2961. this.packSubmitProofingModal()
  2962. },
  2963. /**
  2964. * 保存送样结果
  2965. */
  2966. saveSubmitResult() {
  2967. if (this.submitResultData.actualitySendSamplesDate === '' || this.submitResultData.actualitySendSamplesDate == null) {
  2968. this.$message.warning('请选择实际送样日期!')
  2969. return
  2970. }
  2971. if (this.submitResultData.sendSamplesMethod === '' || this.submitResultData.sendSamplesMethod == null) {
  2972. this.$message.warning('请选择送样方式!')
  2973. return
  2974. }
  2975. // if (this.proofingSelections.length > 1) {
  2976. // this.$confirm(`是否提交多条送样信息?`, '提示', {
  2977. // confirmButtonText: '确定',
  2978. // cancelButtonText: '取消',
  2979. // type: 'warning'
  2980. // }).then(() => {
  2981. // saveSubmitResult(this.submitResultData).then(({data}) => {
  2982. // if (data && data.code === 0) {
  2983. // this.getDataList()
  2984. // this.submitResultModalFlag = false
  2985. // this.$message({
  2986. // message: '操作成功',
  2987. // type: 'success',
  2988. // duration: 1500,
  2989. // onClose: () => {}
  2990. // })
  2991. // } else {
  2992. // this.$alert(data.msg, '错误', {
  2993. // confirmButtonText: '确定'
  2994. // })
  2995. // }
  2996. // })
  2997. // }).catch(() => {
  2998. // })
  2999. // } else {
  3000. saveSubmitResult(this.submitResultData).then(({data}) => {
  3001. if (data && data.code === 0) {
  3002. this.getDataList()
  3003. this.submitResultModalFlag = false
  3004. this.$message({
  3005. message: '操作成功',
  3006. type: 'success',
  3007. duration: 1500,
  3008. onClose: () => {
  3009. }
  3010. })
  3011. } else {
  3012. this.$alert(data.msg, '错误', {
  3013. confirmButtonText: '确定'
  3014. })
  3015. }
  3016. })
  3017. // }
  3018. },
  3019. /**
  3020. * 封装回复方法
  3021. */
  3022. packCustomerResponseModal() {
  3023. this.customerResponseData = {
  3024. site: this.$store.state.user.site,
  3025. proofingNo: '',
  3026. actualityReplyDate: new Date(),
  3027. confirmResults: '接受',
  3028. confirmBy: '',
  3029. confirmInformation: '',
  3030. proofingResultStatus: 'R',
  3031. updateBy: this.$store.state.user.name
  3032. }
  3033. // 获得选中的打样号
  3034. // if (this.proofingSelections.length > 0) {
  3035. // this.proofingSelections.forEach(val => {
  3036. // this.customerResponseData.proofingNo += ';' + val.proofingNo
  3037. // })
  3038. // this.customerResponseData.proofingNo = this.customerResponseData.proofingNo.substring(1)
  3039. // } else {
  3040. // this.customerResponseData.proofingNo = this.proofingCurrentRow.proofingNo
  3041. // }
  3042. this.customerResponseData.proofingNo = this.proofingCurrentRow.proofingNo
  3043. this.customerResponseModalFlag = true
  3044. },
  3045. /**
  3046. * 客户回复
  3047. */
  3048. customerResponseModal() {
  3049. // // 如果有选中打样单
  3050. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  3051. // let tempData = {
  3052. // currentStatus: 'S',
  3053. // informationList: this.proofingSelections,
  3054. // }
  3055. // // 检查打样单状态
  3056. // checkProofingStatus(tempData).then(({data}) => {
  3057. // if (data && data.code === 0) {
  3058. // if (data.flag === 1) { // 状态一致
  3059. // this.packCustomerResponseModal()
  3060. // } else { // 状态不同
  3061. // this.$message.warning('选中的打样单进度有误,请确认!')
  3062. // }
  3063. // } else {
  3064. // this.$alert(data.msg, '错误', {
  3065. // confirmButtonText: '确定'
  3066. // })
  3067. // }
  3068. // })
  3069. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  3070. // this.packCustomerResponseModal()
  3071. // }
  3072. this.packCustomerResponseModal()
  3073. },
  3074. /**
  3075. * 保存客户回复
  3076. */
  3077. saveCustomerResponse() {
  3078. if (this.customerResponseData.actualityReplyDate === '' || this.customerResponseData.actualityReplyDate == null) {
  3079. this.$message.warning('请选择实际回复日期!')
  3080. return
  3081. }
  3082. if (this.customerResponseData.confirmResults === '' || this.customerResponseData.confirmResults == null) {
  3083. this.$message.warning('请选择客户确认结果!')
  3084. return
  3085. }
  3086. if (this.customerResponseData.confirmBy === '' || this.customerResponseData.confirmBy == null) {
  3087. this.$message.warning('请填写客户确认人!')
  3088. return
  3089. }
  3090. // if (this.proofingSelections.length > 1) {
  3091. // this.$confirm(`是否提交多条客户回复?`, '提示', {
  3092. // confirmButtonText: '确定',
  3093. // cancelButtonText: '取消',
  3094. // type: 'warning'
  3095. // }).then(() => {
  3096. // saveCustomerResponse(this.customerResponseData).then(({data}) => {
  3097. // if (data && data.code === 0) {
  3098. // this.getDataList()
  3099. // this.customerResponseModalFlag = false
  3100. // this.$message({
  3101. // message: '操作成功',
  3102. // type: 'success',
  3103. // duration: 1500,
  3104. // onClose: () => {}
  3105. // })
  3106. // } else {
  3107. // this.$alert(data.msg, '错误', {
  3108. // confirmButtonText: '确定'
  3109. // })
  3110. // }
  3111. // })
  3112. // }).catch(() => {
  3113. // })
  3114. // } else {
  3115. saveCustomerResponse(this.customerResponseData).then(({data}) => {
  3116. if (data && data.code === 0) {
  3117. this.getDataList()
  3118. this.customerResponseModalFlag = false
  3119. this.$message({
  3120. message: '操作成功',
  3121. type: 'success',
  3122. duration: 1500,
  3123. onClose: () => {
  3124. }
  3125. })
  3126. } else {
  3127. this.$alert(data.msg, '错误', {
  3128. confirmButtonText: '确定'
  3129. })
  3130. }
  3131. })
  3132. // }
  3133. },
  3134. // ======== 报价单附件的相关方法 ========
  3135. /**
  3136. * 获取报价单附件列表
  3137. */
  3138. getFileContentData() {
  3139. let currentData = {
  3140. orderRef1: this.$store.state.user.site,
  3141. orderRef2: this.proofingCurrentRow.proofingNo
  3142. }
  3143. getFileContentList(currentData).then(({data}) => {
  3144. if (data && data.code === 0) {
  3145. this.fileContentList = data.rows
  3146. } else {
  3147. this.fileContentList = []
  3148. }
  3149. })
  3150. },
  3151. // /**
  3152. // * 获得这些报价号的全部附件
  3153. // */
  3154. // getFileContentList () {
  3155. // let currentData = {
  3156. // orderRef1: this.$store.state.user.site,
  3157. // orderRef2: this.enterResultData.proofingNo
  3158. // }
  3159. // getFileContentList(currentData).then(({data}) => {
  3160. // if (data && data.code === 0) {
  3161. // this.enterResultData.fileContentList = data.rows
  3162. // } else {
  3163. // this.enterResultData.fileContentList = []
  3164. // }
  3165. // })
  3166. // },
  3167. /**
  3168. * 上传文件
  3169. */
  3170. uploadFile() {
  3171. let currentData = {
  3172. titleCon: '打样附件上传',
  3173. site: this.$store.state.user.site,
  3174. createBy: this.$store.state.user.name,
  3175. proofingNo: this.enterResultData.proofingNo,
  3176. fileRemark: '',
  3177. folder: 'proofingFile',
  3178. // options: []
  3179. }
  3180. // let num = 0
  3181. // let arr = this.enterResultData.proofingNo.split(';')
  3182. // arr.forEach(val => {
  3183. // currentData.options.push({key: num++, value: val})
  3184. // })
  3185. //打开组件 去做新增业务
  3186. this.$nextTick(() => {
  3187. this.$refs.proofingUploadFile.init(currentData)
  3188. })
  3189. },
  3190. /**
  3191. * 文件删除
  3192. * @param row
  3193. */
  3194. deleteFile(row) {
  3195. this.$confirm('确定要删除此文件?', '提示', {
  3196. confirmButtonText: '确定',
  3197. cancelButtonText: '取消',
  3198. type: 'warning'
  3199. }).then(() => {
  3200. deleteProofingFile(row).then(({data}) => {
  3201. if (data && data.code === 0) {
  3202. this.getFileContentList()
  3203. this.$message({
  3204. message: '操作成功',
  3205. type: 'success',
  3206. duration: 1500,
  3207. onClose: () => {
  3208. }
  3209. })
  3210. } else {
  3211. this.$alert(data.msg, '错误', {
  3212. confirmButtonText: '确定'
  3213. })
  3214. }
  3215. })
  3216. }).catch(() => {
  3217. })
  3218. },
  3219. /**
  3220. * 文件下载
  3221. * @param row
  3222. */
  3223. downloadFile(row) {
  3224. downLoadQuotationFile(row).then(({data}) => {
  3225. // 不限制文件下载类型
  3226. const blob = new Blob([data], {type: 'application/octet-stream;charset=utf-8'})
  3227. // 下载文件名称
  3228. const fileName = row.fileName
  3229. // a标签下载
  3230. const linkNode = document.createElement('a')
  3231. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  3232. linkNode.style.display = 'none'
  3233. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  3234. document.body.appendChild(linkNode)
  3235. linkNode.click() // 模拟在按钮上的一次鼠标单击
  3236. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  3237. document.body.removeChild(linkNode)
  3238. })
  3239. },
  3240. /**
  3241. * 获取该客户的客户地址
  3242. */
  3243. getCustomerAddressList() {
  3244. let tempData = {
  3245. site: this.$store.state.user.site,
  3246. customerNo: this.modalData.customerNo,
  3247. addressType: 'A'
  3248. }
  3249. customerAddressSearch(tempData).then(({data}) => {
  3250. if (data && data.code === 0) {
  3251. this.addressList = data.rows
  3252. this.addressModelFlag = true
  3253. } else {
  3254. this.addressList = []
  3255. }
  3256. })
  3257. },
  3258. // 双击选择负责人
  3259. getAddressData(row) {
  3260. this.modalData.sendSamplesAddress = row.addressName
  3261. this.addressModelFlag = false
  3262. },
  3263. /**
  3264. * 获取该客户的客户负责人
  3265. */
  3266. getCustomerContactList() {
  3267. let tempData = {
  3268. site: this.$store.state.user.site,
  3269. customerNo: this.modalData.customerNo
  3270. }
  3271. customerContactSearch(tempData).then(({data}) => {
  3272. if (data && data.code === 0) {
  3273. this.contactList = data.rows
  3274. this.contactModelFlag = true
  3275. } else {
  3276. this.contactList = []
  3277. }
  3278. })
  3279. },
  3280. // 双击选择负责人
  3281. getContactData(row) {
  3282. this.modalData.consignee = row.contactName
  3283. this.modalData.consigneeContact = row.contactPhoneNumber1
  3284. this.contactModelFlag = false
  3285. },
  3286. // ======== chooseList相关方法 ========
  3287. /**
  3288. * 获取基础数据列表S
  3289. * @param val
  3290. * @param type
  3291. */
  3292. getBaseList(val, type) {
  3293. this.tagNo = val
  3294. this.tagNo1 = type
  3295. this.$nextTick(() => {
  3296. let strVal = ''
  3297. let conSql = ''
  3298. if (val === 102) {
  3299. if (type === 1) {
  3300. strVal = this.modalData.customerNo
  3301. }
  3302. }
  3303. // if (val === 103) {
  3304. // if(type === 1) {
  3305. // strVal = this.modalData.tracker
  3306. // }
  3307. // if(type === 2) {
  3308. // strVal = this.modalData.engineer
  3309. // }
  3310. // }
  3311. if (val === 104) {
  3312. if (type === 1) {
  3313. strVal = this.modalData.projectId
  3314. }
  3315. }
  3316. if (val === 2051) {
  3317. strVal = this.modalData.trackerName
  3318. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3319. }
  3320. if (val === 2052) {
  3321. strVal = this.modalData.engineerName
  3322. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3323. }
  3324. if (val === 2053) {
  3325. strVal = this.modalData.approverName
  3326. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3327. }
  3328. this.$refs.baseList.init(val, strVal, conSql)
  3329. })
  3330. },
  3331. /**
  3332. * 列表方法的回调
  3333. * @param val
  3334. */
  3335. getBaseData(val) {
  3336. if (this.tagNo === 102) {
  3337. if (this.tagNo1 === 1) {
  3338. if (val.Customer_no === this.modalData.customerNo) {
  3339. return
  3340. }
  3341. this.modalData.customerNo = val.Customer_no
  3342. this.modalData.customerDesc = val.Customer_desc
  3343. this.modalData.projectId = undefined
  3344. this.modalData.projectName = undefined
  3345. this.projectPartList = []
  3346. }
  3347. }
  3348. // if (this.tagNo === 103) {
  3349. // if(this.tagNo1 === 1) {
  3350. // this.modalData.tracker = val.username
  3351. // this.modalData.trackerName = val.user_display
  3352. // }
  3353. // if(this.tagNo1 === 2) {
  3354. // this.modalData.engineer = val.username
  3355. // this.modalData.engineerName = val.user_display
  3356. // }
  3357. // }
  3358. if (this.tagNo === 104) {
  3359. if (this.tagNo1 === 1) {
  3360. this.modalData.projectId = val.project_id
  3361. this.modalData.projectName = val.project_name
  3362. this.getProjectPartList();
  3363. }
  3364. }
  3365. if (this.tagNo === 2051) {
  3366. this.modalData.tracker = val.username
  3367. this.modalData.trackerName = val.user_display
  3368. }
  3369. if (this.tagNo === 2052) {
  3370. this.modalData.engineer = val.username
  3371. this.modalData.engineerName = val.user_display
  3372. }
  3373. if (this.tagNo === 2053) {
  3374. this.modalData.approver = val.username
  3375. this.modalData.approverName = val.user_display
  3376. }
  3377. },
  3378. // ======== 导出相关方法 ========
  3379. /**
  3380. * 导出excel
  3381. */
  3382. async createExportData() {
  3383. this.searchData.limit = -1
  3384. this.searchData.page = 1
  3385. await proofingInformationSearch(this.searchData).then(({data}) => {
  3386. this.resultList = data.page.list
  3387. })
  3388. return this.resultList
  3389. },
  3390. startDownload() {
  3391. },
  3392. finishDownload() {
  3393. },
  3394. fields() {
  3395. let json = '{'
  3396. this.columnList.forEach((item, index) => {
  3397. if (index === this.columnList.length - 1) {
  3398. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  3399. } else {
  3400. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  3401. }
  3402. })
  3403. json += '}'
  3404. let s = eval('(' + json + ')')
  3405. return s
  3406. },
  3407. closeModalDiaLog() {
  3408. this.$refs.modalForm.resetFields();
  3409. this.modalData = {
  3410. flag: '1',
  3411. title: '打样新增',
  3412. site: this.$store.state.user.site,
  3413. proofingNo: '',
  3414. customerNo: '',
  3415. customerDesc: '',
  3416. projectId: '',
  3417. projectName: '',
  3418. tracker: '',
  3419. trackerName: '',
  3420. approver: '',
  3421. approverName: '',
  3422. testPartNo: '',
  3423. partName: '',
  3424. engineer: '',
  3425. engineerName: '',
  3426. priorityLevel: '',
  3427. proofingNumber: 1,
  3428. requiredDeliveryDate: '',
  3429. remark: '',
  3430. technicalConsiderations: '',
  3431. isNeedToSendSamples: '',
  3432. sendSamplesAddress: '',
  3433. consignee: '',
  3434. consigneeContact: '',
  3435. actualityDeliveryDate: '',
  3436. proofingResultInformation: '',
  3437. actualitySendSamplesDate: '',
  3438. sendSamplesMethod: '',
  3439. deliverGoodsInformation: '',
  3440. deliverGoodsRemark: '',
  3441. actualityReplyDate: '',
  3442. confirmResults: '',
  3443. confirmBy: '',
  3444. confirmInformation: '',
  3445. proofingStatus: '草稿',
  3446. proofingResultStatus: 'B',
  3447. nextToDo: '',
  3448. createBy: this.$store.state.user.name
  3449. };
  3450. this.selectionDelegateAccess = [];
  3451. this.activeName = 'part'
  3452. Object.keys(this.proofingDelegateAccess).forEach(key => {
  3453. this.proofingDelegateAccess[key] = '';
  3454. })
  3455. },
  3456. checkSelectable(row, index) {
  3457. if (this.modalData.flag === '1') {
  3458. return true
  3459. } else {
  3460. return false
  3461. }
  3462. },
  3463. projectClickRow(row) {
  3464. this.modalData.projectId = row.projectId
  3465. this.modalData.projectName = row.projectName
  3466. this.getProjectPartList()
  3467. this.chooseProjectListFlag = false
  3468. },
  3469. // 查询searchProjectInfoList
  3470. searchProjectInfoList() {
  3471. this.projectList = [];
  3472. this.searchProjectData.customerId = this.modalData.customerNo
  3473. searchProjectInfoList(this.searchProjectData).then(({data}) => {
  3474. if (data && data.code === 0) {
  3475. this.projectList = data.rows
  3476. } else {
  3477. this.projectList = []
  3478. }
  3479. }).catch((error) => {
  3480. this.$message.error('查询项目信息失败')
  3481. })
  3482. },
  3483. closeProjectInfoDialog() {
  3484. this.$refs.closeProjectInfoForm.resetFields();
  3485. this.searchProjectData = {
  3486. site: this.$store.state.user.site,
  3487. projectId: undefined,
  3488. projectName: undefined,
  3489. customerId: undefined,
  3490. }
  3491. },
  3492. rowStyle({row}) {
  3493. if (this.proofingCurrentRow.proofingNo === row.proofingNo) {
  3494. return {'background-color': '#E8F7F6', cursor: 'pointer'};
  3495. }
  3496. },
  3497. updateModalStatus(row, status) {
  3498. this.$confirm(`是否确认下达?`, '提示', {
  3499. confirmButtonText: '确定',
  3500. cancelButtonText: '取消',
  3501. type: 'warning'
  3502. }).then(() => {
  3503. let params = JSON.parse(JSON.stringify(row))
  3504. params.proofingResultStatus = status;
  3505. params.proofingStatus = '下达';
  3506. params.userName = this.$store.state.user.name
  3507. params.menuId = this.$route.meta.menuId
  3508. proofingInformationEditStatus(params).then(({data}) => {
  3509. if (data && data.code === 0) {
  3510. this.getDataList()
  3511. this.modalFlag = false
  3512. this.$message.success('打样单已下达')
  3513. } else {
  3514. this.$alert(data.msg, '错误', {
  3515. confirmButtonText: '确定'
  3516. })
  3517. }
  3518. })
  3519. })
  3520. },
  3521. searchDelegateAccessByUser() {
  3522. // 角色 ROO7 的用户
  3523. let params = {
  3524. ...this.proofingDelegateAccess,
  3525. site: this.$store.state.user.site,
  3526. }
  3527. searchDelegateAccessByUser(params).then(({data}) => {
  3528. if (data && data.code === 0) {
  3529. this.baseDelegateAccessList = data.rows;
  3530. } else {
  3531. this.$message.warning(data.msg)
  3532. }
  3533. }).catch((error) => {
  3534. this.$message.error(error)
  3535. })
  3536. },
  3537. handleSelectionChange(val) {
  3538. // 获得选中的 用户
  3539. this.selectionDelegateAccess2 = val;
  3540. },
  3541. handleTableClick(row, column, event, val) {
  3542. // 表格行点击选择
  3543. this.$refs[val].toggleRowSelection(row);
  3544. },
  3545. openDelegateAccess() {
  3546. let rows = JSON.parse(JSON.stringify(this.selectionDelegateAccess))
  3547. if (rows && rows.length > 0) {
  3548. this.$nextTick(() => {
  3549. rows.forEach(item => {
  3550. let row = this.baseDelegateAccessList.find(row => row.delegateAccess === item.delegateAccess);
  3551. this.$refs.delegateAccesstTable.toggleRowSelection(row);
  3552. })
  3553. })
  3554. }
  3555. },
  3556. closeDelegateAccess() {
  3557. this.selectionDelegateAccess2 = [];
  3558. },
  3559. confirmDelegateAccess() {
  3560. this.selectionDelegateAccess = JSON.parse(JSON.stringify(this.selectionDelegateAccess2))
  3561. this.delegateAccessVisible = false;
  3562. },
  3563. searchDelegateAccess() {
  3564. let params = {
  3565. site: this.modalData.site,
  3566. proofingNo: this.modalData.proofingNo,
  3567. }
  3568. searchDelegateAccess(params).then(({data}) => {
  3569. if (data && data.code === 0) {
  3570. this.selectionDelegateAccess = data.rows.map(item => {
  3571. return {
  3572. delegateAccess: item.delegateAccess,
  3573. delegateAccessName: item.delegateAccessName,
  3574. }
  3575. })
  3576. } else {
  3577. this.$message.warning(data.msg)
  3578. }
  3579. }).catch((error) => {
  3580. this.$message.error(error)
  3581. })
  3582. },
  3583. // 同意提交
  3584. agreeSubmit() {
  3585. this.$confirm(`是否确认提交?`, '提示', {
  3586. confirmButtonText: '确定',
  3587. cancelButtonText: '取消',
  3588. type: 'warning'
  3589. }).then(() => {
  3590. this.modalData.nodeConclusion = 'Y'
  3591. this.submitData()
  3592. })
  3593. },
  3594. // 驳回提交
  3595. rejectSubmit() {
  3596. this.$confirm(`是否确认驳回?`, '提示', {
  3597. confirmButtonText: '确定',
  3598. cancelButtonText: '取消',
  3599. type: 'warning'
  3600. }).then(() => {
  3601. this.modalData.nodeConclusion = 'N'
  3602. this.submitData()
  3603. })
  3604. },
  3605. // 提交
  3606. submitData() {
  3607. if (this.columnFieldList1 ){
  3608. for (let i = 0; i < this.columnFieldList1.length; i++) {
  3609. let row = this.columnFieldList1[i]
  3610. if (!this.modalData[row.fieldId] && row.required === 'Y'){
  3611. this.$message.error(row.fieldName + '不能为空')
  3612. return
  3613. }
  3614. }
  3615. }
  3616. if (this.columnFieldList2 ){
  3617. if (!this.delegateAccessName) {
  3618. this.$message.error('Delegate Access不能为空')
  3619. return;
  3620. }
  3621. }
  3622. let tempData = {
  3623. ...this.modalData,
  3624. userName:this.$store.state.user.name,
  3625. menuId: this.$route.meta.menuId,
  3626. }
  3627. submitChange(tempData).then(({data}) => {
  3628. if (data && data.code === 0) {
  3629. this.getDataList()
  3630. this.$message({message: '操作成功', type: 'success'})
  3631. this.submitModalFlag = false
  3632. this.modalFlag = false
  3633. } else {
  3634. this.$alert(data.msg, '错误', {
  3635. confirmButtonText: '确定'
  3636. })
  3637. }
  3638. })
  3639. },
  3640. // 获取流程的配置权限
  3641. async getNodeAuthority(row) {
  3642. let tempData = {
  3643. site: row.site,
  3644. stepId: row.stepId,
  3645. menuId: this.$route.meta.menuId
  3646. }
  3647. await getNodeAuthority(tempData).then(({data}) => {
  3648. if (data && data.code === 0) {
  3649. this.columnFieldList1 = data.rows.plm_proofing_information
  3650. this.columnFieldList2 = data.rows.plm_proofing_delegate_access
  3651. }
  3652. })
  3653. },
  3654. handleQueryCustomer(){
  3655. let params = {
  3656. site:this.$store.state.user.site,
  3657. customerNo:this.modalData.customerNo
  3658. }
  3659. queryCustomer(params).then(({data})=>{
  3660. if (data && data.code === 0 ) {
  3661. if (data.rows && data.rows.length === 1){
  3662. this.modalData.customerDesc = data.rows[0].customerDesc
  3663. }else {
  3664. this.modalData.customerDesc = ''
  3665. }
  3666. }else {
  3667. this.$message.warning(data.msg)
  3668. }
  3669. }).catch((error)=>{
  3670. this.$message.error(error)
  3671. })
  3672. },
  3673. handleQueryProjectByCustomer(){
  3674. let params = {
  3675. site:this.$store.state.user.site,
  3676. customerId:this.modalData.customerNo,
  3677. projectId:this.modalData.projectId
  3678. }
  3679. queryProjectByCustomer(params).then(({data})=>{
  3680. if (data && data.code === 0 ){
  3681. if (data.rows && data.rows.length === 1){
  3682. this.modalData.projectName = data.rows[0].projectName
  3683. }else {
  3684. this.modalData.projectName = ''
  3685. }
  3686. }else {
  3687. this.$message.warning(data.msg)
  3688. }
  3689. }).catch((error)=>{
  3690. this.$message.error(error)
  3691. })
  3692. }
  3693. }
  3694. }
  3695. </script>
  3696. <style scoped lang="scss">
  3697. /deep/ .customer-tab .el-tabs__content {
  3698. padding: 0px !important;
  3699. height: 300px;
  3700. }
  3701. .right /deep/ .el-input__inner {
  3702. text-align: right;
  3703. }
  3704. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  3705. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  3706. -webkit-appearance: none;
  3707. }
  3708. /deep/ .inlineNumber input[type="number"] {
  3709. -moz-appearance: textfield;
  3710. padding-right: 5px !important;
  3711. }
  3712. </style>