|
@@ -107,7 +107,8 @@
|
|
|
<el-button v-if="row.status !== 5" type="text" size="small" @click="beforeCloseAccount(row)">结算</el-button>
|
|
|
<el-button v-if="row.status === 5" type="text" size="small" :disabled="viewDisabled"
|
|
|
@click="cancelCloseAccount(row)">取消结算</el-button>
|
|
|
- <el-button v-if="row.status !== 5" type="text" size="small" @click="dispatch(row)">派工</el-button>
|
|
|
+ <el-button :disabled="row.taskStatus != 10" type="text" size="small"
|
|
|
+ @click="dispatch(row)">派工</el-button>
|
|
|
<el-button type="text" size="small" @click="rowCellTwo(row, index)"
|
|
|
:disabled="row.strStatus == '结算完成' || viewDisabled">{{ row.$cellEdit ? '修改完成' : '修改' }}</el-button>
|
|
|
<el-button type="text" size="small" @click="rowDel(row, index)"
|
|
@@ -119,14 +120,14 @@
|
|
|
</user-select>
|
|
|
<span v-else>{{ row.userName }}</span>
|
|
|
</template>
|
|
|
-<!-- <template slot="frequency" slot-scope="{ row }">-->
|
|
|
-<!-- <el-select v-if="row.$cellEdit" size="small" v-model="row.frequency" placeholder="请选择"-->
|
|
|
-<!-- @change="frequencyChange(row)" clearable>-->
|
|
|
-<!-- <el-option v-for="item in frequencyList" :key="item.id" :label="item.dictValue" :value="item.dictKey">-->
|
|
|
-<!-- </el-option>-->
|
|
|
-<!-- </el-select>-->
|
|
|
-<!-- <span v-else>{{ row.frequency | frequencyFormat(frequencyList) }}</span>-->
|
|
|
-<!-- </template>-->
|
|
|
+ <!-- <template slot="frequency" slot-scope="{ row }">-->
|
|
|
+ <!-- <el-select v-if="row.$cellEdit" size="small" v-model="row.frequency" placeholder="请选择"-->
|
|
|
+ <!-- @change="frequencyChange(row)" clearable>-->
|
|
|
+ <!-- <el-option v-for="item in frequencyList" :key="item.id" :label="item.dictValue" :value="item.dictKey">-->
|
|
|
+ <!-- </el-option>-->
|
|
|
+ <!-- </el-select>-->
|
|
|
+ <!-- <span v-else>{{ row.frequency | frequencyFormat(frequencyList) }}</span>-->
|
|
|
+ <!-- </template>-->
|
|
|
<template slot="second" slot-scope="{ row }">
|
|
|
<el-select v-if="row.$cellEdit && row.frequency == 4" size="small" v-model="row.second" placeholder="请选择"
|
|
|
clearable>
|
|
@@ -153,6 +154,11 @@
|
|
|
@input="costCount(row)" @change="totalChange(row, '代垫')"></el-input>
|
|
|
<span v-else>{{ row.matMoney }}</span>
|
|
|
</template>
|
|
|
+ <template slot="taskStatus" slot-scope="{ row }">
|
|
|
+ <span v-if="row.taskStatus == 10">暂存</span>
|
|
|
+ <span v-if="row.taskStatus == 20">进行中</span>
|
|
|
+ <span v-if="row.taskStatus == 30">完成</span>
|
|
|
+ </template>
|
|
|
<template slot="otheramt" slot-scope="{ row }">
|
|
|
<el-input v-if="row.$cellEdit" v-model="row.otheramt" placeholder="请输入" size="small"
|
|
|
oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
@@ -280,13 +286,24 @@
|
|
|
<el-button type="primary" size="small" @click="closeAccount('accountFormData')">结算</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="派工" append-to-body class="el-dialogDeep" :visible.sync="pgDialog" width="50%"
|
|
|
+ :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false">
|
|
|
+ <span>
|
|
|
+ <avue-crud :data="pgList" :option="pgOption"></avue-crud>
|
|
|
+ </span>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="pgDialog = false" size="small">取 消</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="pgConfirm">派 工
|
|
|
+ </el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import option from "./configuration/detailsPage.json";
|
|
|
import startOption from "./configuration/startDialog.json";
|
|
|
-import { projectDetail, editMianProject, settleAccounts, getSysNo, masterCheck } from "@/api/workManagement/mainProject";
|
|
|
+import { projectDetail, editMianProject, settleAccounts, getSysNo, masterCheck, dispatch } from "@/api/workManagement/mainProject";
|
|
|
//上传文件json
|
|
|
import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json"
|
|
|
//服务列表接口
|
|
@@ -324,6 +341,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ pgList: [],
|
|
|
+ pgDialog: false,
|
|
|
goodsDescList: [],
|
|
|
secondList: [],
|
|
|
frequencyList: [],
|
|
@@ -647,6 +666,30 @@ export default {
|
|
|
oldUpLoadData: [],
|
|
|
oldForm: {},
|
|
|
oldFormTwo: {},
|
|
|
+ pgOption: {
|
|
|
+ border: true,
|
|
|
+ align: 'center',
|
|
|
+ menuAlign: 'center',
|
|
|
+ menu: false,
|
|
|
+ header: false,
|
|
|
+ height: 400,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '承做人',
|
|
|
+ prop: 'userName'
|
|
|
+ }, {
|
|
|
+ label: '金额',
|
|
|
+ prop: 'jine'
|
|
|
+ }, {
|
|
|
+ label: '开始日期',
|
|
|
+ prop: 'beginTime',
|
|
|
+ cell: true,
|
|
|
+ type: "date",
|
|
|
+ format: 'yyyy-MM-dd',
|
|
|
+ valueFormat: 'yyyy-MM-dd 00:00:00'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
|
|
|
};
|
|
|
},
|
|
@@ -747,7 +790,7 @@ export default {
|
|
|
this.getWorkDicts("frequency").then(res => {
|
|
|
this.frequencyList = res.data.data;
|
|
|
this.findObject(this.optionTable.column, "frequency").dicData = res.data.data
|
|
|
- this.findObject(this.optionTable.column, "frequency").change = (data)=>{
|
|
|
+ this.findObject(this.optionTable.column, "frequency").change = (data) => {
|
|
|
this.frequencyChange(data.row)
|
|
|
}
|
|
|
});
|
|
@@ -921,8 +964,55 @@ export default {
|
|
|
this.accountDialog = true;
|
|
|
}
|
|
|
},
|
|
|
- dispatch() {
|
|
|
- console.log('paigong')
|
|
|
+ dispatch(row) {
|
|
|
+ if (row.id) {
|
|
|
+ this.pgList = []
|
|
|
+ if (row.frequency == 4 && row.second) {
|
|
|
+ for (let i = 0; i < row.second; i++) {
|
|
|
+ this.pgList.push({
|
|
|
+ ...row,
|
|
|
+ beginTime: "",
|
|
|
+ jine: row.amount / row.second,
|
|
|
+ $cellEdit: true
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ // row.second
|
|
|
+ } else {
|
|
|
+ this.pgList.push({
|
|
|
+ ...row,
|
|
|
+ beginTime: "",
|
|
|
+ jine: row.amount,
|
|
|
+ $cellEdit: true
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ this.pgDialog = true
|
|
|
+ },
|
|
|
+ pgConfirm() {
|
|
|
+ for (let i = 0; i < this.pgList.length; i++) {
|
|
|
+ if (!this.pgList[i].beginTime) {
|
|
|
+ return this.$message.error('请完善开始日期')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const params = {
|
|
|
+ ...this.form,
|
|
|
+ ...this.formTwo,
|
|
|
+ itemList: this.pgList,
|
|
|
+ filesList: this.upLoadData
|
|
|
+ }
|
|
|
+ dispatch(params).then(res => {
|
|
|
+ if (res.data.success) {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.pgDialog = false;
|
|
|
+ this.getProjectDetail();
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
//结算
|
|
|
closeAccount(form) {
|