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.

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