|
...
|
...
|
@@ -49,7 +49,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerjuc" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerjuc" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -75,7 +75,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerqg" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerqg" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -101,7 +101,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerhg" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerhg" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -136,7 +136,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerjig" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerjig" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -162,7 +162,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerjuc" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerjuc" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -188,7 +188,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerqg" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerqg" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -214,7 +214,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerhg" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerhg" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -248,7 +248,7 @@ |
|
|
|
</td>
|
|
|
|
<a-form-model-item prop="undertakerjig" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerjig" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -273,7 +273,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerjuc" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerjuc" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -299,7 +299,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerqg" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerqg" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -324,7 +324,7 @@ |
|
|
|
</td>
|
|
|
|
<a-form-model-item prop="undertakerhg" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerhg" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -358,7 +358,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerjig" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerjig" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -384,7 +384,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerjuc" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerjuc" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -410,7 +410,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerqg" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerqg" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -436,7 +436,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakermh1" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakermh1" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -462,7 +462,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakermh2" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakermh2" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -488,7 +488,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerhm" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerhm" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -514,7 +514,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerzp" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerzp" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -549,7 +549,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerjig" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerjig" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -575,7 +575,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerjuc" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerjuc" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -601,7 +601,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerqg" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerqg" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -627,7 +627,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakermh1" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakermh1" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -653,7 +653,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakermh2" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakermh2" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -679,7 +679,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerhm" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerhm" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -705,7 +705,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerzp" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerzp" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -740,7 +740,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerjig" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerjig" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -766,7 +766,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerjuc" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerjuc" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -793,7 +793,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakermh1" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakermh1" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -819,7 +819,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakermh2" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakermh2" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -845,7 +845,7 @@ |
|
|
|
<td>
|
|
|
|
<a-form-model-item prop="undertakerhm" style="margin-bottom: 0px">
|
|
|
|
<a-select size="small" v-model="model.undertakerhm" placeholder="请选择承接人" allowClear>
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{
|
|
|
|
<a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{
|
|
|
|
item.userName
|
|
|
|
}}</a-select-option>
|
|
|
|
</a-select>
|
|
...
|
...
|
@@ -887,8 +887,8 @@ export default { |
|
|
|
return {
|
|
|
|
orderNumber: '',
|
|
|
|
productType: '',
|
|
|
|
zong:0,
|
|
|
|
yp:0,
|
|
|
|
zong: 0,
|
|
|
|
yp: 0,
|
|
|
|
options: [],
|
|
|
|
model: {
|
|
|
|
//接地
|
|
...
|
...
|
@@ -1016,10 +1016,12 @@ export default { |
|
|
|
add(record) {
|
|
|
|
this.orderNumber = record.orderNumber
|
|
|
|
this.productType = record.productType
|
|
|
|
this.zong=record.totalWork
|
|
|
|
this.yp=record.pai
|
|
|
|
console.log('派工订单号:', this.orderNumber, '产品类型:', this.productType,"总工时:",this.zong,"已派工时:",this.yp)
|
|
|
|
this.zong = record.totalWork
|
|
|
|
this.yp = record.pai
|
|
|
|
|
|
|
|
console.log('派发人:', this.userInfo().realname)
|
|
|
|
//如果已派工时为0总工时*工时比例,否则(总工时-已派工时)*工时比例
|
|
|
|
if (record.pai <= 0) {
|
|
|
|
if (this.productType === 'JD') {
|
|
|
|
this.model.workHoursjig = parseFloat((record.totalWork * 0.5).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHoursqg = parseFloat((record.totalWork * 0.5).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
...
|
...
|
@@ -1058,12 +1060,52 @@ export default { |
|
|
|
this.model.workHoursmh2 = parseFloat((record.totalWork * 0.3).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHourshm = parseFloat((record.totalWork * 0.21).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
if (this.productType === 'JD') {
|
|
|
|
this.model.workHoursjig = parseFloat((record.pai * 0.5).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHoursqg = parseFloat((record.pai * 0.5).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHoursjuc = record.pai * 0
|
|
|
|
this.model.workHourshg = record.pai * 0
|
|
|
|
} else if (this.productType === 'XC') {
|
|
|
|
this.model.workHoursjig = parseFloat(((record.totalWork-record.pai) * 0.2).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHoursjuc = parseFloat(((record.totalWork-record.pai) * 0.06).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHoursqg = parseFloat(((record.totalWork-record.pai) * 0.32).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHourshg = parseFloat(((record.totalWork-record.pai) * 0.42).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
} else if (this.productType === 'QZ') {
|
|
|
|
this.model.workHoursjig = (record.totalWork-record.pai) * 0
|
|
|
|
this.model.workHoursjuc = parseFloat(((record.totalWork-record.pai) * 0.5).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHoursqg = parseFloat(((record.totalWork-record.pai) * 0.5).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHourshg = (record.totalWork-record.pai) * 0
|
|
|
|
} else if (this.productType === 'GX') {
|
|
|
|
this.model.workHoursjig = parseFloat(((record.totalWork-record.pai) * 0.13).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHoursjuc = parseFloat(((record.totalWork-record.pai) * 0.05).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHoursqg = parseFloat(((record.totalWork-record.pai) * 0.17).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHoursmh1 = parseFloat(((record.totalWork-record.pai) * 0.17).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHoursmh2 = parseFloat(((record.totalWork-record.pai) * 0.14).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHourshm = parseFloat(((record.totalWork-record.pai) * 0.15).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHourszp = parseFloat(((record.totalWork-record.pai) * 0.19).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
} else if (this.productType === 'SJ') {
|
|
|
|
this.model.workHoursjig = parseFloat(((record.totalWork-record.pai) * 0.13).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHoursjuc = parseFloat(((record.totalWork-record.pai) * 0.05).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHoursqg = parseFloat(((record.totalWork-record.pai) * 0.16).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHoursmh1 = parseFloat(((record.totalWork-record.pai) * 0.22).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHoursmh2 = parseFloat(((record.totalWork-record.pai) * 0.17).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHourshm = parseFloat(((record.totalWork-record.pai) * 0.16).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHourszp = parseFloat(((record.totalWork-record.pai) * 0.11).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
} else if (this.productType === 'FS') {
|
|
|
|
this.model.workHoursjig = parseFloat(((record.totalWork-record.pai) * 0.1).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHoursjuc = parseFloat(((record.totalWork-record.pai) * 0.04).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHoursmh1 = parseFloat(((record.totalWork-record.pai) * 0.35).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHoursmh2 = parseFloat(((record.totalWork-record.pai) * 0.3).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
this.model.workHourshm = parseFloat(((record.totalWork-record.pai) * 0.21).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
|
|
submitForm() {
|
|
|
|
const that = this
|
|
|
|
// 构造数据对象数组
|
|
|
|
let data = [];
|
|
|
|
let data = []
|
|
|
|
// 触发表单验证
|
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
|
if (valid) {
|
|
...
|
...
|
@@ -1188,7 +1230,7 @@ export default { |
|
|
|
workHours: this.model.workHourshg,
|
|
|
|
},
|
|
|
|
]
|
|
|
|
}else if (this.productType === 'GX') {
|
|
|
|
} else if (this.productType === 'GX') {
|
|
|
|
// 构造需要发送的数据数组对象
|
|
|
|
data = [
|
|
|
|
{
|
|
...
|
...
|
@@ -1254,10 +1296,8 @@ export default { |
|
|
|
undertaker: this.model.undertakerzp,
|
|
|
|
workHours: this.model.workHourszp,
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
]
|
|
|
|
}else if (this.productType === 'SJ') {
|
|
|
|
} else if (this.productType === 'SJ') {
|
|
|
|
// 构造需要发送的数据数组对象
|
|
|
|
data = [
|
|
|
|
{
|
|
...
|
...
|
@@ -1324,7 +1364,7 @@ export default { |
|
|
|
workHours: this.model.workHourszp,
|
|
|
|
},
|
|
|
|
]
|
|
|
|
}else if (this.productType === 'FS') {
|
|
|
|
} else if (this.productType === 'FS') {
|
|
|
|
// 构造需要发送的数据数组对象
|
|
|
|
data = [
|
|
|
|
{
|
|
...
|
...
|
@@ -1373,24 +1413,64 @@ export default { |
|
|
|
undertaker: this.model.undertakerhm,
|
|
|
|
workHours: this.model.workHourshm,
|
|
|
|
},
|
|
|
|
|
|
|
|
]
|
|
|
|
}
|
|
|
|
//接地工时和
|
|
|
|
var jiedihe=this.model.workHoursjig+this.model.workHoursjuc+this.model.workHourshg+this.model.workHoursqg+this.yp
|
|
|
|
var jiedihe =
|
|
|
|
parseFloat(this.model.workHoursjig) +
|
|
|
|
parseFloat(this.model.workHoursjuc) +
|
|
|
|
parseFloat(this.model.workHourshg) +
|
|
|
|
parseFloat(this.model.workHoursqg) +
|
|
|
|
parseFloat(this.yp)
|
|
|
|
//线槽
|
|
|
|
var xche=this.model.workHoursjig+this.model.workHoursjuc+this.model.workHourshg+this.model.workHoursqg
|
|
|
|
var xche =
|
|
|
|
parseFloat(this.model.workHoursjig) +
|
|
|
|
parseFloat(this.model.workHoursjuc) +
|
|
|
|
parseFloat(this.model.workHourshg) +
|
|
|
|
parseFloat(this.model.workHoursqg) +
|
|
|
|
parseFloat(this.yp)
|
|
|
|
console.log(xche)
|
|
|
|
//卡子
|
|
|
|
var qzhe=this.model.workHoursjig+this.model.workHoursjuc+this.model.workHourshg+this.model.workHoursqg+this.yp
|
|
|
|
var qzhe =
|
|
|
|
parseFloat(this.model.workHoursjig) +
|
|
|
|
parseFloat(this.model.workHoursjuc) +
|
|
|
|
parseFloat(this.model.workHourshg) +
|
|
|
|
parseFloat(this.model.workHoursqg) +
|
|
|
|
parseFloat(this.yp)
|
|
|
|
//柜箱盒
|
|
|
|
var gxhe=this.model.workHoursjig+this.model.workHoursjuc+this.model.workHoursqg+this.yp+this.model.workHoursmh1+this.model.workHoursmh2+this.model.workHourshm+this.model.workHourszp
|
|
|
|
var gxhe =
|
|
|
|
parseFloat(this.model.workHoursjig) +
|
|
|
|
parseFloat(this.model.workHoursjuc) +
|
|
|
|
parseFloat(this.model.workHoursqg) +
|
|
|
|
parseFloat(this.yp) +
|
|
|
|
parseFloat(this.model.workHoursmh1) +
|
|
|
|
parseFloat(this.model.workHoursmh2) +
|
|
|
|
parseFloat(this.model.workHourshm) +
|
|
|
|
parseFloat(this.model.workHourszp)
|
|
|
|
//司机室
|
|
|
|
var sjshe=this.model.workHoursjig+this.model.workHoursjuc+this.model.workHoursqg+this.yp+this.model.workHoursmh1+this.model.workHoursmh2+this.model.workHourshm+this.model.workHourszp
|
|
|
|
var sjshe =
|
|
|
|
parseFloat(this.model.workHoursjig) +
|
|
|
|
parseFloat(this.model.workHoursjuc) +
|
|
|
|
parseFloat(this.model.workHoursqg) +
|
|
|
|
parseFloat(this.yp) +
|
|
|
|
parseFloat(this.model.workHoursmh1) +
|
|
|
|
parseFloat(this.model.workHoursmh2) +
|
|
|
|
parseFloat(this.model.workHourshm) +
|
|
|
|
parseFloat(this.model.workHourszp)
|
|
|
|
//附属钢
|
|
|
|
var fsghe=this.model.workHoursjig+this.model.workHoursjuc+this.yp+this.model.workHoursmh1+this.model.workHoursmh2+this.model.workHourshm
|
|
|
|
|
|
|
|
if(this.productType === 'JD' && data.workHours<=this.zong && jiedihe<=this.zong){
|
|
|
|
var fsghe =
|
|
|
|
parseFloat(this.model.workHoursjig) +
|
|
|
|
parseFloat(this.model.workHoursjuc) +
|
|
|
|
parseFloat(this.yp) +
|
|
|
|
parseFloat(this.model.workHoursmh1) +
|
|
|
|
parseFloat(this.model.workHoursmh2) +
|
|
|
|
parseFloat(this.model.workHourshm)
|
|
|
|
console.log(this.productType)
|
|
|
|
console.log(this.zong)
|
|
|
|
if(this.zong-this.yp===0){
|
|
|
|
that.$message.error('工时已派完')
|
|
|
|
that.confirmLoading = false
|
|
|
|
}else if (this.productType === 'JD' && jiedihe <= this.zong) {
|
|
|
|
addPg(this.url.add, data)
|
|
|
|
.then((res) => {
|
|
|
|
if (res.success) {
|
|
...
|
...
|
@@ -1403,7 +1483,7 @@ export default { |
|
|
|
.finally(() => {
|
|
|
|
that.confirmLoading = false
|
|
|
|
})
|
|
|
|
}else if(this.productType === 'XC' && data.workHours<=this.zong && xche<=this.zong){
|
|
|
|
} else if (this.productType === 'XC' && xche <= this.zong) {
|
|
|
|
addPg(this.url.add, data)
|
|
|
|
.then((res) => {
|
|
|
|
if (res.success) {
|
|
...
|
...
|
@@ -1416,7 +1496,7 @@ export default { |
|
|
|
.finally(() => {
|
|
|
|
that.confirmLoading = false
|
|
|
|
})
|
|
|
|
}else if(this.productType === 'QZ' && data.workHours<=this.zong && qzhe<=this.zong){
|
|
|
|
} else if (this.productType === 'QZ' && qzhe <= this.zong) {
|
|
|
|
addPg(this.url.add, data)
|
|
|
|
.then((res) => {
|
|
|
|
if (res.success) {
|
|
...
|
...
|
@@ -1429,7 +1509,7 @@ export default { |
|
|
|
.finally(() => {
|
|
|
|
that.confirmLoading = false
|
|
|
|
})
|
|
|
|
}else if(this.productType === 'GX' && data.workHours<=this.zong && gxhe<=this.zong){
|
|
|
|
} else if (this.productType === 'GX' && gxhe <= this.zong) {
|
|
|
|
addPg(this.url.add, data)
|
|
|
|
.then((res) => {
|
|
|
|
if (res.success) {
|
|
...
|
...
|
@@ -1442,7 +1522,7 @@ export default { |
|
|
|
.finally(() => {
|
|
|
|
that.confirmLoading = false
|
|
|
|
})
|
|
|
|
}else if(this.productType === 'SJ' && data.workHours<=this.zong && sjshe<=this.zong){
|
|
|
|
} else if (this.productType === 'SJ' && sjshe <= this.zong) {
|
|
|
|
addPg(this.url.add, data)
|
|
|
|
.then((res) => {
|
|
|
|
if (res.success) {
|
|
...
|
...
|
@@ -1455,7 +1535,7 @@ export default { |
|
|
|
.finally(() => {
|
|
|
|
that.confirmLoading = false
|
|
|
|
})
|
|
|
|
}else if(this.productType === 'FS' && data.workHours<=this.zong && fsghe<=this.zong){
|
|
|
|
} else if (this.productType === 'FS' && fsghe <= this.zong) {
|
|
|
|
addPg(this.url.add, data)
|
|
|
|
.then((res) => {
|
|
|
|
if (res.success) {
|
|
...
|
...
|
@@ -1468,11 +1548,10 @@ export default { |
|
|
|
.finally(() => {
|
|
|
|
that.confirmLoading = false
|
|
|
|
})
|
|
|
|
}else{
|
|
|
|
that.$message.error("派发工时超过总工时")
|
|
|
|
}else {
|
|
|
|
that.$message.error('派发工时超过总工时')
|
|
|
|
that.confirmLoading = false
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
...
|
...
|
|