|
@@ -6,11 +6,11 @@
|
|
|
label="收款日期:"
|
|
label="收款日期:"
|
|
|
>
|
|
>
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
- v-model="paymentTime"
|
|
|
|
|
- type="date"
|
|
|
|
|
- placeholder="请选择收款日期"
|
|
|
|
|
- format="YYYY-MM-DD"
|
|
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
|
|
|
|
+ v-model="condition.time"
|
|
|
|
|
+ type="month"
|
|
|
|
|
+ placeholder="请选择收款月份"
|
|
|
|
|
+ format="YYYY-MM"
|
|
|
|
|
+ value-format="YYYY-MM"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -18,36 +18,191 @@
|
|
|
<el-button
|
|
<el-button
|
|
|
type="primary"
|
|
type="primary"
|
|
|
:icon="Search"
|
|
:icon="Search"
|
|
|
|
|
+ @click="searchCollection"
|
|
|
>查询</el-button>
|
|
>查询</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <el-table v-model="pay.paymentList">
|
|
|
|
|
|
|
+ <el-col :span="14">
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ :data="pay.paymentList"
|
|
|
|
|
+ stripe
|
|
|
|
|
+ >
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="收款时间"
|
|
label="收款时间"
|
|
|
prop="collectionTime"
|
|
prop="collectionTime"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ width="180px"
|
|
|
/>
|
|
/>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- label="收款金额"
|
|
|
|
|
|
|
+ label="收款金额(元)"
|
|
|
prop="price"
|
|
prop="price"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ width="250px"
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="操作"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <el-popover
|
|
|
|
|
+ placement="top-start"
|
|
|
|
|
+ title="收款备注"
|
|
|
|
|
+ :width="200"
|
|
|
|
|
+ trigger="click"
|
|
|
|
|
+ :content="scope.remarks"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #reference>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ text
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ :icon="Notebook"
|
|
|
|
|
+ size="large"
|
|
|
|
|
+ >
|
|
|
|
|
+ 备注
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-popover>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ text
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ :icon="Edit"
|
|
|
|
|
+ size="large"
|
|
|
|
|
+ @click="openPaymentEdit(scope.row)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 编辑
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ text
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ :icon="Delete"
|
|
|
|
|
+ size="large"
|
|
|
|
|
+ @click="paymentDelete(scope.row)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 删除
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ v-model="paymentEditShow"
|
|
|
|
|
+ title="收款编辑"
|
|
|
|
|
+ width="40%"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-form>
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ label="收款金额:"
|
|
|
|
|
+ size="large"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="paymentEditData.days"
|
|
|
|
|
+ placeholder="请输入收款金额"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ label="收款日期:"
|
|
|
|
|
+ size="large"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="paymentEditData.collectionTime"
|
|
|
|
|
+ type="date"
|
|
|
|
|
+ placeholder="请选择收款日期"
|
|
|
|
|
+ format="YYYY-MM-DD"
|
|
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ label="收款备注:"
|
|
|
|
|
+ size="large"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="paymentEditData.remarks"
|
|
|
|
|
+ placeholder="请输入收款备注"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="paymentEdit"
|
|
|
|
|
+ >
|
|
|
|
|
+ 确认
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { ref } from 'vue'
|
|
|
|
|
-import { Search } from '@element-plus/icons-vue'
|
|
|
|
|
|
|
+import { reactive, ref } from 'vue'
|
|
|
|
|
+import { Search, Delete, Edit, Notebook } from '@element-plus/icons-vue'
|
|
|
|
|
+import { retrievalCollection, updateCollection } from '@/api/collection'
|
|
|
import { collectionOperate } from '@/pinia/collection/Collection'
|
|
import { collectionOperate } from '@/pinia/collection/Collection'
|
|
|
|
|
+import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
defineOptions({
|
|
defineOptions({
|
|
|
name: 'Payment'
|
|
name: 'Payment'
|
|
|
})
|
|
})
|
|
|
-const paymentTime = ref('')
|
|
|
|
|
const pay = collectionOperate()
|
|
const pay = collectionOperate()
|
|
|
-console.log(pay.paymentList)
|
|
|
|
|
|
|
+// 数据
|
|
|
|
|
+const condition = reactive({
|
|
|
|
|
+ pageInfo: {
|
|
|
|
|
+ page: 1,
|
|
|
|
|
+ pageSize: 10
|
|
|
|
|
+ },
|
|
|
|
|
+ code: '',
|
|
|
|
|
+ time: ''
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+const paymentEditShow = ref(false)
|
|
|
|
|
+const paymentEditData = reactive({
|
|
|
|
|
+ id: 0,
|
|
|
|
|
+ projectCode: '',
|
|
|
|
|
+ days: 0,
|
|
|
|
|
+ remarks: '',
|
|
|
|
|
+ collectionTime: ''
|
|
|
|
|
+})
|
|
|
|
|
+// 方法
|
|
|
|
|
+const openPaymentEdit = (row) => {
|
|
|
|
|
+ console.log(row)
|
|
|
|
|
+ paymentEditShow.value = true
|
|
|
|
|
+ paymentEditData.projectCode = row.projectCode
|
|
|
|
|
+ paymentEditData.collectionTime = row.collectionTime
|
|
|
|
|
+ paymentEditData.days = row.price
|
|
|
|
|
+ paymentEditData.id = row.ID
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const paymentEdit = () => {
|
|
|
|
|
+ updateCollection(paymentEditData).then(res => {
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ message: '编辑成功',
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ duration: 2000
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ paymentEditShow.value = false
|
|
|
|
|
+}
|
|
|
|
|
+const paymentDelete = (row) => {
|
|
|
|
|
+ console.log(row)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const searchCollection = () => {
|
|
|
|
|
+ condition.code = pay.paymentCode
|
|
|
|
|
+ console.log(condition)
|
|
|
|
|
+ retrievalCollection(condition).then(res => {
|
|
|
|
|
+ console.log(res.data)
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ pay.changePaymentList(res.data.list)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|