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.

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