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.

3597 lines
127 KiB

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