| | |
| | | </view> |
| | | |
| | | <view class="card-content"> |
| | | <view class="info-row"> |
| | | <text class="info-label">{{ $t('container.matName') }}</text> |
| | | <text class="info-value"> |
| | | {{ item.maktx || '-' }} |
| | | </text> |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-col"> |
| | | <text class="info-label">{{ $t('container.matSpec') }}</text> |
| | | <text class="info-value"> |
| | | {{ item.specs || '-' }} |
| | | </text> |
| | | </view> |
| | | <view class="info-col"> |
| | | <text class="info-label">{{ $t('container.matBatch') }}</text> |
| | | <text class="info-value highlight"> |
| | | {{ item.batch || '-' }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-col"> |
| | | <text class="info-label">{{ $t('container.matQty') }}</text> |
| | | <text class="info-value qty"> |
| | | {{ item.anfme }} |
| | | </text> |
| | | </view> |
| | | <view class="info-row" v-for="(field, idx) in displayFields" :key="idx"> |
| | | <text class="info-label">{{ $t(field.label) }}</text> |
| | | <text class="info-value">{{ item[field.field] || '-' }}</text> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | <u-form-item :label="$t('container.code')"> |
| | | <text class="popup-text-val">{{ editMatnr }}</text> |
| | | </u-form-item> |
| | | <u-form-item :label="$t('container.matBatch')"> |
| | | <u--input |
| | | v-model="batch" |
| | | :placeholder="$t('matSelected.inputBatch')" |
| | | border="surround" |
| | | ></u--input> |
| | | </u-form-item> |
| | | <u-form-item :label="$t('container.matQty')"> |
| | | <u-form-item |
| | | v-for="(ef, efIdx) in editFields" |
| | | :key="efIdx" |
| | | :label="$t(ef.label)" |
| | | > |
| | | <u-number-box |
| | | v-model="count" |
| | | v-if="ef.type === 'number'" |
| | | v-model="editFormData[ef.field]" |
| | | :step="0.01" |
| | | :max="9999999" |
| | | @change="changeValue" |
| | | ></u-number-box> |
| | | <u--input |
| | | v-else |
| | | v-model="editFormData[ef.field]" |
| | | :placeholder="$t('settings.inputPlaceholder')" |
| | | border="surround" |
| | | ></u--input> |
| | | </u-form-item> |
| | | </u--form> |
| | | </view> |
| | |
| | | orderCombNeedSplit: true, |
| | | orderCombSeparator: ';', |
| | | orderCombArrayIndex: 0, |
| | | orderCombStartPos: 3 |
| | | orderCombStartPos: 3, |
| | | displayFields: [ |
| | | { field: 'maktx', label: 'container.matName' }, |
| | | { field: 'specs', label: 'container.matSpec' }, |
| | | { field: 'batch', label: 'container.matBatch' }, |
| | | { field: 'anfme', label: 'container.matQty' } |
| | | ], |
| | | editFields: [ |
| | | { field: 'batch', label: 'container.matBatch', type: 'text' }, |
| | | { field: 'anfme', label: 'container.matQty', type: 'number' } |
| | | ], |
| | | editFormData: {} |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | this.orderCombSeparator = settings.orderCombSeparator || ';' |
| | | this.orderCombArrayIndex = settings.orderCombArrayIndex !== undefined ? Number(settings.orderCombArrayIndex) : 0 |
| | | this.orderCombStartPos = settings.orderCombStartPos !== undefined ? Number(settings.orderCombStartPos) : 3 |
| | | if (settings.containerBindingFields && settings.containerBindingFields.length > 0) { |
| | | this.displayFields = settings.containerBindingFields |
| | | } |
| | | if (settings.containerBindingEditFields && settings.containerBindingEditFields.length > 0) { |
| | | this.editFields = settings.containerBindingEditFields |
| | | } |
| | | } else { |
| | | this.orderCombNeedSplit = true |
| | | this.orderCombSeparator = ';' |
| | |
| | | }, |
| | | revise(item, i) { |
| | | this.editMatnr = this.dataList[i].matnr |
| | | this.count = this.dataList[i].anfme |
| | | this.batch = this.dataList[i].batch |
| | | this.weight = this.dataList[i].weight |
| | | this.rowNum = i |
| | | var formData = {} |
| | | this.editFields.forEach(ef => { |
| | | formData[ef.field] = this.dataList[i][ef.field] !== undefined ? String(this.dataList[i][ef.field]) : '' |
| | | }) |
| | | this.editFormData = formData |
| | | this.showRevise = true |
| | | }, |
| | | changeValue(e) { |
| | | this.count = e.value |
| | | }, |
| | | reviseConfirm() { |
| | | this.dataList[this.rowNum].anfme = this.count |
| | | this.dataList[this.rowNum].batch = this.batch |
| | | this.dataList[this.rowNum].weight = this.weight |
| | | this.editFields.forEach(ef => { |
| | | this.dataList[this.rowNum][ef.field] = this.editFormData[ef.field] |
| | | }) |
| | | this.editMatnr = '' |
| | | this.$showToast({ type: 'success', message: this.$t('toast.modifySuccess') }) |
| | | this.showRevise = false |