|
@@ -134,16 +134,16 @@
|
|
|
prop="packingMethod"
|
|
|
>
|
|
|
<ws-select
|
|
|
- v-model="deptBudgetList.crtDutyId"
|
|
|
+ v-model="deptBudgetList.packingMethod"
|
|
|
placeholder=""
|
|
|
class="typeselect"
|
|
|
@change="selectCrtDuty"
|
|
|
>
|
|
|
<ws-option
|
|
|
- v-for="item in taskTypeList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.value"
|
|
|
- :value="item.value"
|
|
|
+ v-for="item in packtypeList"
|
|
|
+ :key="item.constKey"
|
|
|
+ :label="item.constValue"
|
|
|
+ :value="item.constValue"
|
|
|
/>
|
|
|
</ws-select>
|
|
|
</ws-form-item>
|
|
@@ -163,9 +163,40 @@
|
|
|
span="1"
|
|
|
prop="acceptanceMethod"
|
|
|
>
|
|
|
+ <el-select v-model="pleaseChoose" :placeholder="getPleaseChoose" style="width: 100%;" filterable @change="selectContract">
|
|
|
+ <el-option v-for="(item,index) in unitList"
|
|
|
+ :key="item.constValue"
|
|
|
+ :label="getLanguage !== 'en' ? item.constValue : item.constValueEn"
|
|
|
+ :value="item.constValue">
|
|
|
+ <span class="unit-left" style="float: left">
|
|
|
+ <span v-if="item.flag == 'delete'"> {{ item.constValue }}</span>
|
|
|
+ <!-- 新增文本框 -->
|
|
|
+ <div style="width:160px" v-if="item.flag !== 'delete'" @click.stop>
|
|
|
+ <ws-input v-model="item.constValue"
|
|
|
+ clearable
|
|
|
+ maxlength="10"
|
|
|
+ style="width:100%;"></ws-input>
|
|
|
+ </div>
|
|
|
+ </span>
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 13px">
|
|
|
+ <!-- 对号 -->
|
|
|
+ <i class="el-icon-check" style="line-height: 29px;margin-left:10px" v-if="item.flag !== 'delete'" @click.stop="saveClick(item, index)"></i>
|
|
|
+ <!-- 编辑 -->
|
|
|
+ <i class="el-icon-edit" style="line-height: 29px;margin-left:10px" v-if="item.flag == 'delete'" @click.stop="editClick(item, index)"></i>
|
|
|
+ <!-- 删除 -->
|
|
|
+ <i class="el-icon-delete" style="line-height: 29px;" @click.stop="deleteClick(item, index)"></i>
|
|
|
+ </span>
|
|
|
+ </el-option>
|
|
|
+ <!-- 新增按钮 -->
|
|
|
+ <el-option value="" label="">
|
|
|
+ <div style="text-align: center">
|
|
|
+ <ws-button type="primary" @click.stop="addClick">{{$t('button.add')}}</ws-button>
|
|
|
+ </div>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</ws-form-item>
|
|
|
<ws-form-item
|
|
|
- label="短溢装(%)"
|
|
|
+ label="溢短装(%)"
|
|
|
span="1"
|
|
|
prop="overShort"
|
|
|
>
|
|
@@ -254,11 +285,19 @@
|
|
|
span="1"
|
|
|
prop="goodsName"
|
|
|
>
|
|
|
- <ws-input
|
|
|
- v-model="deptBudgetList.contractGoodsInfo.goodsName"
|
|
|
- maxlength="100"
|
|
|
- size="small"
|
|
|
- />
|
|
|
+ <ws-select
|
|
|
+ v-model="deptBudgetList.contractGoodsInfo.goodsName"
|
|
|
+ placeholder=""
|
|
|
+ class="typeselect"
|
|
|
+ @change="selectCrtDuty"
|
|
|
+ >
|
|
|
+ <ws-option
|
|
|
+ v-for="item in goodnameList"
|
|
|
+ :key="item.constKey"
|
|
|
+ :label="item.constValue"
|
|
|
+ :value="item.constValue"
|
|
|
+ />
|
|
|
+ </ws-select>
|
|
|
</ws-form-item>
|
|
|
<ws-form-item
|
|
|
label="水分(%)<="
|
|
@@ -276,14 +315,14 @@
|
|
|
span="1"
|
|
|
prop="grade"
|
|
|
>
|
|
|
- <ws-select
|
|
|
+ <ws-select
|
|
|
v-model="deptBudgetList.contractGoodsInfo.grade"
|
|
|
placeholder=""
|
|
|
class="typeselect"
|
|
|
@change="selectCrtDuty"
|
|
|
>
|
|
|
<ws-option
|
|
|
- v-for="item in taskTypeList"
|
|
|
+ v-for="item in gradeList"
|
|
|
:key="item.value"
|
|
|
:label="item.value"
|
|
|
:value="item.value"
|
|
@@ -325,7 +364,7 @@
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
<ws-form-item
|
|
|
- label="焦糊粒(%)<="
|
|
|
+ label="热损伤(%)<="
|
|
|
span="1"
|
|
|
prop="jiaorenli"
|
|
|
>
|
|
@@ -375,7 +414,7 @@
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
<ws-form-item
|
|
|
- label="合同外支出(元)"
|
|
|
+ label="费用支出(元)"
|
|
|
span="1"
|
|
|
prop="waterContent"
|
|
|
>
|
|
@@ -458,14 +497,21 @@
|
|
|
class="bg-bottom"
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
- @click="returnsales()"
|
|
|
+ @click="submit()"
|
|
|
>提交</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { addList } from '@/model/contarct/index'
|
|
|
-import { packList } from '@/model/contarct/index'
|
|
|
+import { EventBus, dayjs } from 'base-core-lib'
|
|
|
+import {
|
|
|
+ packList,
|
|
|
+ addList,
|
|
|
+ xiala,
|
|
|
+ addxiala,
|
|
|
+ editxiala,
|
|
|
+ delxiala,
|
|
|
+} from '@/model/contarct/index'
|
|
|
import WsUpload from '@/components/WsUpload'
|
|
|
export default {
|
|
|
name: 'viewSpareMoney',
|
|
@@ -494,6 +540,7 @@ export default {
|
|
|
// 年
|
|
|
year: '',
|
|
|
size: 10,
|
|
|
+ pleaseChoose: '',
|
|
|
// 提交类型
|
|
|
submitType: true,
|
|
|
tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
|
|
@@ -505,11 +552,16 @@ export default {
|
|
|
contractProcessInfo: {},
|
|
|
},
|
|
|
mainReportAdd: {},
|
|
|
+ trainingMethods: {},
|
|
|
pickerBeginDateBefore: {
|
|
|
disabledDate: (time) => {
|
|
|
return time.getTime() > Date.now()
|
|
|
},
|
|
|
},
|
|
|
+ packtypeList: [],
|
|
|
+ goodnameList: [],
|
|
|
+ unitList: [],
|
|
|
+ gradeList: [],
|
|
|
taskTypeList: [
|
|
|
{ value: '未完成(默认)' },
|
|
|
{ value: '已完成' },
|
|
@@ -531,24 +583,147 @@ export default {
|
|
|
this.dialogViewSpareMoney = false
|
|
|
},
|
|
|
loaddata() {
|
|
|
+ // 包装方式
|
|
|
packList({ constId: 'CON1' })
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
- console.log(response)
|
|
|
- this.contractList = response
|
|
|
+ this.packtypeList = response
|
|
|
+ })
|
|
|
+ // 验收方式
|
|
|
+ this.getUnitList()
|
|
|
+ // 货名
|
|
|
+ packList({ constId: 'CON2' })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.goodnameList = response
|
|
|
+ })
|
|
|
+ // 品级
|
|
|
+ packList({ constId: 'CON3' })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.gradeList = response
|
|
|
+ })
|
|
|
+ },
|
|
|
+ submit() {
|
|
|
+ this.$refs.deptBudgetList.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ console.log(this.deptBudgetList)
|
|
|
+ } else {
|
|
|
+ EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getUnitList() {
|
|
|
+ xiala({
|
|
|
+ compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
+ constCode: 'TYPEYAN',
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.unitList = response
|
|
|
+ let currItem
|
|
|
+ this.unitList.forEach((item, index, arr) => {
|
|
|
+ item.flag = 'delete'
|
|
|
+ if (this.vModel == item.constKey) {
|
|
|
+ currItem = item
|
|
|
+ }
|
|
|
+ })
|
|
|
+ //
|
|
|
+ if (currItem) {
|
|
|
+ this.selectContract(currItem.constValue)
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
+ selectContract(val) {
|
|
|
+ let key = this.unitList.find((item) => item.constValue === val).constKey
|
|
|
+ this.pleaseChoose = val
|
|
|
+ },
|
|
|
handleExamine() {},
|
|
|
approve() {},
|
|
|
returnsales() {
|
|
|
this.$router.push({ path: 'purchaseContract' })
|
|
|
},
|
|
|
selectCrtDuty() {},
|
|
|
+ addClick() {
|
|
|
+ this.unitList.push({
|
|
|
+ flag: 'add',
|
|
|
+ constValue: '',
|
|
|
+ constKey: '',
|
|
|
+ })
|
|
|
+ },
|
|
|
+ saveClick(item, index) {
|
|
|
+ console.log(item)
|
|
|
+
|
|
|
+ if (Object.is(item.id, 1)) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (Object.is(this.unitList[index].flag, 'delete')) {
|
|
|
+ this.$set(this.unitList, index, { flag: 'check' })
|
|
|
+ } else {
|
|
|
+ this.$set(this.unitList, index, { flag: 'delete' })
|
|
|
+ }
|
|
|
+ if (!item.constValue) {
|
|
|
+ this.unitList.splice(index, 1)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (item.flag == 'add') {
|
|
|
+ item.constKey = Math.random() * 20
|
|
|
+ this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
+ this.trainingMethods.constKey = item.constKey
|
|
|
+ this.trainingMethods.constCode = 'TYPEYAN'
|
|
|
+ this.trainingMethods.constValue = item.constValue
|
|
|
+ this.trainingMethods.id = item.id
|
|
|
+ addxiala(this.trainingMethods)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.getUnitList()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.trainingMethods.constValue = item.constValue
|
|
|
+ this.trainingMethods.id = item.id
|
|
|
+ editxiala(this.trainingMethods)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.getUnitList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 编辑
|
|
|
+ editClick(item, index) {
|
|
|
+ const map = JSON.parse(JSON.stringify(item))
|
|
|
+ if (Object.is(item.id, 1)) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (Object.is(this.unitList[index].flag, 'delete')) {
|
|
|
+ map.flag = 'check'
|
|
|
+ this.$set(this.unitList, index, map)
|
|
|
+ } else {
|
|
|
+ map.flag = 'delete'
|
|
|
+ this.$set(this.unitList, index, map)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 删除
|
|
|
+ deleteClick(item, index) {
|
|
|
+ if (Object.is(item.constKey, 1)) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!item.constValue) {
|
|
|
+ this.unitList.splice(index, 1)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ delxiala({ id: this.unitList[index].id })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.getUnitList()
|
|
|
+ this.pleaseChoose = ''
|
|
|
+ })
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-.ws-upload .trigger-group {
|
|
|
+.ws-upload {
|
|
|
margin-top: 20px;
|
|
|
}
|
|
|
.el-form {
|