|
|
@@ -5,28 +5,22 @@
|
|
|
:close-on-click-modal="false"
|
|
|
:close-on-press-escape="false"
|
|
|
@close="handleClose"
|
|
|
- width="1200px"
|
|
|
+ width="1400px"
|
|
|
>
|
|
|
<div style="margin-bottom: 20px">
|
|
|
- <span>农户姓名:</span>
|
|
|
- <el-input
|
|
|
- v-model="form.tarcecodeapplyno"
|
|
|
- style="width: 250px;margin:0 15px;"
|
|
|
- placeholder="请i输入农户编号/姓名/电话"
|
|
|
- @keyup.enter.native="handleSearch"
|
|
|
+ <el-date-picker
|
|
|
+ v-model="dateValue"
|
|
|
clearable
|
|
|
- />
|
|
|
- <span>时间:</span>
|
|
|
- <el-input
|
|
|
- v-model="form.tarcecodeapplyno"
|
|
|
- style="width: 250px;margin:0 15px;"
|
|
|
- placeholder="请i输入农户编号/姓名/电话"
|
|
|
- @keyup.enter.native="handleSearch"
|
|
|
- clearable
|
|
|
- />
|
|
|
+ value-format="yyyy-MM-dd HH:MM:SS"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
+ style="margin-left: 16px;"
|
|
|
@click="handleSearch"
|
|
|
>查询</el-button
|
|
|
>
|
|
|
@@ -36,172 +30,96 @@
|
|
|
:args="{ 'highlight-current-row': true }"
|
|
|
:data="loadData"
|
|
|
:columns="columns"
|
|
|
+ showIndex
|
|
|
>
|
|
|
- <template #styleImg="scope">
|
|
|
- <el-image
|
|
|
- :src="scope.row.imgPreview"
|
|
|
- :preview-src-list="[scope.row.imgPreview]"
|
|
|
- slot="error"
|
|
|
- class="image-slot"
|
|
|
- style="width: 100px; height: 50px"
|
|
|
- >
|
|
|
- <div slot="error" class="image-slot"></div>
|
|
|
- </el-image>
|
|
|
- </template>
|
|
|
- <template #number="scope">
|
|
|
- <div>1</div>
|
|
|
- <div>2</div>
|
|
|
- {{ scope.row.finishGoodName&&scope.row.finishgoodNo?scope.row.finishGoodName + '-' + scope.row.finishgoodNo:'' }}
|
|
|
- </template>
|
|
|
- <template #codeNo="scope">
|
|
|
- <el-link
|
|
|
- type="primary"
|
|
|
- :underline="false"
|
|
|
- @click="goDetail(scope.row)"
|
|
|
- >{{ scope.row.traceCodeApplyConcat }}</el-link
|
|
|
- >
|
|
|
- </template>
|
|
|
- <template #status="scope">
|
|
|
- <span style="display:flex;align-items:center;justify-content:center">
|
|
|
- <span class="status"></span>
|
|
|
- {{ scope.row.name }}
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- <template #useNumber="scope">
|
|
|
- {{ scope.row.useNumber + '/' + scope.row.totalNumber }}
|
|
|
- </template>
|
|
|
- <template #finishGoodName="scope">
|
|
|
- {{ scope.row.finishGoodName&&scope.row.finishgoodNo?scope.row.finishGoodName + '-' + scope.row.finishgoodNo:'' }}
|
|
|
- </template>
|
|
|
</b-table>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { getCardusercdList } from '@/api/card/index.js'
|
|
|
import { assign, omit } from 'lodash-es';
|
|
|
-import { UPLOAD_TYPE_MAP } from '@/utils/constants';
|
|
|
import LeftImg from '../assets/img.svg'
|
|
|
import BTable from '@/components/Table'
|
|
|
export default {
|
|
|
name: 'IrrigationRecord',
|
|
|
props: {
|
|
|
- data: {
|
|
|
- default() {
|
|
|
- return {};
|
|
|
- }
|
|
|
- },
|
|
|
visible: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
+ },
|
|
|
+ irrigationDetail: {
|
|
|
+ type: Object,
|
|
|
+ default: () => { }
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
LeftImg: LeftImg,
|
|
|
- imageUploadType: UPLOAD_TYPE_MAP.FARMING_RECORD,
|
|
|
+ dateValue: '',
|
|
|
columns: [
|
|
|
{
|
|
|
- label: '行政区',
|
|
|
- prop: 'person',
|
|
|
+ label: '水源编号',
|
|
|
+ prop: 'waterNum',
|
|
|
customRender: '',
|
|
|
- align: 'center'
|
|
|
+ align: 'center',
|
|
|
},
|
|
|
{
|
|
|
- label: '农户',
|
|
|
- prop: 'area',
|
|
|
+ label: '水源名称',
|
|
|
+ prop: 'waterName',
|
|
|
customRender: '',
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
- label: '手机号',
|
|
|
- prop: 'name',
|
|
|
+ label: '本次耗水量(m³)',
|
|
|
+ prop: 'cardusercdWaternum',
|
|
|
customRender: '',
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
- label: '计量模式',
|
|
|
- prop: 'phone',
|
|
|
- customRender: 'number',
|
|
|
- align: 'center'
|
|
|
- },{
|
|
|
- label: '总金额',
|
|
|
- prop: 'phone',
|
|
|
- customRender: '',
|
|
|
- align: 'center'
|
|
|
- },{
|
|
|
- label: '用水量',
|
|
|
- prop: 'phone',
|
|
|
+ label: '本次用水量(°)',
|
|
|
+ prop: 'cardusercdWaternum',
|
|
|
customRender: '',
|
|
|
align: 'center'
|
|
|
- },{
|
|
|
- label: '用水金额',
|
|
|
- prop: 'phone',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '开始时间',
|
|
|
+ prop: 'cardusercdStarttime',
|
|
|
customRender: '',
|
|
|
align: 'center'
|
|
|
- },{
|
|
|
- label: '用电量',
|
|
|
- prop: 'phone',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '结束时间',
|
|
|
+ prop: 'cardusercdEndtime',
|
|
|
customRender: '',
|
|
|
align: 'center'
|
|
|
- },{
|
|
|
- label: '用电金额',
|
|
|
- prop: 'phone',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '使用时长',
|
|
|
+ prop: 'cardusercdDuration',
|
|
|
customRender: '',
|
|
|
align: 'center'
|
|
|
- },{
|
|
|
- label: '开泵时间',
|
|
|
- prop: 'phone',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '计费方式',
|
|
|
+ prop: 'cardusercdBillingtype',
|
|
|
customRender: '',
|
|
|
align: 'center'
|
|
|
- },{
|
|
|
- label: '关泵时间',
|
|
|
- prop: 'phone',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '计费标准',
|
|
|
+ prop: 'cardusercdPriceinfo',
|
|
|
customRender: '',
|
|
|
align: 'center'
|
|
|
- },{
|
|
|
- label: '灌溉时长',
|
|
|
- prop: 'phone',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '扣除金额',
|
|
|
+ prop: 'cardusercdUsemoney',
|
|
|
customRender: '',
|
|
|
align: 'center'
|
|
|
}
|
|
|
],
|
|
|
- form: {
|
|
|
- productName: ''
|
|
|
- },
|
|
|
- dialogSubmitLoading: false,
|
|
|
dialogVisible: false,
|
|
|
- baseForm: {
|
|
|
- productValue: '',
|
|
|
- productName: '',
|
|
|
- stockAmount: '',
|
|
|
- goodsUnit: '',
|
|
|
- goodsSpecValue: '',
|
|
|
- imageArr1: [],
|
|
|
- supplierId: '',
|
|
|
- imageArr2: []
|
|
|
- },
|
|
|
- productList: [],
|
|
|
- syinfoList: [],
|
|
|
- processList: [],
|
|
|
- hasFetched: false,
|
|
|
- landList: [], //基地列表
|
|
|
- rules: {
|
|
|
- stockAmount: [
|
|
|
- { required: true, message: '请选择负责人', trigger: 'blur' }
|
|
|
- ],
|
|
|
- sourceinfoId: [
|
|
|
- { required: true, message: '请选择管辖范围', trigger: 'blur' }
|
|
|
- ],
|
|
|
- productName: [
|
|
|
- { required: true, message: '请输入协会名称', trigger: 'blur' }
|
|
|
- ],
|
|
|
- supplierId: [
|
|
|
- { required: false, message: '请输入协会介绍', trigger: 'blur' }
|
|
|
- ],
|
|
|
- goodsSpecValue: [
|
|
|
- { required: true, message: '请选择规格', trigger: 'blur' }
|
|
|
- ]
|
|
|
- }
|
|
|
};
|
|
|
},
|
|
|
components:{
|
|
|
@@ -211,119 +129,37 @@ export default {
|
|
|
visible(val) {
|
|
|
if (val !== this.dialogVisible) {
|
|
|
this.dialogVisible = val;
|
|
|
- if (val) {
|
|
|
- assign(this.baseForm, this.data);
|
|
|
- if (!this.hasFetched) {
|
|
|
- this.getProductList();
|
|
|
- this.getSyinfoList();
|
|
|
- this.getProcessList();
|
|
|
- this.hasFetched = true;
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
},
|
|
|
- data: {
|
|
|
- deep: true,
|
|
|
+ irrigationDetail: {
|
|
|
handler(val) {
|
|
|
- // console.log(val)
|
|
|
- assign(this.baseForm, val);
|
|
|
- // console.log(this.baseForm)
|
|
|
- }
|
|
|
+ console.log(val,'valvalval')
|
|
|
+ const farmerId = val?.farmerId
|
|
|
+ this.farmerId = farmerId
|
|
|
+ this.handleSearch()
|
|
|
+ },
|
|
|
+ deep: true
|
|
|
}
|
|
|
},
|
|
|
- created() {},
|
|
|
- mounted() {},
|
|
|
methods: {
|
|
|
loadData(parameter) {
|
|
|
- const queryform = this.form;
|
|
|
- const payload = omit(assign({}, parameter, queryform, {orderByColumn:'tarcecodeapplyCreateddate',isAsc:'desc'}), []);
|
|
|
+ const payload = omit(assign({}, parameter), []);
|
|
|
return this.getTableData(payload);
|
|
|
},
|
|
|
- handleSearch() {},
|
|
|
- getTableData(payload) {
|
|
|
- return Promise.resolve({
|
|
|
- data: [{
|
|
|
- person:"王大虎",
|
|
|
- area: '2016-05-02',
|
|
|
- name: '王小虎',
|
|
|
- phone: 1588888888,
|
|
|
- address: '上海市普陀区金沙<br>江路 1518 弄'
|
|
|
- }, {
|
|
|
- person:"王大虎",
|
|
|
- area: '2016-05-04',
|
|
|
- name: '王小虎',
|
|
|
- phone: 1588888888,
|
|
|
- address: '上海市普陀区金沙江路 1517 弄'
|
|
|
- }, {
|
|
|
- person:"王大虎",
|
|
|
- area: '2016-05-01',
|
|
|
- name: '王小虎',
|
|
|
- phone: 1588888888,
|
|
|
- address: '上海市普陀区金沙江路 1519 弄'
|
|
|
- }, {
|
|
|
- person:"王大虎",
|
|
|
- area: '2016-05-03',
|
|
|
- name: '王小虎',
|
|
|
- phone: 1588888888,
|
|
|
- address: '上海市普陀区金沙江路 1516 弄'
|
|
|
- }]
|
|
|
- })
|
|
|
- },
|
|
|
- getProductList() {
|
|
|
- },
|
|
|
- getSyinfoList() {
|
|
|
- },
|
|
|
- getProcessList() {
|
|
|
- },
|
|
|
- goProductsPage() {
|
|
|
- this.handleClose();
|
|
|
- this.$router.push({
|
|
|
- path: '/Products',
|
|
|
- query: {}
|
|
|
- });
|
|
|
+ handleSearch() {
|
|
|
+ this.$refs.tableRef && this.$refs.tableRef.refresh(true);
|
|
|
},
|
|
|
- goSourceInfoPage() {
|
|
|
- this.handleClose();
|
|
|
- this.$router.push({
|
|
|
- path: '/sourceInfo',
|
|
|
- query: {
|
|
|
- type: 'add'
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- goProcessPage() {
|
|
|
- this.handleClose();
|
|
|
- this.$router.push({
|
|
|
- path: '/basicsettings/process',
|
|
|
- query: {}
|
|
|
- });
|
|
|
- },
|
|
|
- resetForm(formName) {
|
|
|
- this.dialogVisible = false;
|
|
|
- },
|
|
|
- resetFormData() {
|
|
|
- this.baseForm = {};
|
|
|
- },
|
|
|
- submitForm(formName) {
|
|
|
- this.$refs[formName].validate((valid) => {
|
|
|
- console.log(valid)
|
|
|
+ getTableData() {
|
|
|
+ const [startTime,endTime] = this.dateValue
|
|
|
+ return getCardusercdList({
|
|
|
+ farmerId: this.farmerId,
|
|
|
+ startTime,
|
|
|
+ endTime
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
handleClose() {
|
|
|
this.$emit('update:visible', false);
|
|
|
- this.resetForm('baseForm');
|
|
|
- },
|
|
|
- handleSuccess() {
|
|
|
- this.resetForm('baseForm');
|
|
|
- this.$emit('update:visible', false);
|
|
|
- this.$emit('success');
|
|
|
},
|
|
|
- handleKeyUp(target, key) {
|
|
|
- target[key] = target[key].match(/\d+(\.\d{0,2})?/)
|
|
|
- ? target[key].match(/\d+(\.\d{0,2})?/)[0]
|
|
|
- : '';
|
|
|
- }
|
|
|
}
|
|
|
};
|
|
|
</script>
|