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.

3795 lines
132 KiB

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