|
@@ -45,8 +45,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="customer-main">
|
|
|
- <containerTitle title="基础信息"></containerTitle>
|
|
|
- <basic-container>
|
|
|
+ <trade-card title="基础信息">
|
|
|
<avue-form class="trading-form" ref="form" v-model="form" :option="option">
|
|
|
<template slot="corpId">
|
|
|
<crop-select v-model="form.corpId" corpType="KG" :disabled="viewDisabled" style="width: 100%"></crop-select>
|
|
@@ -77,7 +76,7 @@
|
|
|
</el-input>
|
|
|
</template>
|
|
|
</avue-form>
|
|
|
- </basic-container>
|
|
|
+ </trade-card>
|
|
|
<containerTitle title="明细列表"></containerTitle>
|
|
|
<basic-container>
|
|
|
<avue-crud ref="crud" :data="data" :option="optionTable" :table-loading="loading" v-model="optionFrom"
|
|
@@ -108,18 +107,34 @@
|
|
|
<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 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)"
|
|
|
:disabled="row.strStatus == '结算完成' || viewDisabled">删除</el-button>
|
|
|
</template>
|
|
|
<template slot="userid" slot-scope="{row,index}">
|
|
|
- <span v-if="row.$cellEdit" class="required_fields">*</span>
|
|
|
- <user-select style="width:90% !important;" v-if="row.$cellEdit" v-model="row.userName"
|
|
|
- @value="(values) => value(values, row)" :configuration="UConfiguration">
|
|
|
+ <user-select v-if="row.$cellEdit" v-model="row.userName" @value="(values) => value(values, row)"
|
|
|
+ :configuration="UConfiguration">
|
|
|
</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="second" slot-scope="{ row }">
|
|
|
+ <el-select v-if="row.$cellEdit && row.frequency == 4" size="small" v-model="row.second" placeholder="请选择"
|
|
|
+ clearable>
|
|
|
+ <el-option v-for="item in secondList" :key="item.id" :label="item.dictValue" :value="item.dictKey">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <span v-else>{{ row.frequency == 4 ? row.second : '-' }}</span>
|
|
|
+ </template>
|
|
|
<template slot="amount" slot-scope="{ row }">
|
|
|
<el-input v-if="row.$cellEdit" v-model="row.amount" placeholder="请输入" size="small"
|
|
|
oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
@@ -295,7 +310,7 @@ import optionReturn from "../receipt/configuration/settleAccountsDetailsReturn.j
|
|
|
import { getDeptTree } from "@/api/system/dept";
|
|
|
import messagePost from "@/components/messageSend/main"
|
|
|
import clientOption from "../performanceAnalysis/config/clientList.json";
|
|
|
-
|
|
|
+import { getGoodsDescList } from "@/api/standAlone/saleLeads";
|
|
|
|
|
|
export default {
|
|
|
props: {
|
|
@@ -309,6 +324,9 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ goodsDescList: [],
|
|
|
+ secondList: [],
|
|
|
+ frequencyList: [],
|
|
|
id: '',
|
|
|
loading: false,
|
|
|
form: {},
|
|
@@ -629,11 +647,11 @@ export default {
|
|
|
oldUpLoadData: [],
|
|
|
oldForm: {},
|
|
|
oldFormTwo: {},
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
|
this.optionTable = await this.getColumnData(this.getColumnName(56), option);
|
|
|
-
|
|
|
getDeptTree("096359").then(res => {
|
|
|
this.optionTable.column.forEach(item => {
|
|
|
if (item.prop === "deptid") {
|
|
@@ -650,15 +668,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
-
|
|
|
- //字典值
|
|
|
- this.getWorkDicts("source_Business").then(res => {
|
|
|
- this.sourceBusinessDic = res.data.data;
|
|
|
- })
|
|
|
- this.getWorkDicts("frequency").then(res => {
|
|
|
- this.findObject(this.optionTable.column, "frequency").dicData = res.data.data;
|
|
|
- });
|
|
|
-
|
|
|
if (this.detailData.id) {
|
|
|
this.id = this.detailData.id;//字符串转数字 超长用BigInt
|
|
|
|
|
@@ -666,6 +675,33 @@ export default {
|
|
|
this.afterEcho(res.data.data)
|
|
|
})
|
|
|
|
|
|
+ } else if (this.detailData.data) {
|
|
|
+ getGoodsDescList().then(res => {
|
|
|
+ this.goodsDescList = res.data.data
|
|
|
+ let form = this.detailData.data
|
|
|
+ this.form.corpId = form.corpId
|
|
|
+ this.form.corpName = form.corpName
|
|
|
+ form.itemList.forEach(e => {
|
|
|
+ this.goodsDescList.forEach(item => {
|
|
|
+ if (e.spId == item.id) {
|
|
|
+ this.data.push({
|
|
|
+ strStatus: "录入",
|
|
|
+ pname: item.cname,
|
|
|
+ remarks: item.remarks,
|
|
|
+ price: item.price,
|
|
|
+ unit: item.unit,
|
|
|
+ secondDisable: this.secondDisable,
|
|
|
+ frequency: item.rate,
|
|
|
+ projectType: this.secondDisable,
|
|
|
+ $cellEdit: true
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
} else {
|
|
|
//责任人 承揽人 默认当前登录人
|
|
|
this.$set(this.formTwo, "corpAttn", this.$store.getters.userInfo.user_name)
|
|
@@ -678,7 +714,7 @@ export default {
|
|
|
this.$set(this.formTwo, "createUserName", this.$store.getters.userInfo.user_name)
|
|
|
|
|
|
let date = new Date();
|
|
|
- let strDate = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
|
|
+ let strDate = date.getFullYear() + "-" + (date.getsecond() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
|
|
this.$set(this.formTwo, "createTime", strDate)
|
|
|
|
|
|
//备注格式
|
|
@@ -704,6 +740,16 @@ export default {
|
|
|
this.afterEcho(res.data.data)
|
|
|
})
|
|
|
}
|
|
|
+ //字典值
|
|
|
+ this.getWorkDicts("source_Business").then(res => {
|
|
|
+ this.sourceBusinessDic = res.data.data;
|
|
|
+ })
|
|
|
+ this.getWorkDicts("frequency").then(res => {
|
|
|
+ this.frequencyList = res.data.data;
|
|
|
+ });
|
|
|
+ this.getWorkDicts("second").then(res => {
|
|
|
+ this.secondList = res.data.data;
|
|
|
+ });
|
|
|
},
|
|
|
mounted() {
|
|
|
|
|
@@ -871,6 +917,9 @@ export default {
|
|
|
this.accountDialog = true;
|
|
|
}
|
|
|
},
|
|
|
+ dispatch() {
|
|
|
+ console.log('paigong')
|
|
|
+ },
|
|
|
//结算
|
|
|
closeAccount(form) {
|
|
|
this.$refs[form].validate((valid) => {
|
|
@@ -948,9 +997,6 @@ export default {
|
|
|
if (valid) {
|
|
|
this.detailsCollection()
|
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
|
- if (this.dataList[i].userid === (null || "")) {
|
|
|
- return this.$message.error(`请输入明细列表第${i + 1}行的承做人`);
|
|
|
- }
|
|
|
if (this.dataList[i].deptid === (null || "")) {
|
|
|
return this.$message.error(`请输入明细列表第${i + 1}行的任务部门`);
|
|
|
}
|
|
@@ -1019,7 +1065,7 @@ export default {
|
|
|
this.$set(this.formTwo, "createUserName", this.$store.getters.userInfo.user_name)
|
|
|
|
|
|
let date = new Date();
|
|
|
- let strDate = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
|
|
+ let strDate = date.getFullYear() + "-" + (date.getsecond() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
|
|
this.$set(this.formTwo, "createTime", strDate)
|
|
|
})
|
|
|
}
|
|
@@ -1130,6 +1176,9 @@ export default {
|
|
|
this.page.currentPage = val;
|
|
|
this.getList();
|
|
|
},
|
|
|
+ frequencyChange(row) {
|
|
|
+ row.second = null
|
|
|
+ },
|
|
|
//上传文件保存
|
|
|
upLoadSave(row, done, loading) {
|
|
|
this.upLoadData.push(row)
|
|
@@ -1387,6 +1436,17 @@ export default {
|
|
|
// })
|
|
|
// },
|
|
|
},
|
|
|
+ filters: {
|
|
|
+ frequencyFormat(val, list) {
|
|
|
+ let name;
|
|
|
+ list.forEach(e => {
|
|
|
+ if (e.dictKey == val) {
|
|
|
+ name = e.dictValue
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return name;
|
|
|
+ }
|
|
|
+ },
|
|
|
watch: {
|
|
|
dataList: function (list) {
|
|
|
|