|
@@ -0,0 +1,110 @@
|
|
|
+<template>
|
|
|
+ <div class="page-container column-container">
|
|
|
+ <!-- 功能按钮区 -->
|
|
|
+ <div class="list-btns-container">
|
|
|
+ <el-button type="success" icon="Plus" @click="handleBalance" v-hasPermi="['business:firstOutsource:add']">
|
|
|
+ 结算
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" icon="Plus" @click="handleCheckAll" v-hasPermi="['business:firstOutsource:add']">
|
|
|
+ 全选
|
|
|
+ </el-button>
|
|
|
+ <el-button type="info" icon="Plus" @click="handleDisbalance" v-hasPermi="['business:firstOutsource:add']">
|
|
|
+ 取消结算
|
|
|
+ </el-button>
|
|
|
+ <el-button type="warning" icon="Plus" @click="handleExport" v-hasPermi="['business:firstOutsource:add']">
|
|
|
+ 导出
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <!-- 渲染数据区 -->
|
|
|
+ <div class="el-table-container" style="flex-basis: 1;">
|
|
|
+ <div class="el-table-inner-container">
|
|
|
+ <vxe-table ref="tableRef" border height="100%" :row-config="{ isHover: true }" :data="tableData"
|
|
|
+ :checkbox-config="{ highlight: true }" :scroll-y="{ enabled: true }" show-overflow keep-source
|
|
|
+ :edit-config="{ trigger: 'click', mode: 'row', showStatus: true }" @checkbox-change="handleSelectChange">
|
|
|
+ <vxe-column type="checkbox" width="50" align="center"></vxe-column>
|
|
|
+ <vxe-column field="supplierName" title="外协商简称" align="center">
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="productDescription" title="产品描述" align="center">
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="processAlias" title="工序名称" align="center">
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="status" title="状态" align="center">
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="processPrice" title="工序单价" align="center" :edit-render="{}">
|
|
|
+ <template #edit="scope">
|
|
|
+ <el-input-number v-model="scope.row.processPrice" :control="false" :min="0" :precision="4" />
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="otherCut" title="其他扣款" align="center" :edit-render="{}">
|
|
|
+ <template #edit="scope">
|
|
|
+ <el-input-number v-model="scope.row.otherCut" :control="false" :min="0" :precision="4" />
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="differrence" title="补差额" align="center" :edit-render="{}">
|
|
|
+ <template #edit="scope">
|
|
|
+ <el-input-number v-model="scope.row.differrence" :control="false" :min="0" :precision="4" />
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="prodNum" title="投入数量" align="center">
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="outsourceNum" title="发出数量" align="center">
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="receiptNum" title="收回数量" align="center">
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="actuallyInput" title="实投料量" align="center">
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="prodNum" title="料损数量" align="center">
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="prodNum" title="扣料金额" align="center">
|
|
|
+ </vxe-column>
|
|
|
+ </vxe-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import { ref } from 'vue'
|
|
|
+import region from '@/utils/region.js'
|
|
|
+const tableData = ref([])
|
|
|
+const tableRef = ref(null)
|
|
|
+const handleAdd = () => {
|
|
|
+ tableData.value.push(...region.map(e => ({ ...e })))
|
|
|
+}
|
|
|
+
|
|
|
+const changeCellEvent = (params) => {
|
|
|
+ const $table = tableRef.value
|
|
|
+ if ($table) {
|
|
|
+ $table.updateStatus(params)
|
|
|
+ }
|
|
|
+ console.log(tableData.value)
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+const handleBalance = () => {
|
|
|
+}
|
|
|
+
|
|
|
+const handleDisbalance = () => {
|
|
|
+}
|
|
|
+
|
|
|
+const handleCheckAll = () => {
|
|
|
+ const $table = tableRef.value
|
|
|
+ if ($table) {
|
|
|
+ $table.setAllCheckboxRow(true)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const handleExport = () => {
|
|
|
+ const $table = tableRef.value
|
|
|
+ if ($table) {
|
|
|
+ $table.exportData({
|
|
|
+ type: 'csv',
|
|
|
+ filename: 'table-export'
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const handleSelectChange = (params) => {
|
|
|
+ console.log(params)
|
|
|
+}
|
|
|
+</script>
|