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.

1460 lines
47 KiB

  1. <template>
  2. <div class="customer-css">
  3. <!-- 查询条件 -->
  4. <el-form :inline="true" label-position="top" class="search-form-inline">
  5. <div class="search-row">
  6. <el-form-item label="供应商编码" class="search-item">
  7. <el-input v-model="searchData.supplierNo" style="width: 120px" @keyup.enter.native="getMainData"/>
  8. </el-form-item>
  9. <el-form-item label="供应商名称" class="search-item">
  10. <el-input v-model="searchData.supplierName" style="width: 200px" @keyup.enter.native="getMainData"/>
  11. </el-form-item>
  12. <el-form-item label="申请日期" class="search-item">
  13. <div class="date-range">
  14. <el-date-picker v-model="searchData.requestDateStart" type="date" value-format="yyyy-MM-dd" placeholder="开始" style="width: 100px"/>
  15. <span class="split">-</span>
  16. <el-date-picker v-model="searchData.requestDateEnd" type="date" value-format="yyyy-MM-dd" placeholder="结束" style="width: 100px"/>
  17. </div>
  18. </el-form-item>
  19. <el-form-item label="状态" class="search-item">
  20. <el-select v-model="searchData.status" clearable placeholder="全部" style="width: 100%">
  21. <el-option label="全部" value="" />
  22. <el-option label="草稿" value="Draft" />
  23. <el-option label="已确认" value="Confirmed" />
  24. <el-option label="已审核" value="Audited" />
  25. <el-option label="已排程" value="Scheduled" />
  26. <el-option label="已验货" value="Inspected" />
  27. <el-option label="已取消" value="Cancelled" />
  28. </el-select>
  29. </el-form-item>
  30. </div>
  31. <div class="search-row">
  32. <el-form-item label="申请人员" class="search-item">
  33. <el-input v-model="searchData.createBy" style="width: 120px" @keyup.enter.native="getMainData"/>
  34. </el-form-item>
  35. <el-form-item label="QC人员" class="search-item">
  36. <el-input v-model="searchData.qcOperator" style="width: 200px" @keyup.enter.native="getMainData"/>
  37. </el-form-item>
  38. <el-form-item label="建议验货日期" class="search-item">
  39. <div class="date-range">
  40. <el-date-picker v-model="searchData.needInspectDateStart" type="date" value-format="yyyy-MM-dd" placeholder="开始" style="width: 100px"/>
  41. <span class="split">-</span>
  42. <el-date-picker v-model="searchData.needInspectDateEnd" type="date" value-format="yyyy-MM-dd" placeholder="结束" style="width: 100px"/>
  43. </div>
  44. </el-form-item>
  45. <el-form-item label="申请单号" class="search-item">
  46. <el-input v-model="searchData.requestNo" style="width: 120px" @keyup.enter.native="getMainData"/>
  47. </el-form-item>
  48. <el-form-item label="计划验货日期" class="search-item">
  49. <div class="date-range">
  50. <el-date-picker v-model="searchData.planStartDate" type="date" value-format="yyyy-MM-dd" placeholder="开始" style="width: 100px"/>
  51. <span class="split">-</span>
  52. <el-date-picker v-model="searchData.planEndDate" type="date" value-format="yyyy-MM-dd" placeholder="结束" style="width: 100px"/>
  53. </div>
  54. </el-form-item>
  55. </div>
  56. <div class="search-row">
  57. <el-form-item label=" " class="search-item search-btn-item">
  58. <el-button type="primary" @click="getMainData" style="">查询</el-button>
  59. <el-button type="primary" @click="addInspectionRequest" style="margin-left: 2px">新增</el-button>
  60. <el-button type="primary" @click="importExcel" style="margin-left: 2px">Excel导入</el-button>
  61. <el-button type="primary" @click="exportExcel" style="margin-left: 2px">导出</el-button>
  62. </el-form-item>
  63. </div>
  64. </el-form>
  65. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  66. <el-table
  67. :height="height"
  68. :data="mainDataList"
  69. border
  70. ref="mainTable"
  71. highlight-current-row
  72. @row-click="changeData"
  73. v-loading="dataListLoading"
  74. style="margin-top: 0px; width: 100%;">
  75. <el-table-column
  76. v-for="(item,index) in columnArray1" :key="index"
  77. :sortable="item.columnSortable"
  78. :prop="item.columnProp"
  79. :header-align="item.headerAlign"
  80. :show-overflow-tooltip="item.showOverflowTooltip"
  81. :align="item.align"
  82. :fixed="item.fixed==''?false:item.fixed"
  83. :min-width="item.columnWidth"
  84. :label="item.columnLabel">
  85. <template slot-scope="scope">
  86. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  87. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  88. style="width: 100px; height: 100px"/></span>
  89. </template>
  90. </el-table-column>
  91. <el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
  92. <template slot-scope="scope">
  93. <a v-if="scope.row.status === '草稿' || scope.row.statusDb === 'Draft'"
  94. class="customer-a" @click="confirmInspection(scope.row)">确认 |</a>
  95. <a v-if="(scope.row.status === '草稿' || scope.row.statusDb === 'Draft') ||
  96. (scope.row.status === '已确认' || scope.row.statusDb === 'Confirmed')"
  97. class="customer-a" @click="deleteInspectionRequest(scope.row)">删除</a>
  98. <span v-else class="customer-a" style="color: #909399; cursor: default;">{{ scope.row.status }}</span>
  99. </template>
  100. </el-table-column>
  101. </el-table>
  102. <!-- 分页插件 -->
  103. <el-pagination style="margin-top: 0px"
  104. @size-change="sizeChangeHandle"
  105. @current-change="currentChangeHandle"
  106. :current-page="pageIndex"
  107. :page-sizes="[20, 50, 100, 200, 500]"
  108. :page-size="pageSize"
  109. :total="totalPage"
  110. layout="total, sizes, prev, pager, next, jumper">
  111. </el-pagination>
  112. <!-- 详情页签 -->
  113. <el-tabs v-model="activeTab" style="margin-top: 0px; width: 99%;" @tab-click="handleTabClick" class="customer-tab" type="border-card">
  114. <!-- 基本信息 -->
  115. <el-tab-pane label="基本信息" name="base">
  116. <inspection-request-detail :detail-data="currentRow" @update-success="getMainData"/>
  117. </el-tab-pane>
  118. <!-- 验货明细 -->
  119. <el-tab-pane label="验货明细" name="detail">
  120. <inspection-request-detail-tab ref="inspectionDetailTab" :detail-data="currentRow" :table-height="detailHeight" />
  121. </el-tab-pane>
  122. <!-- 验货关联PO明细 -->
  123. <el-tab-pane label="验货关联PO明细" name="poDetail">
  124. <inspection-request-po-detail-tab ref="poDetailTab" :detail-data="currentRow" :table-height="detailHeight" />
  125. </el-tab-pane>
  126. <!-- 验货结果 -->
  127. <el-tab-pane label="验货结果" name="result">
  128. <inspection-result-tab ref="resultTab" :detail-data="currentRow" :table-height="detailHeight" />
  129. </el-tab-pane>
  130. <!-- 费用明细 -->
  131. <el-tab-pane label="费用明细" name="fee">
  132. <inspection-request-fee-tab ref="feeTab" :detail-data="currentRow" :table-height="detailHeight" />
  133. </el-tab-pane>
  134. <!-- 附件管理 -->
  135. <el-tab-pane label="附件管理" name="attachment">
  136. <inspection-request-attachment-tab ref="attachmentTab" :detail-data="currentRow" :table-height="detailHeight" />
  137. </el-tab-pane>
  138. </el-tabs>
  139. <!-- 新增弹窗 -->
  140. <el-dialog
  141. title="新增验货申请"
  142. :visible.sync="addDialogVisible"
  143. width="65%"
  144. top="5vh"
  145. :close-on-click-modal="false"
  146. @close="handleCloseAddDialog">
  147. <el-form :model="addFormData" :rules="addRules" ref="addFormData" label-width="90px" size="mini" class="add-dialog-form">
  148. <div class="form-section">
  149. <el-row :gutter="10">
  150. <el-col :span="6">
  151. <el-form-item label="申请单号" prop="requestNo">
  152. <el-input v-model="addFormData.requestNo" placeholder="自动生成" disabled size="mini"></el-input>
  153. </el-form-item>
  154. </el-col>
  155. <el-col :span="6">
  156. <el-form-item label="申请日期" prop="requestDate">
  157. <el-date-picker
  158. v-model="addFormData.requestDate"
  159. type="date"
  160. value-format="yyyy-MM-dd"
  161. placeholder="选择日期"
  162. size="mini"
  163. style="width: 100%">
  164. </el-date-picker>
  165. </el-form-item>
  166. </el-col>
  167. <el-col :span="12">
  168. <el-form-item label=" " >
  169. <div style="height: 28px;"></div>
  170. </el-form-item>
  171. </el-col>
  172. </el-row>
  173. <el-row :gutter="10">
  174. <el-col :span="6">
  175. <el-form-item label="供应商编码" prop="supplierNo">
  176. <el-input v-model="addFormData.supplierNo" placeholder="请选择" readonly @click.native="selectSupplier" size="mini">
  177. <i slot="suffix" class="el-icon-search" style="cursor: pointer;"></i>
  178. </el-input>
  179. </el-form-item>
  180. </el-col>
  181. <el-col :span="10">
  182. <el-form-item label="供应商名称" prop="supplierName">
  183. <el-input v-model="addFormData.supplierName" disabled size="mini"></el-input>
  184. </el-form-item>
  185. </el-col>
  186. <el-col :span="8">
  187. <el-form-item label=" " >
  188. <div style="height: 28px;"></div>
  189. </el-form-item>
  190. </el-col>
  191. </el-row>
  192. <el-row :gutter="10">
  193. <el-col :span="6">
  194. <el-form-item label="建议验货日期" prop="needInspectDate">
  195. <el-date-picker
  196. v-model="addFormData.needInspectDate"
  197. type="date"
  198. value-format="yyyy-MM-dd"
  199. placeholder="选择日期"
  200. size="mini"
  201. style="width: 100%">
  202. </el-date-picker>
  203. </el-form-item>
  204. </el-col>
  205. <el-col :span="10">
  206. <el-form-item label="验货地址" prop="inspectAddress">
  207. <el-input v-model="addFormData.inspectAddress" placeholder="请输入验货地址" size="mini"></el-input>
  208. </el-form-item>
  209. </el-col>
  210. <el-col :span="6">
  211. <el-form-item label="联系人" prop="contact">
  212. <el-input v-model="addFormData.contact" placeholder="请输入联系人及电话" size="mini"></el-input>
  213. </el-form-item>
  214. </el-col>
  215. <el-col :span="2">
  216. <el-form-item label=" " >
  217. <div style="height: 28px;"></div>
  218. </el-form-item>
  219. </el-col>
  220. </el-row>
  221. </div>
  222. <!-- 步骤2批量选择PO -->
  223. <div class="po-section">
  224. <div class="section-title">批量选择PO</div>
  225. <el-table
  226. :data="poList"
  227. border
  228. size="small"
  229. table-layout="fixed"
  230. height="400px"
  231. style="width: 100%; margin-top: 10px;"
  232. @selection-change="handleSelectionChange"
  233. :row-class-name="tableRowClassName">
  234. <el-table-column type="selection" width="55" align="center"/>
  235. <el-table-column prop="orderRef1" label="PO号" header-align="center" align="center" width="120"/>
  236. <el-table-column prop="orderRef2" label="PO行号" header-align="center" align="center" width="60"/>
  237. <el-table-column prop="partNo" label="产品编码" header-align="center" align="left" min-width="100" show-overflow-tooltip/>
  238. <el-table-column prop="partDesc" label="产品名称" header-align="center" align="left" min-width="150" show-overflow-tooltip/>
  239. <el-table-column prop="qty" label="订单数量" header-align="center" align="right" width="80"/>
  240. <el-table-column prop="waitInspectQty" label="未验货数量" header-align="center" align="right" width="80"/>
  241. <el-table-column prop="shipMethod" label="运输方式" header-align="center" align="center" width="100">
  242. <template slot-scope="scope">
  243. <el-select v-model="scope.row.shipMethod" placeholder="请选择" size="mini" style="width: 100%; box-sizing: border-box;">
  244. <el-option label="空运" value="空运"></el-option>
  245. <el-option label="海运" value="海运"></el-option>
  246. <el-option label="陆运" value="陆运"></el-option>
  247. </el-select>
  248. </template>
  249. </el-table-column>
  250. <el-table-column
  251. prop="crd"
  252. label="CRD日期"
  253. header-align="center"
  254. align="center"
  255. width="160"
  256. >
  257. <template slot-scope="scope">
  258. <el-date-picker
  259. v-model="scope.row.crd"
  260. type="date"
  261. value-format="yyyy-MM-dd"
  262. format="yyyy-MM-dd"
  263. placeholder="选择日期"
  264. size="mini"
  265. style="width: 100%;"
  266. />
  267. </template>
  268. </el-table-column>
  269. <el-table-column label="此次验货数量" header-align="center" align="center" width="150">
  270. <template slot-scope="scope">
  271. <el-input-number
  272. v-model="scope.row.inspectQty"
  273. :min="0"
  274. :max="scope.row.waitInspectQty || 999999"
  275. size="mini"
  276. :controls="false"
  277. style="width: 100%; box-sizing: border-box;">
  278. </el-input-number>
  279. </template>
  280. </el-table-column>
  281. </el-table>
  282. </div>
  283. </el-form>
  284. <div slot="footer" class="dialog-footer">
  285. <el-button type="primary" @click="handleSaveAdd">保存</el-button>
  286. <el-button @click="handleCloseAddDialog">关闭</el-button>
  287. </div>
  288. </el-dialog>
  289. <!-- 导入弹窗 -->
  290. <el-dialog title="验货申请数据导入" :visible.sync="uploadDialogVisible" width="800px">
  291. <!-- 选择文件 -->
  292. <div style="margin-bottom:15px;display:flex;align-items:center">
  293. <span style="margin-right:10px">请选择文件</span>
  294. <el-input v-model="uploadFileName" style="width:400px;margin-right:10px" readonly></el-input>
  295. <el-upload ref="upload" action="/api/inspection/upload"
  296. :show-file-list="false" :on-change="handleFileChange"
  297. :auto-upload="false">
  298. <el-button type="primary">选择文件</el-button>
  299. </el-upload>
  300. <el-button type="success" style="margin-left:10px" @click="previewUpload">上传</el-button>
  301. <el-button type="primary" @click="downloadTemplate" style="margin-left:10px">
  302. <i class="el-icon-download"></i> 下载模板
  303. </el-button>
  304. </div>
  305. <!-- 预览表格 -->
  306. <!-- 预览表格 -->
  307. <el-table
  308. :data="uploadPreviewList"
  309. border
  310. height="250"
  311. style="width:100%;margin-top:10px"
  312. >
  313. <el-table-column prop="poNo" label="PO号" align="center" width="auto"></el-table-column>
  314. <el-table-column prop="poItemNo" label="PO行号" align="center" width="auto"></el-table-column>
  315. <el-table-column prop="partNo" label="产品编码" align="center" width="auto"></el-table-column>
  316. <el-table-column prop="qty" label="验货数量" align="center" width="auto"></el-table-column>
  317. <el-table-column prop="shipMethod" label="运输方式" align="center" width="auto"></el-table-column>
  318. <el-table-column prop="crd" label="CRD" align="center" width="auto"></el-table-column>
  319. <el-table-column prop="suggestInspectDate" label="建议验货日期" align="center" width="auto"></el-table-column>
  320. </el-table>
  321. <!-- 按钮 -->
  322. <div style="margin-top:20px;text-align:center">
  323. <el-button type="primary" @click="confirmUpload">保存</el-button>
  324. <el-button @click="uploadDialogVisible=false" style="margin-right:30px">关闭</el-button>
  325. </div>
  326. </el-dialog>
  327. </div>
  328. </template>
  329. <script>
  330. import { searchInspectionRequestHeaderList, queryPoPage, saveInspectionRequest, deleteInspectionRequest, confirmInspectionRequest, downloadTemplate, previewUpload, batchSave } from '@/api/inspection/inspectionRequestHeader.js'
  331. import { searchSrmSupplierList } from '@/api/srm/srmSupplier.js'
  332. import Chooselist from '@/views/modules/common/Chooselist_eam'
  333. import ComInspectionRequestDetail from './com_inspectionRequestDetail.vue'
  334. import ComInspectionRequestDetailTab from './com_inspectionRequestDetailTab.vue'
  335. import ComInspectionRequestPoDetailTab from './com_inspectionRequestPoDetailTab.vue'
  336. import ComInspectionResultTab from './com_inspectionResultTab.vue'
  337. import ComInspectionRequestAttachmentTab from './com_inspectionRequestAttachmentTab.vue'
  338. import ComInspectionRequestFeeTab from './com_inspectionRequestFeeTab.vue'
  339. import excel from '@/utils/excel-util.js'
  340. export default {
  341. components: {
  342. Chooselist,
  343. InspectionRequestDetail: ComInspectionRequestDetail,
  344. InspectionRequestDetailTab: ComInspectionRequestDetailTab,
  345. InspectionRequestPoDetailTab: ComInspectionRequestPoDetailTab,
  346. InspectionResultTab: ComInspectionResultTab,
  347. InspectionRequestAttachmentTab: ComInspectionRequestAttachmentTab,
  348. InspectionRequestFeeTab: ComInspectionRequestFeeTab
  349. },
  350. data () {
  351. return {
  352. functionId: this.$route.meta.menuId,
  353. height: 400,
  354. detailHeight: 400,
  355. currentRow: {},
  356. tagNo: '',
  357. searchType: '',
  358. activeTab: 'base',
  359. // 新增弹窗相关数据
  360. addDialogVisible: false,
  361. addFormData: {
  362. requestNo: '',
  363. requestDate: '',
  364. supplierNo: '',
  365. supplierName: '',
  366. inspectAddress: '',
  367. contact: '',
  368. needInspectDate: ''
  369. },
  370. addRules: {
  371. requestDate: [
  372. { required: true, message: '请选择申请日期', trigger: 'change' }
  373. ],
  374. supplierNo: [
  375. { required: true, message: '请选择供应商', trigger: 'change' }
  376. ]
  377. },
  378. poList: [],
  379. selectedPoList: [],
  380. // 上传相关
  381. uploadDialogVisible: false,
  382. uploadFileName: '',
  383. uploadFile: null,
  384. uploadPreviewList: [],
  385. searchData: {
  386. requestNo: '',
  387. supplierNo: '',
  388. supplierName: '',
  389. status: '',
  390. qcOperator: '',
  391. createBy: '',
  392. requestDateStart: '',
  393. requestDateEnd: '',
  394. needInspectDateStart: '',
  395. needInspectDateEnd: '',
  396. planStartDate: '',
  397. planEndDate: '',
  398. page: 1,
  399. limit: 50
  400. },
  401. pageIndex: 1,
  402. pageSize: 50,
  403. totalPage: 0,
  404. mainDataList: [],
  405. dataListLoading: false,
  406. columnArray1: [
  407. {
  408. userId: this.$store.state.user.name,
  409. functionId: this.functionId,
  410. serialNumber: 'InspectionTable1RequestNo',
  411. tableId: 'InspectionTable1',
  412. tableName: '检验申请单',
  413. columnProp: 'requestNo',
  414. headerAlign: 'center',
  415. align: 'left',
  416. columnLabel: '申请单号',
  417. columnWidth: '120',
  418. columnHidden: false,
  419. columnImage: false,
  420. columnSortable: false,
  421. sortLv: 0,
  422. status: true,
  423. fixed: false
  424. },
  425. {
  426. userId: this.$store.state.user.name,
  427. functionId: this.functionId,
  428. serialNumber: 'InspectionTable1RequestDate',
  429. tableId: 'InspectionTable1',
  430. tableName: '检验申请单',
  431. columnProp: 'requestDate',
  432. headerAlign: 'center',
  433. align: 'center',
  434. columnLabel: '申请日期',
  435. columnWidth: '120',
  436. columnHidden: false,
  437. columnImage: false,
  438. columnSortable: false,
  439. sortLv: 0,
  440. status: true,
  441. fixed: false
  442. },
  443. {
  444. userId: this.$store.state.user.name,
  445. functionId: this.functionId,
  446. serialNumber: 'InspectionTable1SupplierNo',
  447. tableId: 'InspectionTable1',
  448. tableName: '检验申请单',
  449. columnProp: 'supplierNo',
  450. headerAlign: 'center',
  451. align: 'left',
  452. columnLabel: '供应商编码',
  453. columnWidth: '120',
  454. columnHidden: false,
  455. columnImage: false,
  456. columnSortable: false,
  457. sortLv: 0,
  458. status: true,
  459. fixed: false
  460. },
  461. {
  462. userId: this.$store.state.user.name,
  463. functionId: this.functionId,
  464. serialNumber: 'InspectionTable1SupplierName',
  465. tableId: 'InspectionTable1',
  466. tableName: '检验申请单',
  467. columnProp: 'supplierName',
  468. headerAlign: 'center',
  469. align: 'left',
  470. columnLabel: '供应商名称',
  471. columnWidth: '150',
  472. columnHidden: false,
  473. columnImage: false,
  474. columnSortable: false,
  475. sortLv: 0,
  476. status: true,
  477. fixed: false
  478. },
  479. {
  480. userId: this.$store.state.user.name,
  481. functionId: this.functionId,
  482. serialNumber: 'InspectionTable1CreateBy',
  483. tableId: 'InspectionTable1',
  484. tableName: '检验申请单',
  485. columnProp: 'createBy',
  486. headerAlign: 'center',
  487. align: 'left',
  488. columnLabel: '申请人员',
  489. columnWidth: '100',
  490. columnHidden: false,
  491. columnImage: false,
  492. columnSortable: false,
  493. sortLv: 0,
  494. status: true,
  495. fixed: false
  496. },
  497. {
  498. userId: this.$store.state.user.name,
  499. functionId: this.functionId,
  500. serialNumber: 'InspectionTable1NeedInspectDate',
  501. tableId: 'InspectionTable1',
  502. tableName: '检验申请单',
  503. columnProp: 'needInspectDate',
  504. headerAlign: 'center',
  505. align: 'center',
  506. columnLabel: '建议验货日期',
  507. columnWidth: '120',
  508. columnHidden: false,
  509. columnImage: false,
  510. columnSortable: false,
  511. sortLv: 0,
  512. status: true,
  513. fixed: false
  514. },
  515. {
  516. userId: this.$store.state.user.name,
  517. functionId: this.functionId,
  518. serialNumber: 'InspectionTable1InspectAddress',
  519. tableId: 'InspectionTable1',
  520. tableName: '检验申请单',
  521. columnProp: 'inspectAddress',
  522. headerAlign: 'center',
  523. align: 'left',
  524. columnLabel: '验货地址',
  525. columnWidth: '200',
  526. columnHidden: false,
  527. columnImage: false,
  528. columnSortable: false,
  529. sortLv: 0,
  530. status: true,
  531. fixed: false
  532. },
  533. {
  534. userId: this.$store.state.user.name,
  535. functionId: this.functionId,
  536. serialNumber: 'InspectionTable1Contact',
  537. tableId: 'InspectionTable1',
  538. tableName: '检验申请单',
  539. columnProp: 'inspectContract',
  540. headerAlign: 'center',
  541. align: 'left',
  542. columnLabel: '联系人',
  543. columnWidth: '150',
  544. columnHidden: false,
  545. columnImage: false,
  546. columnSortable: false,
  547. sortLv: 0,
  548. status: true,
  549. fixed: false
  550. },
  551. {
  552. userId: this.$store.state.user.name,
  553. functionId: this.functionId,
  554. serialNumber: 'InspectionTable1Remark',
  555. tableId: 'InspectionTable1',
  556. tableName: '检验申请单',
  557. columnProp: 'remark',
  558. headerAlign: 'center',
  559. align: 'left',
  560. columnLabel: '备注',
  561. columnWidth: '150',
  562. columnHidden: false,
  563. columnImage: false,
  564. columnSortable: false,
  565. sortLv: 0,
  566. status: true,
  567. fixed: false
  568. },
  569. {
  570. userId: this.$store.state.user.name,
  571. functionId: this.functionId,
  572. serialNumber: 'InspectionTable1Status',
  573. tableId: 'InspectionTable1',
  574. tableName: '检验申请单',
  575. columnProp: 'status',
  576. headerAlign: 'center',
  577. align: 'center',
  578. columnLabel: '状态',
  579. columnWidth: '100',
  580. columnHidden: false,
  581. columnImage: false,
  582. columnSortable: false,
  583. sortLv: 0,
  584. status: true,
  585. fixed: false
  586. },
  587. {
  588. userId: this.$store.state.user.name,
  589. functionId: this.functionId,
  590. serialNumber: 'InspectionTable1PlanStartDate',
  591. tableId: 'InspectionTable1',
  592. tableName: '检验申请单',
  593. columnProp: 'planStartDate',
  594. headerAlign: 'center',
  595. align: 'center',
  596. columnLabel: '计划验货日期',
  597. columnWidth: '120',
  598. columnHidden: false,
  599. columnImage: false,
  600. columnSortable: false,
  601. sortLv: 0,
  602. status: true,
  603. fixed: false
  604. },
  605. {
  606. userId: this.$store.state.user.name,
  607. functionId: this.functionId,
  608. serialNumber: 'InspectionTable1QcOperator',
  609. tableId: 'InspectionTable1',
  610. tableName: '检验申请单',
  611. columnProp: 'qcOperator',
  612. headerAlign: 'center',
  613. align: 'left',
  614. columnLabel: 'QC人员',
  615. columnWidth: '100',
  616. columnHidden: false,
  617. columnImage: false,
  618. columnSortable: false,
  619. sortLv: 0,
  620. status: true,
  621. fixed: false
  622. }
  623. ]
  624. }
  625. },
  626. mounted () {
  627. this.$nextTick(() => {
  628. this.height = (window.innerHeight - 220) / 2
  629. this.detailHeight = (window.innerHeight - 220) / 2
  630. this.getMainData()
  631. })
  632. },
  633. methods: {
  634. // 获取基础数据列表
  635. getBaseList (val, type) {
  636. this.tagNo = val
  637. this.searchType = type || ''
  638. this.$nextTick(() => {
  639. let strVal = ''
  640. let conSql = ''
  641. if (val === 1100) {
  642. strVal = this.searchData.supplierNo || ''
  643. conSql = " and site = '" + this.$store.state.user.site + "'"
  644. }
  645. if (val === 2016) {
  646. strVal = type === 'createBy' ? (this.searchData.createBy || '') : (this.searchData.qcOperator || '')
  647. }
  648. this.$refs.baseList.init(val, strVal, conSql)
  649. })
  650. },
  651. /* 列表方法的回调 */
  652. getBaseData (val) {
  653. if (this.tagNo === 1100) {
  654. // 判断是搜索条件还是新增弹窗
  655. if (this.addDialogVisible) {
  656. // 新增弹窗:使用下划线命名的字段,使用$set确保响应式
  657. this.$set(this.addFormData, 'supplierNo', val.supplier_no || '')
  658. this.$set(this.addFormData, 'supplierName', val.supplier_name || '')
  659. this.loadPoList()
  660. // 查询供应商详情获取联系人和地址
  661. if (val.supplier_no) {
  662. // 使用 searchSrmSupplierList 接口查询供应商(精确匹配)
  663. searchSrmSupplierList({
  664. page: 1,
  665. limit: 1,
  666. supplierNo: val.supplier_no // 根据实际后端字段名调整
  667. }).then(({ data }) => {
  668. if (data.code === 0 && data.page && data.page.list && data.page.list.length > 0) {
  669. const supplier = data.page.list[0];
  670. this.$set(this.addFormData, 'inspectAddress', supplier.Address || supplier.address || '');
  671. this.$set(this.addFormData, 'contact', supplier.Contact || supplier.contact || '');
  672. }
  673. }).catch(() => {});
  674. }
  675. } else {
  676. // 搜索条件:使用下划线命名的字段
  677. this.searchData.supplierNo = val.supplier_no || ''
  678. this.searchData.supplierName = val.supplier_name || ''
  679. }
  680. }
  681. if (this.tagNo === 2016) {
  682. if (this.searchType === 'createBy') {
  683. this.searchData.createBy = val.username || val.user_display || val.name
  684. } else if (this.searchType === 'qcOperator') {
  685. this.searchData.qcOperator = val.username || val.user_display || val.name
  686. }
  687. }
  688. },
  689. // 查询数据
  690. getMainData () {
  691. this.searchData.limit = this.pageSize
  692. this.searchData.page = this.pageIndex
  693. this.dataListLoading = true
  694. searchInspectionRequestHeaderList(this.searchData).then(({ data }) => {
  695. if (data.code === 0) {
  696. this.mainDataList = data.page.list
  697. // 调试信息:打印第一条数据的 hasModifiedQty 字段
  698. if (this.mainDataList.length > 0) {
  699. console.log('=== 主表格数据调试 ===')
  700. console.log('第一条数据:', this.mainDataList[0])
  701. console.log('hasModifiedQty 值:', this.mainDataList[0].hasModifiedQty)
  702. console.log('=====================')
  703. }
  704. this.pageIndex = data.page.currPage
  705. this.pageSize = data.page.pageSize
  706. this.totalPage = data.page.totalCount
  707. this.$nextTick(() => {
  708. if (this.$refs.mainTable) {
  709. this.$refs.mainTable.clearSelection()
  710. }
  711. })
  712. // 判断是否有数据
  713. if (this.mainDataList.length > 0) {
  714. this.$refs.mainTable.setCurrentRow(this.mainDataList[0])
  715. this.changeData(this.mainDataList[0])
  716. } else {
  717. this.changeData(null)
  718. }
  719. }
  720. this.dataListLoading = false
  721. }).catch(() => {
  722. this.dataListLoading = false
  723. })
  724. },
  725. // 每页数
  726. sizeChangeHandle (val) {
  727. this.pageSize = val
  728. this.pageIndex = 1
  729. this.getMainData()
  730. },
  731. // 当前页
  732. currentChangeHandle (val) {
  733. this.pageIndex = val
  734. this.getMainData()
  735. },
  736. // 页签点击事件
  737. handleTabClick (tab) {
  738. // 每次点击页签都触发对应页签的查询
  739. if (tab.name === 'detail') {
  740. // 验货明细页签 - 组件内部 watch 会自动触发
  741. this.$nextTick(() => {
  742. if (this.$refs.inspectionDetailTab) {
  743. this.$refs.inspectionDetailTab.loadDetailList()
  744. }
  745. })
  746. } else if (tab.name === 'poDetail') {
  747. // 验货关联PO明细页签
  748. this.$nextTick(() => {
  749. if (this.$refs.poDetailTab) {
  750. this.$refs.poDetailTab.loadDetailList()
  751. }
  752. })
  753. } else if (tab.name === 'result') {
  754. // 验货结果页签
  755. this.$nextTick(() => {
  756. if (this.$refs.resultTab) {
  757. this.$refs.resultTab.loadDetailList()
  758. }
  759. })
  760. } else if (tab.name === 'attachment') {
  761. // 附件管理页签 - 组件内部 watch 会自动触发
  762. this.$nextTick(() => {
  763. if (this.$refs.attachmentTab) {
  764. this.$refs.attachmentTab.loadAttachmentTypeList()
  765. }
  766. })
  767. } else if (tab.name === 'fee') {
  768. // 费用明细页签 - 组件内部 watch 会自动触发
  769. this.$nextTick(() => {
  770. if (this.$refs.feeTab) {
  771. this.$refs.feeTab.loadFeeDetailList()
  772. }
  773. })
  774. }
  775. },
  776. // 行点击事件
  777. changeData (row) {
  778. this.currentRow = row ? JSON.parse(JSON.stringify(row)) : {}
  779. },
  780. // 新增验货申请
  781. addInspectionRequest () {
  782. this.addDialogVisible = true
  783. this.resetAddForm()
  784. },
  785. // 关闭新增弹窗
  786. handleCloseAddDialog () {
  787. this.addDialogVisible = false
  788. this.resetAddForm()
  789. },
  790. // 重置表单
  791. resetAddForm () {
  792. const today = new Date()
  793. const year = today.getFullYear()
  794. const month = String(today.getMonth() + 1).padStart(2, '0')
  795. const day = String(today.getDate()).padStart(2, '0')
  796. const todayStr = `${year}-${month}-${day}`
  797. this.addFormData = {
  798. requestNo: '',
  799. requestDate: todayStr,
  800. supplierNo: '',
  801. supplierName: '',
  802. inspectAddress: '',
  803. contact: '',
  804. needInspectDate: ''
  805. }
  806. this.poList = []
  807. this.selectedPoList = []
  808. if (this.$refs.addFormData) {
  809. this.$refs.addFormData.clearValidate()
  810. }
  811. },
  812. // 选择供应商
  813. selectSupplier () {
  814. this.tagNo = 1100 // 设置tagNo,确保回调时能正确识别
  815. this.$nextTick(() => {
  816. const conSql = " and site = '" + this.$store.state.user.site + "'"
  817. this.$refs.baseList.init(1100, this.addFormData.supplierNo || '', conSql)
  818. })
  819. },
  820. // 加载PO列表(选择供应商后调用)
  821. loadPoList () {
  822. if (!this.addFormData.supplierNo) {
  823. this.$message.warning('请先选择供应商')
  824. return
  825. }
  826. const params = {
  827. supplierNo: this.addFormData.supplierNo,
  828. site: this.$store.state.user.site,
  829. page: 1,
  830. limit: 1000
  831. }
  832. queryPoPage(params).then(({ data }) => {
  833. if (data.code === 0 && data.page) {
  834. this.poList = data.page.list.map(item => ({
  835. ...item,
  836. inspectQty: item.waitInspectQty || 0, // 默认值为未验货数量
  837. shipMethod: item.shipMethod || '',// 运输方式
  838. crd: item.crd ? item.crd.split(' ')[0] : ''
  839. }))
  840. } else {
  841. this.poList = []
  842. this.$message.info('该供应商暂无可申请验货的PO')
  843. }
  844. }).catch(() => {
  845. this.poList = []
  846. this.$message.error('加载PO列表失败')
  847. })
  848. },
  849. // 表格选择变化
  850. handleSelectionChange (selection) {
  851. this.selectedPoList = selection
  852. },
  853. // 验货数量变化
  854. handleInspectQtyChange (row, value) {
  855. console.log('验货数量变化:', row.orderRef1, value)
  856. // 确保数据被正确更新
  857. this.$set(row, 'inspectQty', value)
  858. },
  859. // 表格行样式(验货数量与原始值不同时标红)
  860. tableRowClassName ({ row }) {
  861. const inspectQty = Number(row.inspectQty || 0)
  862. const waitInspectQty = Number(row.waitInspectQty || 0)
  863. return inspectQty !== waitInspectQty
  864. ? 'modified-row'
  865. : ''
  866. },
  867. // 保存
  868. handleSaveAdd () {
  869. console.log('开始保存,当前选择的PO列表:', this.selectedPoList)
  870. console.log('表单数据:', this.addFormData)
  871. this.$refs.addFormData.validate((valid) => {
  872. console.log('表单验证结果:', valid)
  873. if (valid) {
  874. if (this.selectedPoList.length === 0) {
  875. this.$message.warning('请至少选择一条PO明细')
  876. return
  877. }
  878. // 检查验货数量
  879. const hasInvalidQty = this.selectedPoList.some(item => !item.inspectQty || item.inspectQty <= 0)
  880. if (hasInvalidQty) {
  881. this.$message.warning('请填写有效的验货数量')
  882. return
  883. }
  884. // 构建提交数据
  885. const submitData = {
  886. requestDate: this.addFormData.requestDate,
  887. needInspectDate: this.addFormData.needInspectDate,
  888. supplierNo: this.addFormData.supplierNo,
  889. inspectAddress: this.addFormData.inspectAddress,
  890. inspectContract: this.addFormData.contact,
  891. remark: '',
  892. items: this.selectedPoList.map(item => ({
  893. orderNo: item.orderNo || item.order_ref1 || item.orderRef1,
  894. itemNo: item.itemNo || item.item_no || item.order_ref2 || item.orderRef2,
  895. partNo: item.partNo,
  896. orderRef1: item.orderRef1,
  897. orderRef2: item.orderRef2,
  898. qty: item.inspectQty,
  899. shipMethod: item.shipMethod,
  900. crd: item.crd
  901. }))
  902. }
  903. console.log('提交的数据:', submitData)
  904. saveInspectionRequest(submitData).then(({ data }) => {
  905. console.log('保存接口返回:', data)
  906. if (data.code === 0) {
  907. this.$message.success('保存成功')
  908. this.handleCloseAddDialog()
  909. this.getMainData()
  910. } else {
  911. this.$message.error(data.msg || '保存失败')
  912. }
  913. }).catch((error) => {
  914. console.error('保存接口错误:', error)
  915. this.$message.error('保存失败,请稍后重试')
  916. })
  917. } else {
  918. console.log('表单验证失败')
  919. this.$message.warning('请填写完整的表单信息')
  920. }
  921. })
  922. },
  923. // Excel导入
  924. importExcel () {
  925. this.uploadDialogVisible = true
  926. this.uploadFileName = ''
  927. this.uploadFile = null
  928. this.uploadPreviewList = []
  929. },
  930. // 文件选择变化
  931. handleFileChange (file) {
  932. this.uploadFile = file.raw
  933. this.uploadFileName = file.name
  934. },
  935. // 预览上传数据
  936. previewUpload () {
  937. if (!this.uploadFile) {
  938. this.$message.warning('请先选择文件')
  939. return
  940. }
  941. const formData = new FormData()
  942. formData.append('file', this.uploadFile)
  943. // 调用后端预览接口
  944. previewUpload(this.uploadFile).then(({ data }) => {
  945. if (data && data.code === 0) {
  946. this.uploadPreviewList = data.data || []
  947. this.$message.success('文件解析成功,请确认数据后点击保存')
  948. } else {
  949. this.$message.error(data.msg || '文件解析失败')
  950. }
  951. }).catch((error) => {
  952. console.error('文件解析失败:', error)
  953. const errorMsg = (error.response && error.response.data && error.response.data.msg) || error.message || '未知错误'
  954. this.$message.error('文件解析失败: ' + errorMsg)
  955. })
  956. },
  957. // 确认上传
  958. confirmUpload () {
  959. if (this.uploadPreviewList.length === 0) {
  960. this.$message.warning('没有可保存的数据')
  961. return
  962. }
  963. this.$confirm(`确认保存 ${this.uploadPreviewList.length} 条数据吗?`, '提示', {
  964. confirmButtonText: '确定',
  965. cancelButtonText: '取消',
  966. type: 'warning'
  967. }).then(() => {
  968. // 调用后端保存接口
  969. batchSave(this.uploadFile).then(({ data }) => {
  970. if (data && data.code === 0) {
  971. this.$message.success('数据保存成功')
  972. this.uploadDialogVisible = false
  973. this.getMainData()
  974. } else {
  975. this.$message.error(data.msg || '数据保存失败')
  976. }
  977. }).catch((error) => {
  978. console.error('数据保存失败:', error)
  979. const errorMsg = (error.response && error.response.data && error.response.data.msg) || error.message || '未知错误'
  980. this.$message.error('数据保存失败: ' + errorMsg)
  981. })
  982. }).catch(() => {})
  983. },
  984. // 下载模板
  985. downloadTemplate () {
  986. const loading = this.$loading({
  987. lock: true,
  988. text: '正在下载模板...',
  989. spinner: 'el-icon-loading',
  990. background: 'rgba(0, 0, 0, 0.7)'
  991. })
  992. this.$http({
  993. url: this.$http.adornUrl('/inspection/downloadTemplate'),
  994. method: 'post',
  995. responseType: 'blob'
  996. }).then(response => {
  997. loading.close()
  998. // 创建下载文件
  999. const blob = new Blob([response.data], {
  1000. type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  1001. })
  1002. const url = window.URL.createObjectURL(blob)
  1003. const link = document.createElement('a')
  1004. link.href = url
  1005. link.download = '验货申请导入模板.xlsx'
  1006. document.body.appendChild(link)
  1007. link.click()
  1008. document.body.removeChild(link)
  1009. window.URL.revokeObjectURL(url)
  1010. this.$message.success('模板下载成功')
  1011. }).catch(error => {
  1012. loading.close()
  1013. console.error('模板下载失败:', error)
  1014. this.$message.error('模板下载失败,请联系管理员')
  1015. })
  1016. },
  1017. // 导出
  1018. exportExcel () {
  1019. console.log('开始导出...')
  1020. // 生成文件名(使用原生 Date)
  1021. const now = new Date()
  1022. const year = now.getFullYear()
  1023. const month = String(now.getMonth() + 1).padStart(2, '0')
  1024. const day = String(now.getDate()).padStart(2, '0')
  1025. const hour = String(now.getHours()).padStart(2, '0')
  1026. const minute = String(now.getMinutes()).padStart(2, '0')
  1027. const second = String(now.getSeconds()).padStart(2, '0')
  1028. const exportName = `检验申请单${year}${month}${day}${hour}${minute}${second}`
  1029. console.log('导出参数:', this.searchData)
  1030. // 获取当前查询条件
  1031. const exportParams = {
  1032. ...this.searchData,
  1033. limit: -1, // 导出全部数据
  1034. page: 1
  1035. }
  1036. try {
  1037. excel.exportTable({
  1038. url: '/inspection/searchInspectionRequestHeaderList',
  1039. columnMapping: this.columnArray1, // 使用表格列配置
  1040. mergeSetting: [], // 不需要合并
  1041. params: exportParams,
  1042. fileName: exportName + '.xlsx',
  1043. rowFetcher: res => {
  1044. console.log('导出数据响应:', res)
  1045. return res.data.page.list
  1046. }, // 从响应中提取数据列表
  1047. columnFormatter: [], // 不需要格式化
  1048. dropColumns: [] // 不需要剔除的列
  1049. })
  1050. console.log('导出请求已发送')
  1051. } catch (error) {
  1052. console.error('导出失败:', error)
  1053. this.$message.error('导出失败: ' + error.message)
  1054. }
  1055. },
  1056. // 确认验货申请
  1057. confirmInspection (row) {
  1058. this.$confirm('确定要确认该验货申请吗?', '提示', {
  1059. confirmButtonText: '确定',
  1060. cancelButtonText: '取消',
  1061. type: 'warning'
  1062. }).then(() => {
  1063. confirmInspectionRequest(row.requestNo).then(({ data }) => {
  1064. if (data.code === 0) {
  1065. this.$message.success('确认成功')
  1066. this.getMainData()
  1067. } else {
  1068. this.$message.error(data.msg || '确认失败')
  1069. }
  1070. }).catch((error) => {
  1071. console.error('确认接口错误:', error)
  1072. this.$message.error('确认失败,请稍后重试')
  1073. })
  1074. }).catch(() => {
  1075. this.$message.info('已取消确认')
  1076. })
  1077. },
  1078. // 删除验货申请
  1079. deleteInspectionRequest (row) {
  1080. this.$confirm('确定要删除该验货申请吗?', '提示', {
  1081. confirmButtonText: '确定',
  1082. cancelButtonText: '取消',
  1083. type: 'warning'
  1084. }).then(() => {
  1085. deleteInspectionRequest(row.requestNo).then(({ data }) => {
  1086. if (data.code === 0) {
  1087. this.$message.success('删除成功')
  1088. this.getMainData()
  1089. } else {
  1090. this.$message.error(data.msg || '删除失败')
  1091. }
  1092. }).catch((error) => {
  1093. console.error('删除接口错误:', error)
  1094. this.$message.error('删除失败,请稍后重试')
  1095. })
  1096. }).catch(() => {
  1097. this.$message.info('已取消删除')
  1098. })
  1099. }
  1100. },
  1101. created () {
  1102. this.getMainData()
  1103. }
  1104. }
  1105. </script>
  1106. <style scoped lang="scss">
  1107. .search-form-inline {
  1108. background: #fff;
  1109. padding: 0;
  1110. margin-bottom: 0;
  1111. }
  1112. .search-row {
  1113. display: flex;
  1114. align-items: flex-end;
  1115. flex-wrap: wrap;
  1116. gap: 0;
  1117. margin-bottom: 0;
  1118. }
  1119. .search-item {
  1120. flex: none;
  1121. margin-bottom: 0;
  1122. margin-right: 12px;
  1123. }
  1124. .search-item /deep/ .el-form-item__label {
  1125. font-size: 14px;
  1126. padding-bottom: 0;
  1127. line-height: 1.2;
  1128. }
  1129. .search-btn-item {
  1130. flex: none;
  1131. margin-bottom: 0;
  1132. margin-right: 0;
  1133. }
  1134. .search-item /deep/ .el-form-item__label {
  1135. font-size: 13px;
  1136. color: #606266;
  1137. padding-bottom: 5px;
  1138. line-height: 1;
  1139. height: auto;
  1140. }
  1141. .search-item /deep/ .el-form-item__content {
  1142. line-height: normal;
  1143. }
  1144. .date-range {
  1145. display: flex;
  1146. align-items: center;
  1147. }
  1148. .split {
  1149. padding: 0 6px;
  1150. color: #606266;
  1151. font-size: 13px;
  1152. }
  1153. /deep/ .customer-tab .el-tabs__content {
  1154. padding: 5px !important;
  1155. }
  1156. .form-section {
  1157. margin-bottom: 15px;
  1158. padding-bottom: 15px;
  1159. border-bottom: 1px solid #ebeef5;
  1160. padding: 5px 10px;
  1161. }
  1162. .add-dialog-form /deep/ .el-form-item {
  1163. margin-bottom: 10px;
  1164. }
  1165. .add-dialog-form /deep/ .el-form-item__label {
  1166. text-align: left;
  1167. float: none;
  1168. display: block;
  1169. padding: 0 0 5px 0;
  1170. line-height: 1;
  1171. font-size: 13px;
  1172. }
  1173. .add-dialog-form /deep/ .el-form-item__content {
  1174. margin-left: 0 !important;
  1175. }
  1176. .po-section {
  1177. .section-title {
  1178. font-size: 14px;
  1179. font-weight: bold;
  1180. color: #303133;
  1181. margin-bottom: 8px;
  1182. }
  1183. .section-desc {
  1184. font-size: 12px;
  1185. color: #909399;
  1186. margin-bottom: 10px;
  1187. }
  1188. }
  1189. .dialog-footer {
  1190. text-align: center;
  1191. }
  1192. /deep/ .el-input-number .el-input__inner {
  1193. text-align: right !important;
  1194. padding-right: 32px !important;
  1195. padding-left: 8px !important;
  1196. box-sizing: border-box;
  1197. }
  1198. /deep/ .el-input .el-input--mini {
  1199. line-height: 20px;
  1200. }
  1201. /deep/ .el-input-number .el-input--mini {
  1202. line-height: 20px;
  1203. }
  1204. /* PO表格输入控件防遮挡 */
  1205. .po-section {
  1206. /deep/ .el-table .cell {
  1207. overflow: visible !important;
  1208. padding-left: 4px;
  1209. padding-right: 4px;
  1210. }
  1211. /deep/ .el-input,
  1212. /deep/ .el-select {
  1213. width: 100% !important;
  1214. }
  1215. /deep/ .el-input-number .el-input__inner {
  1216. padding-left: 8px !important;
  1217. padding-right: 35px !important;
  1218. text-align: right;
  1219. }
  1220. /deep/ .el-input-number {
  1221. width: 120px !important;
  1222. min-width: 120px !important;
  1223. }
  1224. /deep/ .el-select .el-input__inner {
  1225. padding-right: 25px !important;
  1226. }
  1227. }
  1228. // 数字输入框按钮样式修复
  1229. /deep/ .el-input-number {
  1230. position: relative;
  1231. .el-input-number__increase,
  1232. .el-input-number__decrease {
  1233. width: 28px;
  1234. height: 50%;
  1235. position: absolute;
  1236. right: 0;
  1237. display: flex;
  1238. align-items: center;
  1239. justify-content: center;
  1240. background-color: #f5f7fa;
  1241. border: none;
  1242. cursor: pointer;
  1243. transition: all 0.2s;
  1244. font-size: 12px;
  1245. &:hover {
  1246. background-color: #ecf5ff;
  1247. color: #409eff;
  1248. }
  1249. &:active {
  1250. background-color: #d9e1f0;
  1251. }
  1252. }
  1253. .el-input-number__increase {
  1254. top: 0;
  1255. bottom: auto;
  1256. border-bottom: 1px solid #dcdfe6;
  1257. border-top-right-radius: 4px;
  1258. }
  1259. .el-input-number__decrease {
  1260. top: auto;
  1261. bottom: 0;
  1262. border-bottom-right-radius: 4px;
  1263. }
  1264. // 确保输入框右边留出按钮空间
  1265. .el-input__inner {
  1266. padding-right: 32px !important;
  1267. }
  1268. }
  1269. // 数字输入框按钮样式修复
  1270. /deep/ .el-input-number {
  1271. position: relative;
  1272. .el-input-number__increase,
  1273. .el-input-number__decrease {
  1274. width: 28px;
  1275. height: 50%;
  1276. position: absolute;
  1277. right: 0;
  1278. display: flex;
  1279. align-items: center;
  1280. justify-content: center;
  1281. background-color: #f5f7fa;
  1282. border: none;
  1283. cursor: pointer;
  1284. transition: all 0.2s;
  1285. font-size: 12px;
  1286. &:hover {
  1287. background-color: #ecf5ff;
  1288. color: #409eff;
  1289. }
  1290. &:active {
  1291. background-color: #d9e1f0;
  1292. }
  1293. }
  1294. .el-input-number__increase {
  1295. top: 0;
  1296. bottom: auto;
  1297. border-bottom: 1px solid #dcdfe6;
  1298. border-top-right-radius: 4px;
  1299. }
  1300. .el-input-number__decrease {
  1301. top: auto;
  1302. bottom: 0;
  1303. border-bottom-right-radius: 4px;
  1304. }
  1305. .el-input__inner {
  1306. padding-right: 32px !important;
  1307. }
  1308. }
  1309. /deep/ .el-input-number--mini {
  1310. .el-input-number__increase,
  1311. .el-input-number__decrease {
  1312. width: 24px;
  1313. font-size: 10px;
  1314. }
  1315. .el-input__inner {
  1316. padding-right: 28px !important;
  1317. }
  1318. }
  1319. // PO表格行样式 - 验货数量修改后标红
  1320. .po-section /deep/ .el-table__row.modified-row {
  1321. background-color: #fef0f0 !important;
  1322. &:hover > td {
  1323. background-color: #fde2e2 !important;
  1324. }
  1325. }
  1326. .po-section {
  1327. /deep/ .el-date-editor.el-input,
  1328. /deep/ .el-date-editor.el-input__inner {
  1329. width: 100%;
  1330. }
  1331. /deep/ .el-date-editor .el-input__inner {
  1332. height: 28px;
  1333. line-height: 28px;
  1334. padding-left: 10px;
  1335. padding-right: 10px;
  1336. font-size: 12px;
  1337. }
  1338. /deep/ .el-date-editor .el-input__prefix {
  1339. display: none;
  1340. }
  1341. /deep/ .el-date-editor .el-input__suffix {
  1342. right: 5px;
  1343. }
  1344. }
  1345. </style>