|
@@ -32,12 +32,13 @@
|
|
|
<ws-info-table>
|
|
|
<!--合同编号-->
|
|
|
<ws-form-item label="合同编号" span="1" prop="contractNo">
|
|
|
- <ws-input
|
|
|
+ <!-- <ws-input
|
|
|
v-model="deptBudgetList.contractNo"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
- />
|
|
|
- <span class="unchangeable">*</span>
|
|
|
+ /> -->
|
|
|
+ {{deptBudgetList.contractNo}}
|
|
|
+
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--运输方式-->
|
|
@@ -51,12 +52,9 @@
|
|
|
|
|
|
<!--买方-->
|
|
|
<ws-form-item label="买方" span="1" prop="contractNo">
|
|
|
- <ws-input
|
|
|
- v-model="deptBudgetList.buyer"
|
|
|
- maxlength="100"
|
|
|
- size="small"
|
|
|
- />
|
|
|
- <span class="unchangeable">*</span>
|
|
|
+
|
|
|
+ {{deptBudgetList.buyer}}
|
|
|
+
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--结算方式-->
|
|
@@ -70,12 +68,9 @@
|
|
|
|
|
|
<!--卖方-->
|
|
|
<ws-form-item label="卖方" span="1" prop="contractNo">
|
|
|
- <ws-input
|
|
|
- v-model="deptBudgetList.seller"
|
|
|
- maxlength="100"
|
|
|
- size="small"
|
|
|
- />
|
|
|
- <span class="unchangeable">*</span>
|
|
|
+
|
|
|
+ {{deptBudgetList.seller}}
|
|
|
+
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--货源地-->
|
|
@@ -206,7 +201,7 @@
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--溢短装(%)-->
|
|
|
- <ws-form-item label="溢短装(%))" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="溢短装(%)" span="1" prop="contractNo">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.overShort"
|
|
|
maxlength="100"
|
|
@@ -289,7 +284,7 @@
|
|
|
<ws-info-table>
|
|
|
<!--货名-->
|
|
|
<ws-form-item label="货名" span="1" prop="goodsName">
|
|
|
- <ws-select
|
|
|
+ <!-- <ws-select
|
|
|
v-model="deptBudgetList.contractGoodsInfo.goodsName"
|
|
|
placeholder=""
|
|
|
class="typeselect"
|
|
@@ -301,8 +296,9 @@
|
|
|
:label="item.constValue"
|
|
|
:value="item.constValue"
|
|
|
/>
|
|
|
- </ws-select>
|
|
|
- <span class="unchangeable">*</span>
|
|
|
+ </ws-select> -->
|
|
|
+ {{deptBudgetList.contractGoodsInfo.goodsName}}
|
|
|
+
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--水分(%)<=-->
|
|
@@ -507,7 +503,10 @@
|
|
|
<script>
|
|
|
// import { getVesselOne } from '@/model/procurement/basic'
|
|
|
// import { dayjs } from 'base-core-lib'
|
|
|
-import { examineList, editInfo, packList } from '@/model/contarct/index'
|
|
|
+import { examineList, editInfo, packList , xiala,
|
|
|
+ addxiala,
|
|
|
+ editxiala,
|
|
|
+ delxiala,} from '@/model/contarct/index'
|
|
|
export default {
|
|
|
name: 'viewSpareMoney',
|
|
|
watch: {
|
|
@@ -534,25 +533,41 @@ export default {
|
|
|
// 提交类型
|
|
|
submitType: true,
|
|
|
tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
|
|
|
- pickerBeginDateBefore: {},
|
|
|
+ pickerBeginDateBefore: {
|
|
|
+ disabledDate: (time) => {
|
|
|
+ return time.getTime() > Date.now()
|
|
|
+ },
|
|
|
+ },
|
|
|
// selectpackingMethod:{},
|
|
|
- selectunitList: {},
|
|
|
- // change:{},
|
|
|
+ selectunitList: {},
|
|
|
+ //change:{},
|
|
|
+ onChange:{},
|
|
|
+ uploadSuccess:{},
|
|
|
+ selectgrade:{},
|
|
|
+ goodnameList: {},
|
|
|
+ selectpackingMethod:{},
|
|
|
unitList: {},
|
|
|
- packtypeList: {},
|
|
|
- compId: {},
|
|
|
- appendixIdsAdd: {},
|
|
|
- size: {},
|
|
|
- deptBudgetList: {},
|
|
|
+ packtypeList: [],
|
|
|
+ compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
+ appendixIdsAdd: '',
|
|
|
+ size: 10,
|
|
|
+ deptBudgetList: {
|
|
|
+ contractGoodsInfo: {
|
|
|
+ goodsName: '',
|
|
|
+ },
|
|
|
+ contractProcessInfo: {},
|
|
|
+ },
|
|
|
+ // selectpackingMethod:{},
|
|
|
+ // change:{},
|
|
|
ruleDeptBudget: {},
|
|
|
isEdited: false,
|
|
|
registered: {},
|
|
|
selectCrtDuty: {},
|
|
|
dutyList: {},
|
|
|
sexList: {},
|
|
|
- pickerBeginDateBefore: {},
|
|
|
selectDuty: {},
|
|
|
-
|
|
|
+gradeList:{},
|
|
|
+ChapterTwoList:{},
|
|
|
selectIntendedShip: {},
|
|
|
interviewTypeList: {},
|
|
|
}
|
|
@@ -564,7 +579,7 @@ export default {
|
|
|
this.loaddata()
|
|
|
this.editInfo()
|
|
|
this.showType = this.isShow
|
|
|
- console.log(this.$route.params)
|
|
|
+ // console.log(this.$route.params)
|
|
|
this.showType = this.isShow
|
|
|
},
|
|
|
methods: {
|
|
@@ -609,11 +624,121 @@ export default {
|
|
|
this.ChapterTwoList = response
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ 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)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 编辑
|
|
|
+ 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 = ''
|
|
|
+ })
|
|
|
+ },
|
|
|
+ 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 if (item.flag == 'check') {
|
|
|
+ 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
|
|
|
+ editxiala(this.trainingMethods)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.getUnitList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ submit() {
|
|
|
+ this.$refs.deptBudgetList.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.deptBudgetList.compId = this.compId
|
|
|
+ this.deptBudgetList.contractType = 1
|
|
|
+ editInfo(this.deptBudgetList)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.$message.success('添加成功')
|
|
|
+ this.$router.push({ path: 'salesContract' })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
editInfo() {
|
|
|
editInfo({})
|
|
|
},
|
|
|
// getList(){}
|
|
|
},
|
|
|
+
|
|
|
}
|
|
|
</script>
|
|
|
|