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.

3628 lines
122 KiB

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